{"_id":"@alchez/stonecrop","_rev":"1-e194628915162829f853cf0dc7872644","name":"@alchez/stonecrop","dist-tags":{"latest":"0.2.8"},"versions":{"0.2.2":{"name":"@alchez/stonecrop","version":"0.2.2","description":"schema helper","license":"MIT","type":"module","exports":{".":{"import":"./dist/stonecrop.js","require":"./dist/stonecrop.umd.cjs"}},"main":"dist/stonecrop.js","module":"dist/stonecrop.js","types":"src/index","dependencies":{"@vueuse/core":"^9.13.0","immutable":"^4.3.0","pinia":"^2.0.32","pinia-shared-state":"^0.3.0","pinia-undo":"^0.1.9","pinia-xstate":"^1.0.9","vue":"^3.2.47","vue-router":"^4","xstate":"~4.37.2"},"devDependencies":{"@typescript-eslint/eslint-plugin":"^5.59.5","@typescript-eslint/parser":"^5.59.5","@vitejs/plugin-vue":"^4.2.1","eslint":"^8.40.0","eslint-config-prettier":"^8.8.0","eslint-plugin-vue":"^9.11.1","typescript":"^5.0.4","vite":"^4.3.5","@alchez/aform":"0.2.2","@alchez/atable":"0.2.2"},"engines":{"node":">=20.11.0"},"umd":"dist/stonecrop.umd.cjs","scripts":{"build":"vite build","dev":"vite serve stories/ -c vite.config.ts","lint":"eslint . --ext .ts,.vue","preview":"vite preview"},"gitHead":"c1e11731ae5c95d62cdd648b8f1b749e6d2fc5f8","_id":"@alchez/stonecrop@0.2.2","_integrity":"sha512-uKBydE1WrKwWLb8KZbDE4fhD716BqLSYy+KoXCQPFyROhcmNgF80bZFW2C2fJZrbtt3idLmwGGh9917iZMmwiA==","_resolved":"/tmp/b87aaa6c910c2af6340198126abf49ca/alchez-stonecrop-0.2.2.tgz","_from":"file:alchez-stonecrop-0.2.2.tgz","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-uKBydE1WrKwWLb8KZbDE4fhD716BqLSYy+KoXCQPFyROhcmNgF80bZFW2C2fJZrbtt3idLmwGGh9917iZMmwiA==","shasum":"64ac05634da66e2ac5c246daad5e9eb3ddd14929","tarball":"https://registry.npmjs.org/@alchez/stonecrop/-/stonecrop-0.2.2.tgz","fileCount":4,"unpackedSize":367942,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRq1xvvOrMWS5s7OslJATrgYPpiDM0Q4AHA2EtNVRwNQIhAO+JjBgUH6UlqjGrrChodDgvDUu1l0VIvRfuAsZMIU2L"}]},"_npmUser":{"name":"alchez","email":"rohanbansal33@gmail.com"},"directories":{},"maintainers":[{"name":"alchez","email":"rohanbansal33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stonecrop_0.2.2_1713247828315_0.7327627881385188"},"_hasShrinkwrap":false},"0.2.8":{"name":"@alchez/stonecrop","version":"0.2.8","description":"schema helper","license":"MIT","type":"module","author":{"name":"Tyler Matteson","email":"tyler@agritheory.com"},"repository":{"type":"git","url":"git+https://github.com/agritheory/stonecrop.git","directory":"stonecrop"},"bugs":{"url":"https://github.com/agritheory/stonecrop/issues"},"exports":{".":{"import":"./dist/stonecrop.js","require":"./dist/stonecrop.umd.cjs"}},"main":"dist/stonecrop.js","module":"dist/stonecrop.js","umd":"dist/stonecrop.umd.cjs","types":"src/index","dependencies":{"@vueuse/core":"^9.13.0","immutable":"^4.3.0","pinia":"^2.0.32","pinia-shared-state":"^0.3.0","pinia-undo":"^0.1.9","pinia-xstate":"^1.0.9","vue":"^3.4.23","vue-router":"^4","xstate":"~4.37.2"},"devDependencies":{"@typescript-eslint/eslint-plugin":"^7.6.0","@typescript-eslint/parser":"^7.6.0","@vitejs/plugin-vue":"^5.0.4","eslint":"^8.40.0","eslint-config-prettier":"^8.8.0","eslint-plugin-vue":"^9.11.1","typescript":"^5.4.5","vite":"^5.2.9","@alchez/aform":"0.2.8","@alchez/atable":"0.2.8"},"publishConfig":{"access":"public"},"engines":{"node":">=20.11.0"},"scripts":{"build":"vite build","dev":"vite serve stories/ -c vite.config.ts","lint":"eslint . --ext .ts,.vue","preview":"vite preview"},"gitHead":"5a539ec44c70a10e7eacbc0e3f2820a1db4d29aa","homepage":"https://github.com/agritheory/stonecrop#readme","_id":"@alchez/stonecrop@0.2.8","_integrity":"sha512-KmLBkHv9MQVKF2DnPH4KiAnLDBfYR6m/NhpWPbB/ncwSM4AxYQBLUX2gNn8XuxWJRRbp7mokVXXe5I6jaM3HsA==","_resolved":"/tmp/f49f1972fa63f8610c4cf549e116dcf1/alchez-stonecrop-0.2.8.tgz","_from":"file:alchez-stonecrop-0.2.8.tgz","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-KmLBkHv9MQVKF2DnPH4KiAnLDBfYR6m/NhpWPbB/ncwSM4AxYQBLUX2gNn8XuxWJRRbp7mokVXXe5I6jaM3HsA==","shasum":"ccea93d789bdc213bee70e0f39bbd863b4a5f383","tarball":"https://registry.npmjs.org/@alchez/stonecrop/-/stonecrop-0.2.8.tgz","fileCount":18,"unpackedSize":383010,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFxr8ZCa8h0HJZm4RRzMuY6b9zn7uTMk48T8FTqYTLGjAiA2qAERTseUFChSpzII7sS6Ug7XaW8XQHVLQ9dDbmJlig=="}]},"_npmUser":{"name":"alchez","email":"rohanbansal33@gmail.com"},"directories":{},"maintainers":[{"name":"alchez","email":"rohanbansal33@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stonecrop_0.2.8_1714646010224_0.042215457610754736"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-16T06:10:28.206Z","0.2.2":"2024-04-16T06:10:28.478Z","modified":"2024-05-02T10:33:30.575Z","0.2.8":"2024-05-02T10:33:30.403Z"},"maintainers":[{"name":"alchez","email":"rohanbansal33@gmail.com"}],"description":"schema helper","license":"MIT","readme":"# Stonecrop\n_This package is under active development / design._\n\n## Design\nA context will define schema, workflow and actions.\n  - Schema describes the data model and layout of the document.\n  - Workflows are the events that are registered on it and will specific to the context. An application might have 'login', 'onAppLoad', 'beforeRouteChange' and 'logout' events.  A form/document context might define CRUD events. A table component, nested inside the form component might define its own events. I think we want Events to be FSM\n  - Actions are an ordered set of functions, called by Workflow\n  - [Router integration](https://pinia.vuejs.org/core-concepts/plugins.html#adding-new-external-properties). Stonecrop setup should expect a router or provide a default implementation\n\nThe context will be tree-shaped with a single root. Adding more nodes at the root level isn't a problem, but multiple roots would be disallowed.\n\nExample APIs and paths\n\n```\napp.schema <Record> // immutable\napp.workflow <FSM> // immutable\napp.actions <OrderedSet> // immutable\napp.value <Store> // mutable\napp.user // \"tyler@agritheory.com\"\napp.name // \"My First Application\"\napp.doctype.schema <Record> // `app.doctype` lazy loaded by Event in router?\napp.doctype.workflow <FSM>\napp.doctype.actions <OrderedSet>\napp.doctype.actions.value <Store>\napp.doctype.schema.field.workflow <FSM>\napp.doctype.schema.field.actions <OrderedSet>\napp.doctype.schema.field.value <Store>\napp.doctype.schema.field.value.field.value <Store> // a \"sub-form\"\napp.doctype.schema.field.value.field[0].value <Store> // also a \"sub-form\", likely representing a table or list\n```\n\nIt may make sense to use [automatic injection aliasing](https://vuejs.org/guide/components/provide-inject.html#inject) at the doctype level\n\n## Base Classes\nThe Doctype aligns with a row, record or object in a database. It is required to specify its schema, a Finite State Machine that informs its workflow and a set of functions that are triggered by that FSM's state transitions.\n\nRegistry is a map of all Doctypes, lazy loaded and is responsible for routing within the application\n\nStem is a composable singleton that wraps Registry and provides application level state management\n\n\n## Story / Network diagram\n#### **Doctype | Record Story**\n\n- User is redirected after successful login\n- Base URL is configured at app level to serve a navigation page\n- User navigates to list view of `doctype`\n- Table component loads existing records of `doctype` from schema; record-level schema is added to registry with web worker\n- User navigates to specific record of `doctype`: schema is loaded from registry, data is loaded from server\n- User mutates data, changes are persisted to server / DB per FSM\n\n#### **App Level**\n- User is redirected after successful login\n- Base URL is configured at app level to serve a navigation page\n- User opens command palette from lower-right-docked tab interface\n- User can search for `doctype` by name or other server-enabled capabilities\n\n#### **Low Code**\n- User can define `doctype` and schema from UI\n- Fields are shown as rows in a table\n- FSM is shown as an editable diagram that validates itself\n","readmeFilename":"readme.md","homepage":"https://github.com/agritheory/stonecrop#readme","repository":{"type":"git","url":"git+https://github.com/agritheory/stonecrop.git","directory":"stonecrop"},"author":{"name":"Tyler Matteson","email":"tyler@agritheory.com"},"bugs":{"url":"https://github.com/agritheory/stonecrop/issues"}}