{"id":20054422,"url":"https://github.com/divriots/csf-simple-book","last_synced_at":"2025-08-05T09:13:12.966Z","repository":{"id":49930528,"uuid":"518383654","full_name":"divriots/csf-simple-book","owner":"divriots","description":"Simple 0-dependency story book for CSF stories","archived":false,"fork":false,"pushed_at":"2022-08-22T15:22:47.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-01T14:16:51.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://studio.webcomponents.dev/view/g25cXg2tW2wEDogWL9dH","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/divriots.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-27T09:00:56.000Z","updated_at":"2022-07-27T12:43:04.000Z","dependencies_parsed_at":"2022-09-10T01:32:10.729Z","dependency_job_id":null,"html_url":"https://github.com/divriots/csf-simple-book","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divriots%2Fcsf-simple-book","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divriots%2Fcsf-simple-book/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divriots%2Fcsf-simple-book/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divriots%2Fcsf-simple-book/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divriots","download_url":"https://codeload.github.com/divriots/csf-simple-book/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241482157,"owners_count":19969856,"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":"2024-11-13T12:40:25.302Z","updated_at":"2025-03-02T09:18:16.544Z","avatar_url":"https://github.com/divriots.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSF Simple Book [![npm Version](https://img.shields.io/npm/v/@divriots/csf-simple-book?cacheSeconds=1800)](https://npmjs.com/package/divriots/csf-simple-book)\n\nSimple (no dependency) story-book component to render CSF stories in any project, any framework.\n\n## Install\n\n```sh\npnpm add @divriots/csf-simple-book @divriots/csf-helpers -D\n```\n\n## Example use\n\n```html\n\u003cbody\u003e\n\t\u003cstory-book\u003e\u003c/story-book\u003e\n\u003c/body\u003e\n```\n\n```js\nimport { getStoryStore } from '@divriots/csf-helpers';\nimport '@divriots/csf-simple-book';\n\n// fetch all stories to include in the book (vite format: https://vitejs.dev/guide/features.html#glob-import )\nconst storyModules = import.meta.glob('./**/*.stories.js');\n\n// get the global story store singleton\nconst storyStore = getStoryStore();\n\n// project annotations to apply to all stories (e.g. render, renderToDOM, globals, parameters ...)\nstoryStore.setProjectAnnotations({\n  parameters: {\n    layout: 'centered',\n  }\n});\n\n// loads story files into the store\nstoryStore.loadModules(storyModules)\n\n// That's all\n```\n\n### Live demo\n\nOpen in [stackblitz](https://stackblitz.com/github/divriots/csf-simple-book) \n\n\n## Example use (react 18+)\n\n```js\nimport * as reactConfig from '@divriots/csf-react-renderer';\n\n...\nstoryStore.setProjectAnnotations({\n  // will inject render \u0026 renderToDOM implementations for react\n  ...reactConfig,\n  parameters: {\n    layout: 'centered',\n  }\n});\n...\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivriots%2Fcsf-simple-book","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivriots%2Fcsf-simple-book","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivriots%2Fcsf-simple-book/lists"}