{"_id":"@29decibel/formwc","_rev":"5-e7349a973e192fcaf28c79aa161992ac","name":"@29decibel/formwc","dist-tags":{"latest":"0.4.1"},"versions":{"0.1.0":{"name":"@29decibel/formwc","version":"0.1.0","license":"MIT","_id":"@29decibel/formwc@0.1.0","maintainers":[{"name":"29decibel","email":"m@idots.me"}],"homepage":"https://github.com/29decibel/formwc#readme","bugs":{"url":"https://github.com/29decibel/formwc/issues"},"dist":{"shasum":"225d729102412800f108ffb31712e327d8463ee4","tarball":"https://registry.npmjs.org/@29decibel/formwc/-/formwc-0.1.0.tgz","fileCount":23,"integrity":"sha512-baN4HMeOvK+73uIxj0n9xFxvMZl235Z5byPCd9z/JxWYK0Zthy9HYxeGm3w9I0+ozNVxkHMR2nXGisd8b07BEA==","signatures":[{"sig":"MEUCIQCcgIi4FOo2UNe1LmYacXM0wIDTre8FuUvgaAioY9edtgIgSYH5NERO1cm2H/15dGsQ172g1K3eeXMmb2XW+EijBjI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":291077},"type":"module","unpkg":"./dist/formwc.js","module":"./dist/formwc.js","exports":{".":{"import":"./dist/formwc.js","default":"./dist/formwc.js"},"./engine":"./src/engine/index.js","./unstyled":"./src/unstyled.js"},"gitHead":"421818108e36a9355c9f93fc08d2ab18dcb97262","scripts":{"dev":"vite --host 127.0.0.1","test":"vitest run","build":"vite build","test:watch":"vitest"},"_npmUser":{"name":"29decibel","email":"m@idots.me"},"jsdelivr":"./dist/formwc.js","repository":{"url":"git+https://github.com/29decibel/formwc.git","type":"git"},"_npmVersion":"11.6.2","description":"A tiny JSON Schema form library built with Web Components and Lit.","directories":{},"_nodeVersion":"25.2.0","dependencies":{"ajv":"^8.18.0","lit":"^3.3.3","ajv-formats":"^2.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.3.0","devDependencies":{"vite":"^7.2.4","jsdom":"^27.0.1","vitest":"^4.0.14"},"_npmOperationalInternal":{"tmp":"tmp/formwc_0.1.0_1779743928226_0.30910938307439073","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@29decibel/formwc","version":"0.2.0","license":"MIT","_id":"@29decibel/formwc@0.2.0","maintainers":[{"name":"29decibel","email":"m@idots.me"}],"homepage":"https://github.com/29decibel/formwc#readme","bugs":{"url":"https://github.com/29decibel/formwc/issues"},"dist":{"shasum":"21200dc5072a76e233b96db17f87440aaaa08217","tarball":"https://registry.npmjs.org/@29decibel/formwc/-/formwc-0.2.0.tgz","fileCount":23,"integrity":"sha512-AAEKWn4e2P117ge/og4GlsA85Fyu3LJ778SObM+5J4a2RPe3ePrZlQRDFh3PdHUn6FYOEZ3H0EVjhpB8G7k0mw==","signatures":[{"sig":"MEYCIQCeFpLActII1r9nSX9qYHT8Ixg1UIEv9plxBxHYK7holgIhAJaokpTaEqKFaRQnzFOzJWgAir96zcQSPfI1lwlUNEZt","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":291080},"type":"module","unpkg":"./dist/formwc.js","module":"./dist/formwc.js","exports":{".":{"import":"./dist/formwc.js","default":"./dist/formwc.js"},"./engine":"./src/engine/index.js","./unstyled":"./src/unstyled.js"},"gitHead":"402e6172438adfb213bdf5e403a917593db0926e","scripts":{"dev":"vite --host 127.0.0.1","test":"vitest run","build":"vite build","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9b76448c-aeb1-4f4e-8669-954ad4d71f6a"}},"jsdelivr":"./dist/formwc.js","repository":{"url":"git+https://github.com/29decibel/formwc.git","type":"git"},"_npmVersion":"11.12.1","description":"A tiny JSON Schema form library built with Web Components and Lit.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"ajv":"^8.18.0","lit":"^3.3.3","ajv-formats":"^2.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.3.0","devDependencies":{"vite":"^7.2.4","jsdom":"^27.0.1","vitest":"^4.0.14"},"_npmOperationalInternal":{"tmp":"tmp/formwc_0.2.0_1779744931677_0.9108019955057107","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@29decibel/formwc","version":"0.3.0","license":"MIT","_id":"@29decibel/formwc@0.3.0","maintainers":[{"name":"29decibel","email":"m@idots.me"}],"homepage":"https://github.com/29decibel/formwc#readme","bugs":{"url":"https://github.com/29decibel/formwc/issues"},"dist":{"shasum":"d6719e11c59967535c275c2441630d5ee2c68076","tarball":"https://registry.npmjs.org/@29decibel/formwc/-/formwc-0.3.0.tgz","fileCount":37,"integrity":"sha512-EnbuLNxoSoB7/sFPyyYgghIu3HV+DDV6h2YSoAp7unC8RFl6rpni+JiBhtVGw+AEo9AwISX4IZWEe6Ygz8BzgQ==","signatures":[{"sig":"MEYCIQD2JPJFyBGa4Yd4vhg2hNgQURfzfvwLPvjUJJKCQXVXKAIhANaLdRlWHkmxZXzqE34R4c0l2Zjsu3va7yFxYGR+5B1x","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":375264},"type":"module","unpkg":"./dist/formwc.js","module":"./dist/formwc.js","exports":{".":{"import":"./dist/formwc.js","default":"./dist/formwc.js"},"./editor":{"import":"./dist/editor.js","default":"./dist/editor.js"},"./engine":"./src/engine/index.js","./unstyled":"./src/unstyled.js"},"gitHead":"496f302acc2fd5c627d4ba881e1b413d4a18bc0b","scripts":{"dev":"vite --host 127.0.0.1","test":"vitest run","build":"vite build","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9b76448c-aeb1-4f4e-8669-954ad4d71f6a"}},"jsdelivr":"./dist/formwc.js","repository":{"url":"git+https://github.com/29decibel/formwc.git","type":"git"},"_npmVersion":"11.12.1","description":"A tiny JSON Schema form library built with Web Components and Lit.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"ajv":"^8.18.0","lit":"^3.3.3","ajv-formats":"^2.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.3.0","devDependencies":{"vite":"^7.2.4","jsdom":"^27.0.1","vitest":"^4.0.14"},"_npmOperationalInternal":{"tmp":"tmp/formwc_0.3.0_1779757163659_0.2656279225012008","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@29decibel/formwc","version":"0.4.0","license":"MIT","_id":"@29decibel/formwc@0.4.0","maintainers":[{"name":"29decibel","email":"m@idots.me"}],"homepage":"https://github.com/29decibel/formwc#readme","bugs":{"url":"https://github.com/29decibel/formwc/issues"},"dist":{"shasum":"0aaa6fee2281b883b60068d7598e38d4f768b37d","tarball":"https://registry.npmjs.org/@29decibel/formwc/-/formwc-0.4.0.tgz","fileCount":40,"integrity":"sha512-urP1GZ0m0SX1LTJoAONg1RPW7vg6HidovRr2yOW9PAK9G6yLVTv6tUpfG8ZRBcEuLRIgZxQwH07Bz4dCjQQtjw==","signatures":[{"sig":"MEUCIFp63GbhZc/o9owthuefTPfG6vT6+gmHxkw49Idx5aBOAiEAlHeFxgYCUAi4eIEu0JjEtyUywquHu80Rc9imWuxrxUg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":400840},"type":"module","unpkg":"./dist/formwc.js","module":"./dist/formwc.js","exports":{".":{"import":"./dist/formwc.js","default":"./dist/formwc.js"},"./editor":{"import":"./dist/editor.js","default":"./dist/editor.js"},"./engine":"./src/engine/index.js","./stimulus":{"import":"./dist/stimulus.js","default":"./dist/stimulus.js"},"./unstyled":"./src/unstyled.js"},"gitHead":"1da8f3a6a6a2291bea313f26c21758a753326fda","scripts":{"dev":"vite --host 127.0.0.1","test":"vitest run","build":"vite build","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9b76448c-aeb1-4f4e-8669-954ad4d71f6a"}},"jsdelivr":"./dist/formwc.js","repository":{"url":"git+https://github.com/29decibel/formwc.git","type":"git"},"_npmVersion":"11.12.1","description":"A tiny JSON Schema form library built with Web Components and Lit.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"ajv":"^8.18.0","lit":"^3.3.3","ajv-formats":"^2.1.1","@hotwired/stimulus":"^3.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.3.0","devDependencies":{"vite":"^7.2.4","jsdom":"^27.0.1","vitest":"^4.0.14"},"_npmOperationalInternal":{"tmp":"tmp/formwc_0.4.0_1779760796939_0.16436957048966017","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@29decibel/formwc","version":"0.4.1","type":"module","description":"A tiny JSON Schema form library built with Web Components and Lit.","packageManager":"pnpm@11.3.0","license":"MIT","repository":{"type":"git","url":"git+https://github.com/29decibel/formwc.git"},"homepage":"https://github.com/29decibel/formwc#readme","bugs":{"url":"https://github.com/29decibel/formwc/issues"},"module":"./dist/formwc.js","unpkg":"./dist/formwc.js","jsdelivr":"./dist/formwc.js","publishConfig":{"access":"public"},"scripts":{"dev":"vite --host 127.0.0.1","build":"vite build","test":"vitest run","test:watch":"vitest"},"exports":{".":{"import":"./dist/formwc.js","default":"./dist/formwc.js"},"./editor":{"import":"./dist/editor.js","default":"./dist/editor.js"},"./engine":{"import":"./dist/engine.js","default":"./dist/engine.js"},"./stimulus":{"import":"./dist/stimulus.js","default":"./dist/stimulus.js"},"./unstyled":{"import":"./dist/unstyled.js","default":"./dist/unstyled.js"}},"dependencies":{"@hotwired/stimulus":"^3.2.2","ajv":"^8.18.0","ajv-formats":"^2.1.1","lit":"^3.3.3"},"devDependencies":{"jsdom":"^27.0.1","vite":"^7.2.4","vitest":"^4.0.14"},"gitHead":"37407a8fbb647c6e97cfce43d133e381bfd6f7a5","_id":"@29decibel/formwc@0.4.1","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-627C88URDt2V+QVB8bmoRYhSughYW+LIyd1kXIHb03eaIoQxPKcPG4sTpialsJT5eFVYBzpoDmJhDs5TO69iCw==","shasum":"cc24c7fb9b78036d0091e58e70e1c4d0f16eb63a","tarball":"https://registry.npmjs.org/@29decibel/formwc/-/formwc-0.4.1.tgz","fileCount":10,"unpackedSize":317362,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBpVFMZ+locyljQru7LIj6BzT9SCaLCa0zZAa9sfUPdFAiBWmPP8AmVcCXNyYB/etANJYUVcnY97ByJlgoT6CS/eSg=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9b76448c-aeb1-4f4e-8669-954ad4d71f6a"}},"directories":{},"maintainers":[{"name":"29decibel","email":"m@idots.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/formwc_0.4.1_1779761309707_0.1404376595745287"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-25T21:18:48.087Z","modified":"2026-05-26T02:08:29.947Z","0.1.0":"2026-05-25T21:18:48.376Z","0.2.0":"2026-05-25T21:35:31.817Z","0.3.0":"2026-05-26T00:59:23.797Z","0.4.0":"2026-05-26T01:59:57.099Z","0.4.1":"2026-05-26T02:08:29.853Z"},"bugs":{"url":"https://github.com/29decibel/formwc/issues"},"license":"MIT","homepage":"https://github.com/29decibel/formwc#readme","repository":{"type":"git","url":"git+https://github.com/29decibel/formwc.git"},"description":"A tiny JSON Schema form library built with Web Components and Lit.","maintainers":[{"name":"29decibel","email":"m@idots.me"}],"readme":"# FormWC\n\nFormWC is a small JSON Schema form library built with Web Components and Lit. It exposes a native custom element API, ships a minimal CSS-variable-driven theme, and supports custom widgets as ordinary custom elements.\n\n```mermaid\nflowchart TB\n  app[\"App / plain HTML page\"] --> rendererEntry[\"@29decibel/formwc\"]\n  app --> editorEntry[\"@29decibel/formwc/editor\"]\n  app --> stimulusEntry[\"@29decibel/formwc/stimulus\"]\n\n  rendererEntry --> defineRenderer[\"defineFormWC()\"]\n  defineRenderer --> formElement[\"&lt;json-schema-form&gt;\"]\n\n  stimulusEntry --> stimulusController[\"FormWCFormController\"]\n  stimulusController --> formElement\n\n  editorEntry --> defineEditor[\"defineFormWCEditor()\"]\n  defineEditor --> editorElement[\"&lt;formwc-schema-editor&gt;\"]\n\n  editorElement --> draft[\"Serializable draft model\"]\n  draft --> compiler[\"Editor compiler\"]\n  compiler --> schema[\"JSON Schema\"]\n  compiler --> uiSchema[\"UI schema\"]\n\n  schema --> engine[\"Plain JS schema engine\"]\n  uiSchema --> engine\n  engine --> formElement\n\n  formElement --> widgets[\"Custom widget elements\"]\n  formElement --> events[\"form-change / form-submit events\"]\n  formElement --> theme[\"CSS variable theme\"]\n\n  fixtures[\"Matterflow fixture JSON\"] --> editorElement\n  fixtures --> formElement\n\n  pkg[\"npm package\"] --> cdn[\"jsDelivr / unpkg ESM\"]\n  cdn --> rendererEntry\n  cdn --> editorEntry\n```\n\n```html\n<script type=\"module\">\n  import { defineFormWC } from \"https://cdn.jsdelivr.net/npm/@29decibel/formwc@0.4.1/dist/formwc.js\";\n\n  defineFormWC();\n\n  const form = document.querySelector(\"json-schema-form\");\n  form.schema = {\n    type: \"object\",\n    properties: {\n      name: { type: \"string\", title: \"Name\" },\n    },\n  };\n</script>\n\n<json-schema-form></json-schema-form>\n```\n\nRun locally:\n\n```sh\npnpm install\npnpm dev\n```\n\nUseful checks:\n\n```sh\npnpm test\npnpm build\n```\n\nThe local docs/demo page is `http://127.0.0.1:5173/` when Vite is running. It loads the copied Matterflow fixture JSON from `examples/matterflow-config` and exercises conditionals, object pickers, repeatable groups, live form-data events, and CSS-variable theming.\n\n## Editor Mode\n\nFormWC also has an optional editor entry for authoring schemas visually:\n\n```js\nimport { defineFormWCEditor } from \"@29decibel/formwc/editor\";\n\ndefineFormWCEditor();\n```\n\nThe editor custom element edits a serializable draft model and generates both JSON Schema and UI schema:\n\n```html\n<formwc-schema-editor preview></formwc-schema-editor>\n```\n\nLocal examples:\n\n- `http://127.0.0.1:5173/examples/editor-basic.html`\n- `http://127.0.0.1:5173/examples/editor.html`\n\n## CDN Usage\n\nThe pinned jsDelivr ESM endpoint for the current release is:\n\n```txt\nhttps://cdn.jsdelivr.net/npm/@29decibel/formwc@0.4.1/dist/formwc.js\n```\n\nUse pinned versions for production pages:\n\n```html\n<script type=\"module\">\n  import { defineFormWC } from \"https://cdn.jsdelivr.net/npm/@29decibel/formwc@0.4.1/dist/formwc.js\";\n\n  defineFormWC();\n</script>\n\n<json-schema-form></json-schema-form>\n```\n\nThe local CDN smoke-test page is available at `http://127.0.0.1:5173/examples/jsdelivr.html` when Vite is running. It intentionally imports FormWC from jsDelivr instead of the local source tree, so it is useful for checking that the published package works without a build step.\n\nunpkg works too:\n\n```js\nimport { defineFormWC } from \"https://unpkg.com/@29decibel/formwc@0.4.1/dist/formwc.js\";\n```\n\nThe agent orientation file is published with the npm package:\n\n```txt\nhttps://cdn.jsdelivr.net/npm/@29decibel/formwc@0.4.1/llms.txt\n```\n\nThe npm package is public so CDNs can serve it, but the published tarball is intentionally small: built `dist` files, `README.md`, `llms.txt`, and `LICENSE`.\n\n## Stimulus\n\nServer-rendered apps can use the optional Stimulus controller:\n\n```js\nimport { Application } from \"@hotwired/stimulus\";\nimport { FormWCFormController } from \"@29decibel/formwc/stimulus\";\n\nconst application = Application.start();\napplication.register(\"formwc-form\", FormWCFormController);\n```\n\n```html\n<form\n  data-controller=\"formwc-form\"\n  data-formwc-form-hide-submit-value=\"true\"\n  data-formwc-form-omit-extra-data-value=\"true\"\n  data-formwc-form-live-omit-value=\"onChange\"\n>\n  <script type=\"application/json\" data-formwc-form-target=\"schema\">\n    { \"type\": \"object\", \"properties\": { \"name\": { \"type\": \"string\", \"title\": \"Name\" } } }\n  </script>\n\n  <script type=\"application/json\" data-formwc-form-target=\"uiSchema\">\n    { \"name\": { \"ui:placeholder\": \"Jane\" } }\n  </script>\n\n  <input type=\"hidden\" name=\"payload_json\" data-formwc-form-target=\"payload\" value='{\"name\":\"Ada\"}'>\n  <json-schema-form data-formwc-form-target=\"element\"></json-schema-form>\n  <button type=\"submit\">Save</button>\n</form>\n```\n\nThe local Stimulus example is `http://127.0.0.1:5173/examples/stimulus.html`.\n\n### Rails\n\nWith a Rails JavaScript bundler, register the controller like any other Stimulus controller:\n\n```js\n// app/javascript/controllers/formwc_form_controller.js\nimport { FormWCFormController } from \"@29decibel/formwc/stimulus\";\n\nexport default FormWCFormController;\n```\n\n```js\n// app/javascript/controllers/index.js\nimport { application } from \"./application\";\nimport FormwcFormController from \"./formwc_form_controller\";\n\napplication.register(\"formwc-form\", FormwcFormController);\n```\n\nThen render JSON into inert script tags and keep the Rails hidden field as the submitted payload:\n\n```erb\n<%= form_with model: @response do |form| %>\n  <div\n    data-controller=\"formwc-form\"\n    data-formwc-form-hide-submit-value=\"true\"\n    data-formwc-form-omit-extra-data-value=\"true\"\n    data-formwc-form-live-omit-value=\"onChange\"\n    data-formwc-form-readonly-value=\"<%= @response.submitted? %>\"\n  >\n    <script type=\"application/json\" data-formwc-form-target=\"schema\">\n      <%= raw @schema.to_json %>\n    </script>\n\n    <script type=\"application/json\" data-formwc-form-target=\"uiSchema\">\n      <%= raw @ui_schema.to_json %>\n    </script>\n\n    <script type=\"application/json\" data-formwc-form-target=\"context\">\n      <%= raw({ records: @records, recordDefinitions: @record_definitions }.to_json) %>\n    </script>\n\n    <%= form.hidden_field :payload_json,\n      value: @response.payload_json.to_json,\n      data: { formwc_form_target: \"payload\" } %>\n\n    <json-schema-form data-formwc-form-target=\"element\"></json-schema-form>\n  </div>\n\n  <% unless @response.submitted? %>\n    <%= form.submit \"Save\" %>\n  <% end %>\n<% end %>\n```\n\n`readonly` keeps submitted responses visible while preventing edits. Text controls use native readonly behavior; select-style controls are disabled, and the hidden payload remains the canonical submitted value.\n\n## Releasing\n\nReleases publish to npm through GitHub Actions when a version tag is pushed.\n\n1. Update `package.json` version.\n2. Commit the version change.\n3. Create and push a matching tag:\n\n```sh\ngit tag v0.4.1\ngit push origin main --tags\n```\n\nThe `Release` workflow verifies that the tag matches `package.json`, runs tests, builds `dist/formwc.js`, previews package contents, and publishes to npm.\n\nThe package uses npm Trusted Publishing for `@29decibel/formwc` and `.github/workflows/release.yml`, so no GitHub `NPM_TOKEN` secret is required.\n","readmeFilename":"README.md"}