{"id":24510675,"url":"https://github.com/rhdeck/react-modal-base","last_synced_at":"2025-03-15T09:41:23.791Z","repository":{"id":42703653,"uuid":"299117497","full_name":"rhdeck/react-modal-base","owner":"rhdeck","description":"Base utility for building a modal dialog for collecting information in React","archived":false,"fork":false,"pushed_at":"2022-12-11T19:49:25.000Z","size":1859,"stargazers_count":0,"open_issues_count":16,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-21T20:49:03.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhdeck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-27T20:54:52.000Z","updated_at":"2020-10-09T12:39:11.000Z","dependencies_parsed_at":"2023-01-27T05:46:17.851Z","dependency_job_id":null,"html_url":"https://github.com/rhdeck/react-modal-base","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"rhdeck/ts-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhdeck%2Freact-modal-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhdeck%2Freact-modal-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhdeck%2Freact-modal-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhdeck%2Freact-modal-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhdeck","download_url":"https://codeload.github.com/rhdeck/react-modal-base/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243713391,"owners_count":20335566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-22T00:30:09.804Z","updated_at":"2025-03-15T09:41:23.764Z","avatar_url":"https://github.com/rhdeck.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ca name=\"readmemd\"\u003e\u003c/a\u003e\n\nTemplate for making easy-to-work-with tempates\n\n# ts-template\n\n## Usage\n\n1. [Copy this template](https://github.com/rhdeck/ts-template/)\n2. Clone to a local directory (eg `git clone https://github.com/me/my-repository/ \u0026\u0026 cd my-repository`)\n3. Run `yarn \u0026\u0026 yarn setup` to initialize the node package (Get rid of template strings - and this readme!)\n4. Happy Coding!\n\n## Useful Scripts\n\n1. `yarn build` will build using typescript pre-configured to node-compatible defaults\n2. `yarn docs` will auto-generate a README.md that starts with TOP.md, then adds CLI documentation (via [commanderdoc](https://npmjs.com/package/commanderdoc)) for any tool you have set up, and then library documentation after that.\n3. `yarn test` is pre-configured to test for typescript errors\n4. `yarn watch` will watch the codebase for changes and rebuild (using [livelink](https://npmjs.com/package/@raydeck/livelink))\n\n## Git code protections\n\n1. `git commit` will be blocked on the `main` branch unless you set the environment variable `ALLOWMAIN=1` Branch commits and PRs are thus encouraged\n2. `git commit` also tests messages for meeting the commitline standard conventions.\n3. `git commit` blocks pushes that do not pass `yarn test` (as a base case, they must pass typescript compilation)\n4. `npm publish` will always rebuild the code, the documentation, and push those changes back to the repository.\n5. `npm publish` will only publish the lib and src directories - any others are no\n\n## A note on \"main\"\n\nI made a deliberate choice to change the primary branch from `master` to `main` for reasons that are obvious to some. This repository endeavors to make that just automatic.\n\nPRs and feedback welcome via GitHub issues.\n\n\n\u003ca name=\"_librarymd\"\u003e\u003c/a\u003e\n\n**@raydeck/react-modal-base - v4.0.0**\n\n\u003e Globals\n\n# @raydeck/react-modal-base - v4.0.0\n\n## Index\n\n### Interfaces\n\n* [BaseType](#interfacesbasetypemd)\n* [ContextType](#interfacescontexttypemd)\n* [DeferredType](#interfacesdeferredtypemd)\n\n### Functions\n\n* [makeDeferred](#makedeferred)\n* [makeDialog](#makedialog)\n\n## Functions\n\n### makeDeferred\n\n▸ **makeDeferred**\\\u003cT\u003e(): [DeferredType](#interfacesdeferredtypemd)\\\u003cT\u003e\n\n*Defined in [index.tsx:14](https://github.com/rhdeck/react-modal-base/blob/aff9517/src/index.tsx#L14)*\n\n#### Type parameters:\n\nName |\n------ |\n`T` |\n\n**Returns:** [DeferredType](#interfacesdeferredtypemd)\\\u003cT\u003e\n\n___\n\n### makeDialog\n\n▸ **makeDialog**\\\u003cPromiseType, ArgsType\u003e(`__namedParameters`: { Dialog: FC\\\u003cArgsType \u0026 [ContextType](#interfacescontexttypemd)\\\u003cPromiseType\u003e \u0026 { reject?: undefined \\| (reason?: any) =\u003e void ; resolve?: undefined \\| (arg?: PromiseType) =\u003e void  }\u003e ; useSetValue: () =\u003e ArgsType ; useSetContext: (__namedParameters: {}) =\u003e void  }): [FC, () =\u003e [(arg: Partial\\\u003cArgsType\u003e) =\u003e Promise\\\u003cPromiseType \\| undefined\u003e, (arg?: PromiseType) =\u003e void], (C: FC) =\u003e FC]\n\n*Defined in [index.tsx:29](https://github.com/rhdeck/react-modal-base/blob/aff9517/src/index.tsx#L29)*\n\n#### Type parameters:\n\nName | Type |\n------ | ------ |\n`PromiseType` | - |\n`ArgsType` | [BaseType](#interfacesbasetypemd) |\n\n#### Parameters:\n\nName | Type |\n------ | ------ |\n`__namedParameters` | { Dialog: FC\\\u003cArgsType \u0026 [ContextType](#interfacescontexttypemd)\\\u003cPromiseType\u003e \u0026 { reject?: undefined \\| (reason?: any) =\u003e void ; resolve?: undefined \\| (arg?: PromiseType) =\u003e void  }\u003e ; useSetValue: () =\u003e ArgsType ; useSetContext: (__namedParameters: {}) =\u003e void  } |\n\n**Returns:** [FC, () =\u003e [(arg: Partial\\\u003cArgsType\u003e) =\u003e Promise\\\u003cPromiseType \\| undefined\u003e, (arg?: PromiseType) =\u003e void], (C: FC) =\u003e FC]\n\n\n\u003ca name=\"interfacesbasetypemd\"\u003e\u003c/a\u003e\n\n**@raydeck/react-modal-base - v4.0.0**\n\n\u003e [Globals](#readmemd) / BaseType\n\n# Interface: BaseType\n\n## Hierarchy\n\n* **BaseType**\n\n  ↳ [ContextType](#interfacescontexttypemd)\n\n\n\u003ca name=\"interfacescontexttypemd\"\u003e\u003c/a\u003e\n\n**@raydeck/react-modal-base - v4.0.0**\n\n\u003e [Globals](#readmemd) / ContextType\n\n# Interface: ContextType\\\u003c**PromiseType**\u003e\n\n## Type parameters\n\n* PromiseType\n\n## Hierarchy\n\n* [BaseType](#interfacesbasetypemd)\n\n  ↳ **ContextType**\n\n## Index\n\n### Properties\n\n* [deferred](#deferred)\n* [isOpen](#isopen)\n* [setDeferred](#setdeferred)\n* [setIsOpen](#setisopen)\n\n## Properties\n\n### deferred\n\n• `Optional` **deferred**: [DeferredType](#interfacesdeferredtypemd)\\\u003cPromiseType\u003e\n\n*Defined in [index.tsx:26](https://github.com/rhdeck/react-modal-base/blob/aff9517/src/index.tsx#L26)*\n\n___\n\n### isOpen\n\n•  **isOpen**: boolean\n\n*Defined in [index.tsx:24](https://github.com/rhdeck/react-modal-base/blob/aff9517/src/index.tsx#L24)*\n\n___\n\n### setDeferred\n\n• `Optional` **setDeferred**: undefined \\| (deferred: [DeferredType](#interfacesdeferredtypemd)\\\u003cPromiseType\u003e) =\u003e void\n\n*Defined in [index.tsx:27](https://github.com/rhdeck/react-modal-base/blob/aff9517/src/index.tsx#L27)*\n\n___\n\n### setIsOpen\n\n•  **setIsOpen**: (isOpen: boolean) =\u003e void\n\n*Defined in [index.tsx:25](https://github.com/rhdeck/react-modal-base/blob/aff9517/src/index.tsx#L25)*\n\n\n\u003ca name=\"interfacesdeferredtypemd\"\u003e\u003c/a\u003e\n\n**@raydeck/react-modal-base - v4.0.0**\n\n\u003e [Globals](#readmemd) / DeferredType\n\n# Interface: DeferredType\\\u003c**T**\u003e\n\n## Type parameters\n\n* T\n\n## Hierarchy\n\n* **DeferredType**\n\n## Index\n\n### Properties\n\n* [promise](#promise)\n* [reject](#reject)\n* [resolve](#resolve)\n\n## Properties\n\n### promise\n\n• `Optional` **promise**: Promise\\\u003cT\u003e\n\n*Defined in [index.tsx:12](https://github.com/rhdeck/react-modal-base/blob/aff9517/src/index.tsx#L12)*\n\n___\n\n### reject\n\n• `Optional` **reject**: undefined \\| (reason?: any) =\u003e void\n\n*Defined in [index.tsx:11](https://github.com/rhdeck/react-modal-base/blob/aff9517/src/index.tsx#L11)*\n\n___\n\n### resolve\n\n• `Optional` **resolve**: undefined \\| (arg?: T) =\u003e void\n\n*Defined in [index.tsx:10](https://github.com/rhdeck/react-modal-base/blob/aff9517/src/index.tsx#L10)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhdeck%2Freact-modal-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhdeck%2Freact-modal-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhdeck%2Freact-modal-base/lists"}