@nolwenture/formik-jsonschema-form 2.0.2 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/cjs/common/types/index.js +2 -0
- package/dist/cjs/index.js +15 -5
- package/dist/cjs/v3/codemod/bindings.js +124 -0
- package/dist/cjs/v3/codemod/cli.js +89 -0
- package/dist/cjs/v3/codemod/migrate.js +21 -0
- package/dist/cjs/v3/codemod/package.js +5 -0
- package/dist/cjs/v3/codemod/slots.js +27 -0
- package/dist/cjs/v3/codemod/transform.js +61 -0
- package/dist/cjs/v3/document/fromDocument.js +50 -0
- package/dist/cjs/v3/document/index.js +9 -0
- package/dist/cjs/v3/document/render.js +22 -0
- package/dist/cjs/v3/raw/compat/v2utils.js +39 -0
- package/dist/cjs/v3/raw/core/arrays.js +55 -0
- package/dist/cjs/v3/raw/core/choiceStyle.js +14 -0
- package/dist/cjs/v3/raw/core/conditionals.js +88 -0
- package/dist/cjs/v3/raw/core/dates.js +74 -0
- package/dist/cjs/v3/raw/core/defaults.js +31 -0
- package/dist/cjs/v3/raw/core/enums.js +37 -0
- package/dist/cjs/v3/raw/core/initialValues.js +68 -0
- package/dist/cjs/v3/raw/core/issues.js +42 -0
- package/dist/cjs/v3/raw/core/json.js +58 -0
- package/dist/cjs/v3/raw/core/merge.js +51 -0
- package/dist/cjs/v3/raw/core/paths.js +88 -0
- package/dist/cjs/v3/raw/core/policies/fileUploadView.js +4 -0
- package/dist/cjs/v3/raw/core/policies/optionalNumberInitial.js +7 -0
- package/dist/cjs/v3/raw/core/policies/storedFormats.js +5 -0
- package/dist/cjs/v3/raw/core/refs.js +104 -0
- package/dist/cjs/v3/raw/core/schemaType.js +75 -0
- package/dist/cjs/v3/raw/core/titles.js +30 -0
- package/dist/cjs/v3/raw/core/trail.js +18 -0
- package/dist/cjs/v3/raw/core/uiProps.js +72 -0
- package/dist/cjs/v3/raw/core/uiSchema.js +56 -0
- package/dist/cjs/v3/raw/dom/bind.js +84 -0
- package/dist/cjs/v3/raw/dom/build.js +27 -0
- package/dist/cjs/v3/raw/dom/controller.js +87 -0
- package/dist/cjs/v3/raw/dom/core.js +67 -0
- package/dist/cjs/v3/raw/dom/delegate.js +31 -0
- package/dist/cjs/v3/raw/dom/effects.js +67 -0
- package/dist/cjs/v3/raw/dom/elements.js +88 -0
- package/dist/cjs/v3/raw/dom/emitter.js +47 -0
- package/dist/cjs/v3/raw/dom/nodes.js +25 -0
- package/dist/cjs/v3/raw/dom/render.js +122 -0
- package/dist/cjs/v3/raw/dom/upload.js +186 -0
- package/dist/cjs/v3/raw/i18n/en.js +47 -0
- package/dist/cjs/v3/raw/i18n/fi.js +44 -0
- package/dist/cjs/v3/raw/i18n/index.js +14 -0
- package/dist/cjs/v3/raw/index.js +98 -0
- package/dist/cjs/v3/raw/model/classes.js +9 -0
- package/dist/cjs/v3/raw/model/form/actions.js +154 -0
- package/dist/cjs/v3/raw/model/form/any.js +27 -0
- package/dist/cjs/v3/raw/model/form/appearance.js +32 -0
- package/dist/cjs/v3/raw/model/form/array.js +69 -0
- package/dist/cjs/v3/raw/model/form/choice.js +74 -0
- package/dist/cjs/v3/raw/model/form/chrome.js +65 -0
- package/dist/cjs/v3/raw/model/form/componentTable.js +148 -0
- package/dist/cjs/v3/raw/model/form/date.js +53 -0
- package/dist/cjs/v3/raw/model/form/dispatch.js +119 -0
- package/dist/cjs/v3/raw/model/form/iconData.js +19 -0
- package/dist/cjs/v3/raw/model/form/icons.js +10 -0
- package/dist/cjs/v3/raw/model/form/index.js +43 -0
- package/dist/cjs/v3/raw/model/form/leaf.js +99 -0
- package/dist/cjs/v3/raw/model/form/markup.js +46 -0
- package/dist/cjs/v3/raw/model/form/object.js +105 -0
- package/dist/cjs/v3/raw/model/form/parts.js +26 -0
- package/dist/cjs/v3/raw/model/form/searchable.js +81 -0
- package/dist/cjs/v3/raw/model/form/templated.js +22 -0
- package/dist/cjs/v3/raw/model/form/upload.js +88 -0
- package/dist/cjs/v3/raw/model/styledChains.js +43 -0
- package/dist/cjs/v3/raw/model/view/build.js +165 -0
- package/dist/cjs/v3/raw/model/view/fields.js +102 -0
- package/dist/cjs/v3/raw/model/view/index.js +10 -0
- package/dist/cjs/v3/raw/model/view/markup.js +62 -0
- package/dist/cjs/v3/raw/model/view/toVNode.js +67 -0
- package/dist/cjs/v3/raw/model/view/values.js +58 -0
- package/dist/cjs/v3/raw/model/vnode.js +21 -0
- package/dist/cjs/v3/raw/sanitize/index.js +10 -0
- package/dist/cjs/v3/raw/sanitize/sanitizeHtml.js +128 -0
- package/dist/cjs/v3/raw/serialize/toDOM.js +150 -0
- package/dist/cjs/v3/raw/serialize/toString.js +58 -0
- package/dist/cjs/v3/raw/store/createStore.js +133 -0
- package/dist/cjs/v3/raw/styles/color.js +112 -0
- package/dist/cjs/v3/raw/styles/colorNames.js +30 -0
- package/dist/cjs/v3/raw/styles/defaultStyles.js +114 -0
- package/dist/cjs/v3/raw/styles/index.js +24 -0
- package/dist/cjs/v3/raw/styles/themeToCssVars.js +60 -0
- package/dist/cjs/v3/raw/styles/vars.js +28 -0
- package/dist/cjs/v3/raw/validation/arrays.js +78 -0
- package/dist/cjs/v3/raw/validation/conditions.js +63 -0
- package/dist/cjs/v3/raw/validation/index.js +182 -0
- package/dist/cjs/v3/raw/validation/keywords.js +113 -0
- package/dist/cjs/v3/raw/validation/messages.js +14 -0
- package/dist/cjs/v3/raw/validation/patterns.js +74 -0
- package/dist/cjs/v3/react/chain.js +7 -0
- package/dist/cjs/v3/react/compat.js +11 -0
- package/dist/cjs/v3/react/componentsProp.js +23 -0
- package/dist/cjs/v3/react/defined.js +6 -0
- package/dist/cjs/v3/react/ejs/EJSField.js +75 -0
- package/dist/cjs/v3/react/ejs/index.js +8 -0
- package/dist/cjs/v3/react/form/components.js +105 -0
- package/dist/cjs/v3/react/form/fields.js +75 -0
- package/dist/cjs/v3/react/form/host.js +100 -0
- package/dist/cjs/{Form/FormRegistry.js → v3/react/form/registry.js} +6 -7
- package/dist/cjs/v3/react/form/root.js +42 -0
- package/dist/cjs/v3/react/form/runtime.js +117 -0
- package/dist/cjs/v3/react/form/templates.js +58 -0
- package/dist/cjs/v3/react/form/upload.js +173 -0
- package/dist/cjs/v3/react/form/uploadContexts.js +27 -0
- package/dist/cjs/v3/react/form/useSetDefault.js +21 -0
- package/dist/cjs/v3/react/hostCore.js +59 -0
- package/dist/cjs/v3/react/index.js +45 -0
- package/dist/cjs/v3/react/selector.js +17 -0
- package/dist/cjs/v3/react/slots.js +19 -0
- package/dist/cjs/v3/react/toReact.js +63 -0
- package/dist/cjs/v3/react/view/components.js +63 -0
- package/dist/cjs/v3/react/view/fields.js +46 -0
- package/dist/cjs/v3/react/view/host.js +36 -0
- package/dist/cjs/v3/react/view/registry.js +20 -0
- package/dist/cjs/v3/react/view/root.js +37 -0
- package/dist/cjs/v3/react/view/templates.js +50 -0
- package/dist/esm/common/types/index.js +2 -0
- package/dist/esm/index.js +8 -5
- package/dist/esm/v3/document/fromDocument.js +46 -0
- package/dist/esm/v3/document/index.js +4 -0
- package/dist/esm/v3/document/render.js +18 -0
- package/dist/esm/v3/raw/compat/v2utils.js +15 -0
- package/dist/esm/v3/raw/core/arrays.js +49 -0
- package/dist/esm/v3/raw/core/choiceStyle.js +10 -0
- package/dist/esm/v3/raw/core/conditionals.js +82 -0
- package/dist/esm/v3/raw/core/dates.js +66 -0
- package/dist/esm/v3/raw/core/defaults.js +25 -0
- package/dist/esm/v3/raw/core/enums.js +32 -0
- package/dist/esm/v3/raw/core/initialValues.js +65 -0
- package/dist/esm/v3/raw/core/issues.js +36 -0
- package/dist/esm/v3/raw/core/json.js +49 -0
- package/dist/esm/v3/raw/core/merge.js +47 -0
- package/dist/esm/v3/raw/core/paths.js +79 -0
- package/dist/esm/v3/raw/core/policies/fileUploadView.js +1 -0
- package/dist/esm/v3/raw/core/policies/optionalNumberInitial.js +3 -0
- package/dist/esm/v3/raw/core/policies/storedFormats.js +2 -0
- package/dist/esm/v3/raw/core/refs.js +97 -0
- package/dist/esm/v3/raw/core/schemaType.js +68 -0
- package/dist/esm/v3/raw/core/titles.js +25 -0
- package/dist/esm/v3/raw/core/trail.js +14 -0
- package/dist/esm/v3/raw/core/uiProps.js +68 -0
- package/dist/esm/v3/raw/core/uiSchema.js +47 -0
- package/dist/esm/v3/raw/dom/bind.js +80 -0
- package/dist/esm/v3/raw/dom/build.js +23 -0
- package/dist/esm/v3/raw/dom/controller.js +83 -0
- package/dist/esm/v3/raw/dom/core.js +63 -0
- package/dist/esm/v3/raw/dom/delegate.js +25 -0
- package/dist/esm/v3/raw/dom/effects.js +62 -0
- package/dist/esm/v3/raw/dom/elements.js +84 -0
- package/dist/esm/v3/raw/dom/emitter.js +43 -0
- package/dist/esm/v3/raw/dom/nodes.js +20 -0
- package/dist/esm/v3/raw/dom/render.js +118 -0
- package/dist/esm/v3/raw/dom/upload.js +182 -0
- package/dist/esm/v3/raw/i18n/en.js +44 -0
- package/dist/esm/v3/raw/i18n/fi.js +41 -0
- package/dist/esm/v3/raw/i18n/index.js +9 -0
- package/dist/esm/v3/raw/index.js +33 -0
- package/dist/esm/v3/raw/model/classes.js +5 -0
- package/dist/esm/v3/raw/model/form/actions.js +150 -0
- package/dist/esm/v3/raw/model/form/any.js +23 -0
- package/dist/esm/v3/raw/model/form/appearance.js +27 -0
- package/dist/esm/v3/raw/model/form/array.js +65 -0
- package/dist/esm/v3/raw/model/form/choice.js +65 -0
- package/dist/esm/v3/raw/model/form/chrome.js +58 -0
- package/dist/esm/v3/raw/model/form/componentTable.js +145 -0
- package/dist/esm/v3/raw/model/form/date.js +48 -0
- package/dist/esm/v3/raw/model/form/dispatch.js +114 -0
- package/dist/esm/v3/raw/model/form/iconData.js +16 -0
- package/dist/esm/v3/raw/model/form/icons.js +6 -0
- package/dist/esm/v3/raw/model/form/index.js +32 -0
- package/dist/esm/v3/raw/model/form/leaf.js +89 -0
- package/dist/esm/v3/raw/model/form/markup.js +35 -0
- package/dist/esm/v3/raw/model/form/object.js +100 -0
- package/dist/esm/v3/raw/model/form/parts.js +21 -0
- package/dist/esm/v3/raw/model/form/searchable.js +76 -0
- package/dist/esm/v3/raw/model/form/templated.js +17 -0
- package/dist/esm/v3/raw/model/form/upload.js +81 -0
- package/dist/esm/v3/raw/model/styledChains.js +40 -0
- package/dist/esm/v3/raw/model/view/build.js +158 -0
- package/dist/esm/v3/raw/model/view/fields.js +90 -0
- package/dist/esm/v3/raw/model/view/index.js +6 -0
- package/dist/esm/v3/raw/model/view/markup.js +48 -0
- package/dist/esm/v3/raw/model/view/toVNode.js +63 -0
- package/dist/esm/v3/raw/model/view/values.js +50 -0
- package/dist/esm/v3/raw/model/vnode.js +13 -0
- package/dist/esm/v3/raw/sanitize/index.js +2 -0
- package/dist/esm/v3/raw/sanitize/sanitizeHtml.js +119 -0
- package/dist/esm/v3/raw/serialize/toDOM.js +145 -0
- package/dist/esm/v3/raw/serialize/toString.js +52 -0
- package/dist/esm/v3/raw/store/createStore.js +126 -0
- package/dist/esm/v3/raw/styles/color.js +104 -0
- package/dist/esm/v3/raw/styles/colorNames.js +27 -0
- package/dist/esm/v3/raw/styles/defaultStyles.js +111 -0
- package/dist/esm/v3/raw/styles/index.js +14 -0
- package/dist/esm/v3/raw/styles/themeToCssVars.js +55 -0
- package/dist/esm/v3/raw/styles/vars.js +24 -0
- package/dist/esm/v3/raw/validation/arrays.js +40 -0
- package/dist/esm/v3/raw/validation/conditions.js +60 -0
- package/dist/esm/v3/raw/validation/index.js +146 -0
- package/dist/esm/v3/raw/validation/keywords.js +73 -0
- package/dist/esm/v3/raw/validation/messages.js +10 -0
- package/dist/esm/v3/raw/validation/patterns.js +68 -0
- package/dist/esm/v3/react/chain.js +4 -0
- package/dist/esm/v3/react/compat.js +8 -0
- package/dist/esm/v3/react/componentsProp.js +18 -0
- package/dist/esm/v3/react/defined.js +2 -0
- package/dist/esm/v3/react/ejs/EJSField.js +67 -0
- package/dist/esm/v3/react/ejs/index.js +3 -0
- package/dist/esm/v3/react/form/components.js +101 -0
- package/dist/esm/v3/react/form/fields.js +70 -0
- package/dist/esm/v3/react/form/host.js +95 -0
- package/dist/esm/{Form/FormRegistry.js → v3/react/form/registry.js} +5 -3
- package/dist/esm/v3/react/form/root.js +38 -0
- package/dist/esm/v3/react/form/runtime.js +113 -0
- package/dist/esm/v3/react/form/templates.js +55 -0
- package/dist/esm/v3/react/form/upload.js +168 -0
- package/dist/esm/v3/react/form/uploadContexts.js +24 -0
- package/dist/esm/v3/react/form/useSetDefault.js +17 -0
- package/dist/esm/v3/react/hostCore.js +52 -0
- package/dist/esm/v3/react/index.js +18 -0
- package/dist/esm/v3/react/selector.js +13 -0
- package/dist/esm/v3/react/slots.js +15 -0
- package/dist/esm/v3/react/toReact.js +58 -0
- package/dist/esm/v3/react/view/components.js +59 -0
- package/dist/esm/v3/react/view/fields.js +43 -0
- package/dist/esm/v3/react/view/host.js +32 -0
- package/dist/esm/v3/react/view/registry.js +16 -0
- package/dist/esm/v3/react/view/root.js +33 -0
- package/dist/esm/v3/react/view/templates.js +47 -0
- package/dist/types/common/types/Form.d.ts +9 -32
- package/dist/types/common/types/Utils.d.ts +11 -0
- package/dist/types/common/types/index.d.ts +2 -0
- package/dist/types/index.d.ts +6 -4
- package/dist/types/v3/codemod/bindings.d.ts +18 -0
- package/dist/types/v3/codemod/cli.d.ts +2 -0
- package/dist/types/v3/codemod/migrate.d.ts +8 -0
- package/dist/types/v3/codemod/package.d.ts +2 -0
- package/dist/types/v3/codemod/slots.d.ts +13 -0
- package/dist/types/v3/codemod/transform.d.ts +29 -0
- package/dist/types/v3/document/fromDocument.d.ts +22 -0
- package/dist/types/v3/document/index.d.ts +4 -0
- package/dist/types/v3/document/render.d.ts +11 -0
- package/dist/types/v3/raw/compat/v2utils.d.ts +14 -0
- package/dist/types/v3/raw/core/arrays.d.ts +22 -0
- package/dist/types/v3/raw/core/choiceStyle.d.ts +4 -0
- package/dist/types/v3/raw/core/conditionals.d.ts +6 -0
- package/dist/types/v3/raw/core/dates.d.ts +8 -0
- package/dist/types/v3/raw/core/defaults.d.ts +15 -0
- package/dist/types/v3/raw/core/enums.d.ts +18 -0
- package/dist/types/v3/raw/core/initialValues.d.ts +12 -0
- package/dist/types/v3/raw/core/issues.d.ts +17 -0
- package/dist/types/v3/raw/core/json.d.ts +52 -0
- package/dist/types/v3/raw/core/merge.d.ts +6 -0
- package/dist/types/v3/raw/core/paths.d.ts +17 -0
- package/dist/types/v3/raw/core/policies/fileUploadView.d.ts +2 -0
- package/dist/types/v3/raw/core/policies/optionalNumberInitial.d.ts +4 -0
- package/dist/types/v3/raw/core/policies/storedFormats.d.ts +4 -0
- package/dist/types/v3/raw/core/refs.d.ts +41 -0
- package/dist/types/v3/raw/core/schemaType.d.ts +16 -0
- package/dist/types/v3/raw/core/titles.d.ts +2 -0
- package/dist/types/v3/raw/core/trail.d.ts +5 -0
- package/dist/types/v3/raw/core/uiProps.d.ts +12 -0
- package/dist/types/v3/raw/core/uiSchema.d.ts +19 -0
- package/dist/types/v3/raw/dom/bind.d.ts +2 -0
- package/dist/types/v3/raw/dom/build.d.ts +10 -0
- package/dist/types/v3/raw/dom/controller.d.ts +37 -0
- package/dist/types/v3/raw/dom/core.d.ts +43 -0
- package/dist/types/v3/raw/dom/delegate.d.ts +18 -0
- package/dist/types/v3/raw/dom/effects.d.ts +18 -0
- package/dist/types/v3/raw/dom/elements.d.ts +17 -0
- package/dist/types/v3/raw/dom/emitter.d.ts +8 -0
- package/dist/types/v3/raw/dom/nodes.d.ts +3 -0
- package/dist/types/v3/raw/dom/render.d.ts +2 -0
- package/dist/types/v3/raw/dom/types.d.ts +112 -0
- package/dist/types/v3/raw/dom/upload.d.ts +16 -0
- package/dist/types/v3/raw/i18n/en.d.ts +42 -0
- package/dist/types/v3/raw/i18n/fi.d.ts +2 -0
- package/dist/types/v3/raw/i18n/index.d.ts +9 -0
- package/dist/types/v3/raw/index.d.ts +43 -0
- package/dist/types/v3/raw/model/classes.d.ts +2 -0
- package/dist/types/v3/raw/model/form/actions.d.ts +41 -0
- package/dist/types/v3/raw/model/form/any.d.ts +5 -0
- package/dist/types/v3/raw/model/form/appearance.d.ts +9 -0
- package/dist/types/v3/raw/model/form/array.d.ts +4 -0
- package/dist/types/v3/raw/model/form/choice.d.ts +16 -0
- package/dist/types/v3/raw/model/form/chrome.d.ts +20 -0
- package/dist/types/v3/raw/model/form/componentTable.d.ts +2 -0
- package/dist/types/v3/raw/model/form/date.d.ts +13 -0
- package/dist/types/v3/raw/model/form/dispatch.d.ts +13 -0
- package/dist/types/v3/raw/model/form/iconData.d.ts +4 -0
- package/dist/types/v3/raw/model/form/icons.d.ts +2 -0
- package/dist/types/v3/raw/model/form/index.d.ts +38 -0
- package/dist/types/v3/raw/model/form/leaf.d.ts +29 -0
- package/dist/types/v3/raw/model/form/markup.d.ts +39 -0
- package/dist/types/v3/raw/model/form/object.d.ts +9 -0
- package/dist/types/v3/raw/model/form/parts.d.ts +10 -0
- package/dist/types/v3/raw/model/form/searchable.d.ts +5 -0
- package/dist/types/v3/raw/model/form/templated.d.ts +14 -0
- package/dist/types/v3/raw/model/form/types.d.ts +179 -0
- package/dist/types/v3/raw/model/form/upload.d.ts +28 -0
- package/dist/types/v3/raw/model/host.d.ts +46 -0
- package/dist/types/v3/raw/model/styledChains.d.ts +1 -0
- package/dist/types/v3/raw/model/view/build.d.ts +21 -0
- package/dist/types/v3/raw/model/view/fields.d.ts +31 -0
- package/dist/types/v3/raw/model/view/index.d.ts +6 -0
- package/dist/types/v3/raw/model/view/markup.d.ts +39 -0
- package/dist/types/v3/raw/model/view/toVNode.d.ts +3 -0
- package/dist/types/v3/raw/model/view/types.d.ts +109 -0
- package/dist/types/v3/raw/model/view/values.d.ts +10 -0
- package/dist/types/v3/raw/model/vnode.d.ts +24 -0
- package/dist/types/v3/raw/sanitize/index.d.ts +2 -0
- package/dist/types/v3/raw/sanitize/sanitizeHtml.d.ts +30 -0
- package/dist/types/v3/raw/serialize/toDOM.d.ts +14 -0
- package/dist/types/v3/raw/serialize/toString.d.ts +4 -0
- package/dist/types/v3/raw/store/createStore.d.ts +39 -0
- package/dist/types/v3/raw/styles/color.d.ts +15 -0
- package/dist/types/v3/raw/styles/colorNames.d.ts +1 -0
- package/dist/types/v3/raw/styles/defaultStyles.d.ts +1 -0
- package/dist/types/v3/raw/styles/index.d.ts +8 -0
- package/dist/types/v3/raw/styles/themeToCssVars.d.ts +4 -0
- package/dist/types/v3/raw/styles/vars.d.ts +43 -0
- package/dist/types/v3/raw/validation/arrays.d.ts +16 -0
- package/dist/types/v3/raw/validation/conditions.d.ts +10 -0
- package/dist/types/v3/raw/validation/index.d.ts +30 -0
- package/dist/types/v3/raw/validation/keywords.d.ts +10 -0
- package/dist/types/v3/raw/validation/messages.d.ts +8 -0
- package/dist/types/v3/raw/validation/patterns.d.ts +8 -0
- package/dist/types/v3/react/chain.d.ts +1 -0
- package/dist/types/v3/react/compat.d.ts +4 -0
- package/dist/types/v3/react/componentsProp.d.ts +5 -0
- package/dist/types/v3/react/defined.d.ts +1 -0
- package/dist/types/v3/react/ejs/EJSField.d.ts +14 -0
- package/dist/types/v3/react/ejs/index.d.ts +1 -0
- package/dist/types/v3/react/form/components.d.ts +3 -0
- package/dist/types/v3/react/form/fields.d.ts +8 -0
- package/dist/types/v3/react/form/host.d.ts +9 -0
- package/dist/types/v3/react/form/registry.d.ts +46 -0
- package/dist/types/v3/react/form/root.d.ts +32 -0
- package/dist/types/v3/react/form/runtime.d.ts +3 -0
- package/dist/types/v3/react/form/templates.d.ts +1 -0
- package/dist/types/v3/react/form/upload.d.ts +3 -0
- package/dist/types/v3/react/form/uploadContexts.d.ts +34 -0
- package/dist/types/v3/react/form/useSetDefault.d.ts +5 -0
- package/dist/types/v3/react/hostCore.d.ts +24 -0
- package/dist/types/v3/react/index.d.ts +23 -0
- package/dist/types/v3/react/selector.d.ts +10 -0
- package/dist/types/v3/react/slots.d.ts +4 -0
- package/dist/types/v3/react/toReact.d.ts +10 -0
- package/dist/types/v3/react/view/components.d.ts +8 -0
- package/dist/types/v3/react/view/fields.d.ts +4 -0
- package/dist/types/v3/react/view/host.d.ts +6 -0
- package/dist/types/v3/react/view/registry.d.ts +34 -0
- package/dist/types/v3/react/view/root.d.ts +32 -0
- package/dist/types/v3/react/view/templates.d.ts +15 -0
- package/package.json +97 -11
- package/styles.css +187 -0
- package/dist/cjs/Form/Form.js +0 -38
- package/dist/cjs/Form/components/Clickable.js +0 -11
- package/dist/cjs/Form/components/ErrorMessage.js +0 -23
- package/dist/cjs/Form/components/FieldInfo.js +0 -144
- package/dist/cjs/Form/components/FieldInput.js +0 -86
- package/dist/cjs/Form/components/Form.js +0 -52
- package/dist/cjs/Form/components/Icon.js +0 -5
- package/dist/cjs/Form/components/RequiredIndicator.js +0 -9
- package/dist/cjs/Form/components/index.js +0 -58
- package/dist/cjs/Form/fields/AnyField/AnyField.js +0 -30
- package/dist/cjs/Form/fields/AnyField/index.js +0 -38
- package/dist/cjs/Form/fields/AnyField/styledComponents.js +0 -6
- package/dist/cjs/Form/fields/ArrayField/ArrayField.js +0 -130
- package/dist/cjs/Form/fields/ArrayField/index.js +0 -38
- package/dist/cjs/Form/fields/ArrayField/styledComponents.js +0 -22
- package/dist/cjs/Form/fields/BooleanField/BooleanField.js +0 -26
- package/dist/cjs/Form/fields/BooleanField/index.js +0 -38
- package/dist/cjs/Form/fields/BooleanField/styledComponents.js +0 -18
- package/dist/cjs/Form/fields/DateField/DateField.js +0 -26
- package/dist/cjs/Form/fields/DateField/DateInput.js +0 -121
- package/dist/cjs/Form/fields/DateField/dateParsing.js +0 -68
- package/dist/cjs/Form/fields/DateField/index.js +0 -42
- package/dist/cjs/Form/fields/DateField/styledComponents.js +0 -60
- package/dist/cjs/Form/fields/FileUploadField/FileUploadField.js +0 -69
- package/dist/cjs/Form/fields/FileUploadField/FileUploadFieldInput.js +0 -21
- package/dist/cjs/Form/fields/FileUploadField/index.js +0 -41
- package/dist/cjs/Form/fields/FileUploadField/styledComponents.js +0 -63
- package/dist/cjs/Form/fields/FilesUploadField/FilesUploadField.js +0 -102
- package/dist/cjs/Form/fields/FilesUploadField/FilesUploadFieldInput.js +0 -174
- package/dist/cjs/Form/fields/FilesUploadField/index.js +0 -41
- package/dist/cjs/Form/fields/FilesUploadField/styledComponents.js +0 -217
- package/dist/cjs/Form/fields/MultipleChoiceField/MultipleChoiceField.js +0 -35
- package/dist/cjs/Form/fields/MultipleChoiceField/MultipleChoiceFieldInput.js +0 -40
- package/dist/cjs/Form/fields/MultipleChoiceField/index.js +0 -41
- package/dist/cjs/Form/fields/MultipleChoiceField/styledComponents.js +0 -24
- package/dist/cjs/Form/fields/NullField/NullField.js +0 -15
- package/dist/cjs/Form/fields/NullField/index.js +0 -37
- package/dist/cjs/Form/fields/NumberField/NumberField.js +0 -16
- package/dist/cjs/Form/fields/NumberField/index.js +0 -38
- package/dist/cjs/Form/fields/NumberField/styledComponents.js +0 -6
- package/dist/cjs/Form/fields/ObjectField/ObjectField.js +0 -190
- package/dist/cjs/Form/fields/ObjectField/ObjectFieldSection.js +0 -17
- package/dist/cjs/Form/fields/ObjectField/index.js +0 -41
- package/dist/cjs/Form/fields/ObjectField/styledComponents.js +0 -50
- package/dist/cjs/Form/fields/ObjectField/types.js +0 -10
- package/dist/cjs/Form/fields/RadioField/RadioField.js +0 -19
- package/dist/cjs/Form/fields/RadioField/RadioFieldInput.js +0 -11
- package/dist/cjs/Form/fields/RadioField/index.js +0 -41
- package/dist/cjs/Form/fields/RadioField/styledComponents.js +0 -78
- package/dist/cjs/Form/fields/SchemaField/SchemaField.js +0 -38
- package/dist/cjs/Form/fields/SchemaField/index.js +0 -37
- package/dist/cjs/Form/fields/SearchableMultiTagSelectField/SearchableMultiTagSelectField.js +0 -20
- package/dist/cjs/Form/fields/SearchableMultiTagSelectField/SearchableMultiTagSelectFieldInput.js +0 -27
- package/dist/cjs/Form/fields/SearchableMultiTagSelectField/index.js +0 -41
- package/dist/cjs/Form/fields/SearchableMultiTagSelectField/styledComponents.js +0 -71
- package/dist/cjs/Form/fields/SearchableSelectField/SearchableSelectField.js +0 -147
- package/dist/cjs/Form/fields/SearchableSelectField/index.js +0 -40
- package/dist/cjs/Form/fields/SearchableSelectField/styledComponents.js +0 -53
- package/dist/cjs/Form/fields/StringField/StringField.js +0 -44
- package/dist/cjs/Form/fields/StringField/index.js +0 -37
- package/dist/cjs/Form/fields/StringField/styledComponents.js +0 -6
- package/dist/cjs/Form/fields/TextAreaField/TextAreaField.js +0 -21
- package/dist/cjs/Form/fields/TextAreaField/index.js +0 -38
- package/dist/cjs/Form/fields/TextAreaField/styledComponents.js +0 -17
- package/dist/cjs/Form/fields/ToggleField/ToggleField.js +0 -19
- package/dist/cjs/Form/fields/ToggleField/ToggleFieldInput.js +0 -11
- package/dist/cjs/Form/fields/ToggleField/index.js +0 -41
- package/dist/cjs/Form/fields/ToggleField/styledComponents.js +0 -58
- package/dist/cjs/Form/fields/index.js +0 -93
- package/dist/cjs/Form/hooks/index.js +0 -17
- package/dist/cjs/Form/hooks/useSetDefault.js +0 -32
- package/dist/cjs/Form/index.js +0 -26
- package/dist/cjs/Form/styles/common.js +0 -259
- package/dist/cjs/Form/templates/ArrayFieldTemplate/ArrayFieldTemplate.js +0 -36
- package/dist/cjs/Form/templates/ArrayFieldTemplate/index.js +0 -38
- package/dist/cjs/Form/templates/ArrayFieldTemplate/styledComponents.js +0 -28
- package/dist/cjs/Form/templates/CollapsibleObjectFieldTemplate/CollapsibleObjectFieldTemplate.js +0 -41
- package/dist/cjs/Form/templates/CollapsibleObjectFieldTemplate/index.js +0 -38
- package/dist/cjs/Form/templates/CollapsibleObjectFieldTemplate/styledComponents.js +0 -55
- package/dist/cjs/Form/templates/FieldTemplate/FieldTemplate.js +0 -28
- package/dist/cjs/Form/templates/FieldTemplate/index.js +0 -37
- package/dist/cjs/Form/templates/ObjectFieldTemplate/ObjectFieldTemplate.js +0 -32
- package/dist/cjs/Form/templates/ObjectFieldTemplate/index.js +0 -38
- package/dist/cjs/Form/templates/ObjectFieldTemplate/styledComponents.js +0 -57
- package/dist/cjs/Form/templates/index.js +0 -55
- package/dist/cjs/Form/types/index.js +0 -17
- package/dist/cjs/FormView/FormView.js +0 -36
- package/dist/cjs/FormView/FormViewRegistry.js +0 -19
- package/dist/cjs/FormView/components/Field.js +0 -131
- package/dist/cjs/FormView/components/Form.js +0 -9
- package/dist/cjs/FormView/components/Icon.js +0 -7
- package/dist/cjs/FormView/components/index.js +0 -56
- package/dist/cjs/FormView/fields/AnyField.js +0 -26
- package/dist/cjs/FormView/fields/ArrayField.js +0 -32
- package/dist/cjs/FormView/fields/BooleanField.js +0 -33
- package/dist/cjs/FormView/fields/DateField.js +0 -12
- package/dist/cjs/FormView/fields/EJSField.js +0 -39
- package/dist/cjs/FormView/fields/FileUploadField.js +0 -7
- package/dist/cjs/FormView/fields/FilesUploadField.js +0 -7
- package/dist/cjs/FormView/fields/MultipleChoiceField.js +0 -30
- package/dist/cjs/FormView/fields/NullField.js +0 -14
- package/dist/cjs/FormView/fields/NumberField.js +0 -12
- package/dist/cjs/FormView/fields/ObjectField/ObjectField.js +0 -57
- package/dist/cjs/FormView/fields/ObjectField/ObjectFieldSection.js +0 -11
- package/dist/cjs/FormView/fields/ObjectField/index.js +0 -41
- package/dist/cjs/FormView/fields/ObjectField/styledComponents.js +0 -6
- package/dist/cjs/FormView/fields/RadioField.js +0 -15
- package/dist/cjs/FormView/fields/SchemaField.js +0 -38
- package/dist/cjs/FormView/fields/SearchableMultiTagSelectField.js +0 -14
- package/dist/cjs/FormView/fields/SearchableSelectField.js +0 -13
- package/dist/cjs/FormView/fields/StringField.js +0 -24
- package/dist/cjs/FormView/fields/TextAreaField.js +0 -18
- package/dist/cjs/FormView/fields/ToggleField.js +0 -15
- package/dist/cjs/FormView/fields/index.js +0 -81
- package/dist/cjs/FormView/index.js +0 -25
- package/dist/cjs/FormView/templates/ArrayFieldTemplate/ArrayFieldTemplate.js +0 -20
- package/dist/cjs/FormView/templates/ArrayFieldTemplate/index.js +0 -38
- package/dist/cjs/FormView/templates/ArrayFieldTemplate/styledComponents.js +0 -15
- package/dist/cjs/FormView/templates/FieldTemplate/FieldTemplate.js +0 -18
- package/dist/cjs/FormView/templates/FieldTemplate/index.js +0 -37
- package/dist/cjs/FormView/templates/ObjectFieldTemplate/ObjectFieldTemplate.js +0 -30
- package/dist/cjs/FormView/templates/ObjectFieldTemplate/index.js +0 -38
- package/dist/cjs/FormView/templates/ObjectFieldTemplate/styledComponents.js +0 -65
- package/dist/cjs/FormView/templates/index.js +0 -52
- package/dist/cjs/common/FileUploadContext.js +0 -15
- package/dist/cjs/common/FilesUploadContext.js +0 -14
- package/dist/cjs/common/constants.js +0 -13
- package/dist/cjs/common/index.js +0 -20
- package/dist/cjs/utils/createInitialValues.js +0 -38
- package/dist/cjs/utils/createValidationSchema.js +0 -397
- package/dist/cjs/utils/deepOverlap.js +0 -18
- package/dist/cjs/utils/extractUiSchema.js +0 -22
- package/dist/cjs/utils/getEnums.js +0 -56
- package/dist/cjs/utils/getHiddenProperties.js +0 -11
- package/dist/cjs/utils/getStyle.js +0 -21
- package/dist/cjs/utils/getTitleAndDescription.js +0 -19
- package/dist/cjs/utils/getTypes.js +0 -60
- package/dist/cjs/utils/immutablySwapItems.js +0 -10
- package/dist/cjs/utils/index.js +0 -31
- package/dist/cjs/utils/mergeSchemas.js +0 -30
- package/dist/cjs/utils/orderAdditionalProperties.js +0 -12
- package/dist/cjs/utils/orderByUiSchema.js +0 -29
- package/dist/cjs/utils/resolveSchema.js +0 -117
- package/dist/cjs/utils/setTitleValues.js +0 -25
- package/dist/cjs/utils/solveReferences.js +0 -25
- package/dist/esm/Form/Form.js +0 -34
- package/dist/esm/Form/components/Clickable.js +0 -7
- package/dist/esm/Form/components/ErrorMessage.js +0 -16
- package/dist/esm/Form/components/FieldInfo.js +0 -140
- package/dist/esm/Form/components/FieldInput.js +0 -50
- package/dist/esm/Form/components/Form.js +0 -13
- package/dist/esm/Form/components/Icon.js +0 -2
- package/dist/esm/Form/components/RequiredIndicator.js +0 -6
- package/dist/esm/Form/components/index.js +0 -22
- package/dist/esm/Form/fields/AnyField/AnyField.js +0 -26
- package/dist/esm/Form/fields/AnyField/index.js +0 -2
- package/dist/esm/Form/fields/AnyField/styledComponents.js +0 -3
- package/dist/esm/Form/fields/ArrayField/ArrayField.js +0 -126
- package/dist/esm/Form/fields/ArrayField/index.js +0 -2
- package/dist/esm/Form/fields/ArrayField/styledComponents.js +0 -16
- package/dist/esm/Form/fields/BooleanField/BooleanField.js +0 -22
- package/dist/esm/Form/fields/BooleanField/index.js +0 -2
- package/dist/esm/Form/fields/BooleanField/styledComponents.js +0 -15
- package/dist/esm/Form/fields/DateField/DateField.js +0 -22
- package/dist/esm/Form/fields/DateField/DateInput.js +0 -117
- package/dist/esm/Form/fields/DateField/dateParsing.js +0 -62
- package/dist/esm/Form/fields/DateField/index.js +0 -3
- package/dist/esm/Form/fields/DateField/styledComponents.js +0 -54
- package/dist/esm/Form/fields/FileUploadField/FileUploadField.js +0 -65
- package/dist/esm/Form/fields/FileUploadField/FileUploadFieldInput.js +0 -17
- package/dist/esm/Form/fields/FileUploadField/index.js +0 -5
- package/dist/esm/Form/fields/FileUploadField/styledComponents.js +0 -57
- package/dist/esm/Form/fields/FilesUploadField/FilesUploadField.js +0 -98
- package/dist/esm/Form/fields/FilesUploadField/FilesUploadFieldInput.js +0 -137
- package/dist/esm/Form/fields/FilesUploadField/index.js +0 -5
- package/dist/esm/Form/fields/FilesUploadField/styledComponents.js +0 -211
- package/dist/esm/Form/fields/MultipleChoiceField/MultipleChoiceField.js +0 -31
- package/dist/esm/Form/fields/MultipleChoiceField/MultipleChoiceFieldInput.js +0 -36
- package/dist/esm/Form/fields/MultipleChoiceField/index.js +0 -5
- package/dist/esm/Form/fields/MultipleChoiceField/styledComponents.js +0 -18
- package/dist/esm/Form/fields/NullField/NullField.js +0 -11
- package/dist/esm/Form/fields/NullField/index.js +0 -1
- package/dist/esm/Form/fields/NumberField/NumberField.js +0 -12
- package/dist/esm/Form/fields/NumberField/index.js +0 -2
- package/dist/esm/Form/fields/NumberField/styledComponents.js +0 -3
- package/dist/esm/Form/fields/ObjectField/ObjectField.js +0 -186
- package/dist/esm/Form/fields/ObjectField/ObjectFieldSection.js +0 -13
- package/dist/esm/Form/fields/ObjectField/index.js +0 -5
- package/dist/esm/Form/fields/ObjectField/styledComponents.js +0 -47
- package/dist/esm/Form/fields/ObjectField/types.js +0 -7
- package/dist/esm/Form/fields/RadioField/RadioField.js +0 -15
- package/dist/esm/Form/fields/RadioField/RadioFieldInput.js +0 -7
- package/dist/esm/Form/fields/RadioField/index.js +0 -5
- package/dist/esm/Form/fields/RadioField/styledComponents.js +0 -75
- package/dist/esm/Form/fields/SchemaField/SchemaField.js +0 -34
- package/dist/esm/Form/fields/SchemaField/index.js +0 -1
- package/dist/esm/Form/fields/SearchableMultiTagSelectField/SearchableMultiTagSelectField.js +0 -16
- package/dist/esm/Form/fields/SearchableMultiTagSelectField/SearchableMultiTagSelectFieldInput.js +0 -23
- package/dist/esm/Form/fields/SearchableMultiTagSelectField/index.js +0 -5
- package/dist/esm/Form/fields/SearchableMultiTagSelectField/styledComponents.js +0 -68
- package/dist/esm/Form/fields/SearchableSelectField/SearchableSelectField.js +0 -143
- package/dist/esm/Form/fields/SearchableSelectField/index.js +0 -4
- package/dist/esm/Form/fields/SearchableSelectField/styledComponents.js +0 -50
- package/dist/esm/Form/fields/StringField/StringField.js +0 -40
- package/dist/esm/Form/fields/StringField/index.js +0 -1
- package/dist/esm/Form/fields/StringField/styledComponents.js +0 -3
- package/dist/esm/Form/fields/TextAreaField/TextAreaField.js +0 -17
- package/dist/esm/Form/fields/TextAreaField/index.js +0 -2
- package/dist/esm/Form/fields/TextAreaField/styledComponents.js +0 -11
- package/dist/esm/Form/fields/ToggleField/ToggleField.js +0 -15
- package/dist/esm/Form/fields/ToggleField/ToggleFieldInput.js +0 -7
- package/dist/esm/Form/fields/ToggleField/index.js +0 -5
- package/dist/esm/Form/fields/ToggleField/styledComponents.js +0 -55
- package/dist/esm/Form/fields/index.js +0 -57
- package/dist/esm/Form/hooks/index.js +0 -1
- package/dist/esm/Form/hooks/useSetDefault.js +0 -28
- package/dist/esm/Form/index.js +0 -7
- package/dist/esm/Form/styles/common.js +0 -256
- package/dist/esm/Form/templates/ArrayFieldTemplate/ArrayFieldTemplate.js +0 -32
- package/dist/esm/Form/templates/ArrayFieldTemplate/index.js +0 -2
- package/dist/esm/Form/templates/ArrayFieldTemplate/styledComponents.js +0 -24
- package/dist/esm/Form/templates/CollapsibleObjectFieldTemplate/CollapsibleObjectFieldTemplate.js +0 -37
- package/dist/esm/Form/templates/CollapsibleObjectFieldTemplate/index.js +0 -2
- package/dist/esm/Form/templates/CollapsibleObjectFieldTemplate/styledComponents.js +0 -51
- package/dist/esm/Form/templates/FieldTemplate/FieldTemplate.js +0 -24
- package/dist/esm/Form/templates/FieldTemplate/index.js +0 -1
- package/dist/esm/Form/templates/ObjectFieldTemplate/ObjectFieldTemplate.js +0 -28
- package/dist/esm/Form/templates/ObjectFieldTemplate/index.js +0 -2
- package/dist/esm/Form/templates/ObjectFieldTemplate/styledComponents.js +0 -53
- package/dist/esm/Form/templates/index.js +0 -19
- package/dist/esm/Form/types/index.js +0 -1
- package/dist/esm/FormView/FormView.js +0 -29
- package/dist/esm/FormView/FormViewRegistry.js +0 -13
- package/dist/esm/FormView/components/Field.js +0 -123
- package/dist/esm/FormView/components/Form.js +0 -6
- package/dist/esm/FormView/components/Icon.js +0 -4
- package/dist/esm/FormView/components/index.js +0 -17
- package/dist/esm/FormView/fields/AnyField.js +0 -22
- package/dist/esm/FormView/fields/ArrayField.js +0 -28
- package/dist/esm/FormView/fields/BooleanField.js +0 -29
- package/dist/esm/FormView/fields/DateField.js +0 -8
- package/dist/esm/FormView/fields/EJSField.js +0 -32
- package/dist/esm/FormView/fields/FileUploadField.js +0 -3
- package/dist/esm/FormView/fields/FilesUploadField.js +0 -3
- package/dist/esm/FormView/fields/MultipleChoiceField.js +0 -26
- package/dist/esm/FormView/fields/NullField.js +0 -10
- package/dist/esm/FormView/fields/NumberField.js +0 -8
- package/dist/esm/FormView/fields/ObjectField/ObjectField.js +0 -53
- package/dist/esm/FormView/fields/ObjectField/ObjectFieldSection.js +0 -7
- package/dist/esm/FormView/fields/ObjectField/index.js +0 -5
- package/dist/esm/FormView/fields/ObjectField/styledComponents.js +0 -3
- package/dist/esm/FormView/fields/RadioField.js +0 -11
- package/dist/esm/FormView/fields/SchemaField.js +0 -34
- package/dist/esm/FormView/fields/SearchableMultiTagSelectField.js +0 -10
- package/dist/esm/FormView/fields/SearchableSelectField.js +0 -9
- package/dist/esm/FormView/fields/StringField.js +0 -20
- package/dist/esm/FormView/fields/TextAreaField.js +0 -14
- package/dist/esm/FormView/fields/ToggleField.js +0 -11
- package/dist/esm/FormView/fields/index.js +0 -45
- package/dist/esm/FormView/index.js +0 -6
- package/dist/esm/FormView/templates/ArrayFieldTemplate/ArrayFieldTemplate.js +0 -16
- package/dist/esm/FormView/templates/ArrayFieldTemplate/index.js +0 -2
- package/dist/esm/FormView/templates/ArrayFieldTemplate/styledComponents.js +0 -11
- package/dist/esm/FormView/templates/FieldTemplate/FieldTemplate.js +0 -14
- package/dist/esm/FormView/templates/FieldTemplate/index.js +0 -1
- package/dist/esm/FormView/templates/ObjectFieldTemplate/ObjectFieldTemplate.js +0 -26
- package/dist/esm/FormView/templates/ObjectFieldTemplate/index.js +0 -2
- package/dist/esm/FormView/templates/ObjectFieldTemplate/styledComponents.js +0 -58
- package/dist/esm/FormView/templates/index.js +0 -16
- package/dist/esm/common/FileUploadContext.js +0 -12
- package/dist/esm/common/FilesUploadContext.js +0 -11
- package/dist/esm/common/constants.js +0 -10
- package/dist/esm/common/index.js +0 -4
- package/dist/esm/utils/createInitialValues.js +0 -35
- package/dist/esm/utils/createValidationSchema.js +0 -361
- package/dist/esm/utils/deepOverlap.js +0 -14
- package/dist/esm/utils/extractUiSchema.js +0 -18
- package/dist/esm/utils/getEnums.js +0 -51
- package/dist/esm/utils/getHiddenProperties.js +0 -7
- package/dist/esm/utils/getStyle.js +0 -18
- package/dist/esm/utils/getTitleAndDescription.js +0 -14
- package/dist/esm/utils/getTypes.js +0 -53
- package/dist/esm/utils/immutablySwapItems.js +0 -7
- package/dist/esm/utils/index.js +0 -15
- package/dist/esm/utils/mergeSchemas.js +0 -26
- package/dist/esm/utils/orderAdditionalProperties.js +0 -9
- package/dist/esm/utils/orderByUiSchema.js +0 -26
- package/dist/esm/utils/resolveSchema.js +0 -112
- package/dist/esm/utils/setTitleValues.js +0 -21
- package/dist/esm/utils/solveReferences.js +0 -22
- package/dist/types/Form/Form.d.ts +0 -2
- package/dist/types/Form/FormRegistry.d.ts +0 -3
- package/dist/types/Form/components/Clickable.d.ts +0 -15
- package/dist/types/Form/components/ErrorMessage.d.ts +0 -3
- package/dist/types/Form/components/FieldInfo.d.ts +0 -10
- package/dist/types/Form/components/FieldInput.d.ts +0 -19
- package/dist/types/Form/components/Form.d.ts +0 -6
- package/dist/types/Form/components/Icon.d.ts +0 -1
- package/dist/types/Form/components/RequiredIndicator.d.ts +0 -1
- package/dist/types/Form/components/index.d.ts +0 -249
- package/dist/types/Form/fields/AnyField/AnyField.d.ts +0 -2
- package/dist/types/Form/fields/AnyField/index.d.ts +0 -2
- package/dist/types/Form/fields/AnyField/styledComponents.d.ts +0 -3
- package/dist/types/Form/fields/ArrayField/ArrayField.d.ts +0 -2
- package/dist/types/Form/fields/ArrayField/index.d.ts +0 -2
- package/dist/types/Form/fields/ArrayField/styledComponents.d.ts +0 -13
- package/dist/types/Form/fields/BooleanField/BooleanField.d.ts +0 -2
- package/dist/types/Form/fields/BooleanField/index.d.ts +0 -2
- package/dist/types/Form/fields/BooleanField/styledComponents.d.ts +0 -3
- package/dist/types/Form/fields/DateField/DateField.d.ts +0 -2
- package/dist/types/Form/fields/DateField/DateInput.d.ts +0 -17
- package/dist/types/Form/fields/DateField/dateParsing.d.ts +0 -9
- package/dist/types/Form/fields/DateField/index.d.ts +0 -3
- package/dist/types/Form/fields/DateField/styledComponents.d.ts +0 -4
- package/dist/types/Form/fields/FileUploadField/FileUploadField.d.ts +0 -2
- package/dist/types/Form/fields/FileUploadField/FileUploadFieldInput.d.ts +0 -25
- package/dist/types/Form/fields/FileUploadField/index.d.ts +0 -17
- package/dist/types/Form/fields/FileUploadField/styledComponents.d.ts +0 -11
- package/dist/types/Form/fields/FilesUploadField/FilesUploadField.d.ts +0 -2
- package/dist/types/Form/fields/FilesUploadField/FilesUploadFieldInput.d.ts +0 -42
- package/dist/types/Form/fields/FilesUploadField/index.d.ts +0 -37
- package/dist/types/Form/fields/FilesUploadField/styledComponents.d.ts +0 -32
- package/dist/types/Form/fields/MultipleChoiceField/MultipleChoiceField.d.ts +0 -2
- package/dist/types/Form/fields/MultipleChoiceField/MultipleChoiceFieldInput.d.ts +0 -17
- package/dist/types/Form/fields/MultipleChoiceField/index.d.ts +0 -22
- package/dist/types/Form/fields/MultipleChoiceField/styledComponents.d.ts +0 -16
- package/dist/types/Form/fields/NullField/NullField.d.ts +0 -2
- package/dist/types/Form/fields/NullField/index.d.ts +0 -1
- package/dist/types/Form/fields/NumberField/NumberField.d.ts +0 -2
- package/dist/types/Form/fields/NumberField/index.d.ts +0 -2
- package/dist/types/Form/fields/NumberField/styledComponents.d.ts +0 -1
- package/dist/types/Form/fields/ObjectField/ObjectField.d.ts +0 -2
- package/dist/types/Form/fields/ObjectField/ObjectFieldSection.d.ts +0 -3
- package/dist/types/Form/fields/ObjectField/index.d.ts +0 -20
- package/dist/types/Form/fields/ObjectField/styledComponents.d.ts +0 -15
- package/dist/types/Form/fields/ObjectField/types.d.ts +0 -19
- package/dist/types/Form/fields/RadioField/RadioField.d.ts +0 -2
- package/dist/types/Form/fields/RadioField/RadioFieldInput.d.ts +0 -11
- package/dist/types/Form/fields/RadioField/index.d.ts +0 -22
- package/dist/types/Form/fields/RadioField/styledComponents.d.ts +0 -16
- package/dist/types/Form/fields/SchemaField/SchemaField.d.ts +0 -2
- package/dist/types/Form/fields/SchemaField/index.d.ts +0 -1
- package/dist/types/Form/fields/SearchableMultiTagSelectField/SearchableMultiTagSelectField.d.ts +0 -2
- package/dist/types/Form/fields/SearchableMultiTagSelectField/SearchableMultiTagSelectFieldInput.d.ts +0 -11
- package/dist/types/Form/fields/SearchableMultiTagSelectField/index.d.ts +0 -21
- package/dist/types/Form/fields/SearchableMultiTagSelectField/styledComponents.d.ts +0 -15
- package/dist/types/Form/fields/SearchableSelectField/SearchableSelectField.d.ts +0 -2
- package/dist/types/Form/fields/SearchableSelectField/index.d.ts +0 -2
- package/dist/types/Form/fields/SearchableSelectField/styledComponents.d.ts +0 -22
- package/dist/types/Form/fields/SearchableSelectField/types.d.ts +0 -25
- package/dist/types/Form/fields/StringField/StringField.d.ts +0 -2
- package/dist/types/Form/fields/StringField/index.d.ts +0 -1
- package/dist/types/Form/fields/StringField/styledComponents.d.ts +0 -3
- package/dist/types/Form/fields/TextAreaField/TextAreaField.d.ts +0 -2
- package/dist/types/Form/fields/TextAreaField/index.d.ts +0 -2
- package/dist/types/Form/fields/TextAreaField/styledComponents.d.ts +0 -5
- package/dist/types/Form/fields/ToggleField/ToggleField.d.ts +0 -2
- package/dist/types/Form/fields/ToggleField/ToggleFieldInput.d.ts +0 -6
- package/dist/types/Form/fields/ToggleField/index.d.ts +0 -13
- package/dist/types/Form/fields/ToggleField/styledComponents.d.ts +0 -7
- package/dist/types/Form/fields/index.d.ts +0 -191
- package/dist/types/Form/hooks/index.d.ts +0 -1
- package/dist/types/Form/hooks/useSetDefault.d.ts +0 -2
- package/dist/types/Form/index.d.ts +0 -8
- package/dist/types/Form/styles/common.d.ts +0 -2
- package/dist/types/Form/templates/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +0 -2
- package/dist/types/Form/templates/ArrayFieldTemplate/index.d.ts +0 -2
- package/dist/types/Form/templates/ArrayFieldTemplate/styledComponents.d.ts +0 -30
- package/dist/types/Form/templates/CollapsibleObjectFieldTemplate/CollapsibleObjectFieldTemplate.d.ts +0 -2
- package/dist/types/Form/templates/CollapsibleObjectFieldTemplate/index.d.ts +0 -2
- package/dist/types/Form/templates/CollapsibleObjectFieldTemplate/styledComponents.d.ts +0 -36
- package/dist/types/Form/templates/FieldTemplate/FieldTemplate.d.ts +0 -2
- package/dist/types/Form/templates/FieldTemplate/index.d.ts +0 -1
- package/dist/types/Form/templates/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +0 -2
- package/dist/types/Form/templates/ObjectFieldTemplate/index.d.ts +0 -2
- package/dist/types/Form/templates/ObjectFieldTemplate/styledComponents.d.ts +0 -27
- package/dist/types/Form/templates/index.d.ts +0 -57
- package/dist/types/Form/types/FormRegistryContext.d.ts +0 -23
- package/dist/types/Form/types/index.d.ts +0 -1
- package/dist/types/FormView/FormView.d.ts +0 -4
- package/dist/types/FormView/FormViewRegistry.d.ts +0 -3
- package/dist/types/FormView/components/Field.d.ts +0 -35
- package/dist/types/FormView/components/Form.d.ts +0 -1
- package/dist/types/FormView/components/Icon.d.ts +0 -1
- package/dist/types/FormView/components/index.d.ts +0 -53
- package/dist/types/FormView/fields/AnyField.d.ts +0 -2
- package/dist/types/FormView/fields/ArrayField.d.ts +0 -2
- package/dist/types/FormView/fields/BooleanField.d.ts +0 -2
- package/dist/types/FormView/fields/DateField.d.ts +0 -2
- package/dist/types/FormView/fields/EJSField.d.ts +0 -2
- package/dist/types/FormView/fields/FileUploadField.d.ts +0 -2
- package/dist/types/FormView/fields/FilesUploadField.d.ts +0 -2
- package/dist/types/FormView/fields/MultipleChoiceField.d.ts +0 -2
- package/dist/types/FormView/fields/NullField.d.ts +0 -2
- package/dist/types/FormView/fields/NumberField.d.ts +0 -2
- package/dist/types/FormView/fields/ObjectField/ObjectField.d.ts +0 -2
- package/dist/types/FormView/fields/ObjectField/ObjectFieldSection.d.ts +0 -7
- package/dist/types/FormView/fields/ObjectField/index.d.ts +0 -8
- package/dist/types/FormView/fields/ObjectField/styledComponents.d.ts +0 -2
- package/dist/types/FormView/fields/RadioField.d.ts +0 -2
- package/dist/types/FormView/fields/SchemaField.d.ts +0 -2
- package/dist/types/FormView/fields/SearchableMultiTagSelectField.d.ts +0 -2
- package/dist/types/FormView/fields/SearchableSelectField.d.ts +0 -2
- package/dist/types/FormView/fields/StringField.d.ts +0 -2
- package/dist/types/FormView/fields/TextAreaField.d.ts +0 -2
- package/dist/types/FormView/fields/ToggleField.d.ts +0 -2
- package/dist/types/FormView/fields/index.d.ts +0 -9
- package/dist/types/FormView/index.d.ts +0 -7
- package/dist/types/FormView/templates/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +0 -2
- package/dist/types/FormView/templates/ArrayFieldTemplate/index.d.ts +0 -2
- package/dist/types/FormView/templates/ArrayFieldTemplate/styledComponents.d.ts +0 -10
- package/dist/types/FormView/templates/FieldTemplate/FieldTemplate.d.ts +0 -2
- package/dist/types/FormView/templates/FieldTemplate/index.d.ts +0 -1
- package/dist/types/FormView/templates/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +0 -2
- package/dist/types/FormView/templates/ObjectFieldTemplate/index.d.ts +0 -2
- package/dist/types/FormView/templates/ObjectFieldTemplate/styledComponents.d.ts +0 -10
- package/dist/types/FormView/templates/index.d.ts +0 -23
- package/dist/types/FormView/types/FormViewRegistryContext.d.ts +0 -21
- package/dist/types/FormView/types/index.d.ts +0 -1
- package/dist/types/common/FileUploadContext.d.ts +0 -18
- package/dist/types/common/FilesUploadContext.d.ts +0 -17
- package/dist/types/common/constants.d.ts +0 -10
- package/dist/types/common/index.d.ts +0 -4
- package/dist/types/styles/types.d.ts +0 -216
- package/dist/types/utils/createInitialValues.d.ts +0 -7
- package/dist/types/utils/createValidationSchema.d.ts +0 -31
- package/dist/types/utils/deepOverlap.d.ts +0 -1
- package/dist/types/utils/extractUiSchema.d.ts +0 -9
- package/dist/types/utils/getEnums.d.ts +0 -30
- package/dist/types/utils/getHiddenProperties.d.ts +0 -2
- package/dist/types/utils/getStyle.d.ts +0 -5
- package/dist/types/utils/getTitleAndDescription.d.ts +0 -12
- package/dist/types/utils/getTypes.d.ts +0 -5
- package/dist/types/utils/immutablySwapItems.d.ts +0 -1
- package/dist/types/utils/index.d.ts +0 -15
- package/dist/types/utils/mergeSchemas.d.ts +0 -1
- package/dist/types/utils/orderAdditionalProperties.d.ts +0 -2
- package/dist/types/utils/orderByUiSchema.d.ts +0 -2
- package/dist/types/utils/resolveSchema.d.ts +0 -4
- package/dist/types/utils/setTitleValues.d.ts +0 -1
- package/dist/types/utils/solveReferences.d.ts +0 -10
- /package/dist/cjs/{Form/fields/SearchableSelectField/types.js → common/types/Utils.js} +0 -0
- /package/dist/cjs/{styles → v3/raw/dom}/types.js +0 -0
- /package/dist/cjs/{Form/types/FormRegistryContext.js → v3/raw/model/form/types.js} +0 -0
- /package/dist/cjs/{FormView/types/FormViewRegistryContext.js → v3/raw/model/host.js} +0 -0
- /package/dist/cjs/{FormView/types/index.js → v3/raw/model/view/types.js} +0 -0
- /package/dist/esm/{Form/fields/SearchableSelectField/types.js → common/types/Utils.js} +0 -0
- /package/dist/esm/{styles → v3/raw/dom}/types.js +0 -0
- /package/dist/esm/{Form/types/FormRegistryContext.js → v3/raw/model/form/types.js} +0 -0
- /package/dist/esm/{FormView/types/FormViewRegistryContext.js → v3/raw/model/host.js} +0 -0
- /package/dist/esm/{FormView/types/index.js → v3/raw/model/view/types.js} +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import createDOMPurify from "dompurify";
|
|
2
|
+
/** Code of the error thrown when there is no DOM to sanitise with. */
|
|
3
|
+
export const SANITIZER_UNAVAILABLE = "SANITIZER_UNAVAILABLE";
|
|
4
|
+
export class SanitizerUnavailableError extends Error {
|
|
5
|
+
code = SANITIZER_UNAVAILABLE;
|
|
6
|
+
constructor() {
|
|
7
|
+
super(`${SANITIZER_UNAVAILABLE}: sanitizeHtml needs a DOM window. In Node, pass ` +
|
|
8
|
+
"one (e.g. from jsdom) as `options.window` or register it with " +
|
|
9
|
+
"`setSanitizerWindow`. Unsanitised HTML is never returned.");
|
|
10
|
+
this.name = "SanitizerUnavailableError";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
// D5 (approved): formatting, links and images only. Everything that can
|
|
14
|
+
// submit data, load code or styles, or restyle the page is forbidden, and
|
|
15
|
+
// only absolute http(s) URLs survive.
|
|
16
|
+
const STRICT = {
|
|
17
|
+
FORBID_TAGS: [
|
|
18
|
+
"form",
|
|
19
|
+
"input",
|
|
20
|
+
"button",
|
|
21
|
+
"select",
|
|
22
|
+
"textarea",
|
|
23
|
+
"label",
|
|
24
|
+
"style",
|
|
25
|
+
"svg",
|
|
26
|
+
"math",
|
|
27
|
+
"iframe",
|
|
28
|
+
"object",
|
|
29
|
+
"embed",
|
|
30
|
+
"link",
|
|
31
|
+
"meta",
|
|
32
|
+
"base",
|
|
33
|
+
// D5 (formatting, links, images): remote media is not formatting.
|
|
34
|
+
"video",
|
|
35
|
+
"audio",
|
|
36
|
+
"source",
|
|
37
|
+
"track",
|
|
38
|
+
// DOMPurify keeps a <template> nested in a forbidden parent (select, form,
|
|
39
|
+
// label...): inert and sanitised, but not idempotent.
|
|
40
|
+
"template",
|
|
41
|
+
],
|
|
42
|
+
FORBID_ATTR: [
|
|
43
|
+
"style",
|
|
44
|
+
"id",
|
|
45
|
+
"name",
|
|
46
|
+
"action",
|
|
47
|
+
"formaction",
|
|
48
|
+
"srcset",
|
|
49
|
+
"xlink:href",
|
|
50
|
+
],
|
|
51
|
+
ALLOWED_URI_REGEXP: /^https?:/i,
|
|
52
|
+
SANITIZE_NAMED_PROPS: true,
|
|
53
|
+
// Data must not forge the data-fjsf-* / data-keyword markers that pro3's
|
|
54
|
+
// persisted CSS and tests key off.
|
|
55
|
+
ALLOW_DATA_ATTR: false,
|
|
56
|
+
// The URI regex is applied to every attribute DOMPurify does not treat as
|
|
57
|
+
// URI-safe, which would strip these harmless table/text attributes (base
|
|
58
|
+
// decision). width/height/start/border stay stripped.
|
|
59
|
+
ADD_URI_SAFE_ATTR: ["colspan", "rowspan", "lang", "dir"],
|
|
60
|
+
};
|
|
61
|
+
export const STRICT_CONFIG = Object.freeze({
|
|
62
|
+
...STRICT,
|
|
63
|
+
FORBID_TAGS: Object.freeze([...STRICT.FORBID_TAGS]),
|
|
64
|
+
FORBID_ATTR: Object.freeze([...STRICT.FORBID_ATTR]),
|
|
65
|
+
ADD_URI_SAFE_ATTR: Object.freeze([...STRICT.ADD_URI_SAFE_ATTR]),
|
|
66
|
+
});
|
|
67
|
+
const instances = new WeakMap();
|
|
68
|
+
let registeredWindow;
|
|
69
|
+
/**
|
|
70
|
+
* Registers the DOM window `sanitizeHtml` uses where there is no global one (Node).
|
|
71
|
+
*
|
|
72
|
+
* Remote `http(s)` images are kept by policy. In a browser that is a tracking
|
|
73
|
+
* pixel; if you sanitise on the server and render the result in a headless
|
|
74
|
+
* browser (e.g. PDF generation), it is also an egress/SSRF vector: apply an
|
|
75
|
+
* egress policy or request interception there (plan §8.4).
|
|
76
|
+
*/
|
|
77
|
+
export const setSanitizerWindow = (window) => {
|
|
78
|
+
registeredWindow = window;
|
|
79
|
+
};
|
|
80
|
+
const URL_ATTRIBUTES = ["href", "src", "xlink:href", "action", "formaction"];
|
|
81
|
+
const createInstance = (window) => {
|
|
82
|
+
const purify = createDOMPurify(window);
|
|
83
|
+
if (!purify.isSupported)
|
|
84
|
+
throw new SanitizerUnavailableError();
|
|
85
|
+
purify.addHook("afterSanitizeAttributes", (node) => {
|
|
86
|
+
// ALLOWED_URI_REGEXP is bypassed by DOMPurify for data: images; the
|
|
87
|
+
// approved policy is http(s) only.
|
|
88
|
+
URL_ATTRIBUTES.forEach((attr) => {
|
|
89
|
+
if (/^\s*data:/i.test(node.getAttribute?.(attr) ?? "")) {
|
|
90
|
+
node.removeAttribute(attr);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
if (node.nodeName === "A" && node.hasAttribute("href")) {
|
|
94
|
+
node.setAttribute("rel", "noopener noreferrer");
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
return purify;
|
|
98
|
+
};
|
|
99
|
+
const resolveWindow = (options) => options?.window ??
|
|
100
|
+
registeredWindow ??
|
|
101
|
+
// the browser's window, read through globalThis (the RAW layer reads no DOM global directly, §1.6)
|
|
102
|
+
globalThis.window;
|
|
103
|
+
/**
|
|
104
|
+
* Sanitises untrusted HTML with the strict config. Isomorphic: uses the
|
|
105
|
+
* browser's window, or one supplied for Node. With no usable window it
|
|
106
|
+
* throws SanitizerUnavailableError (code SANITIZER_UNAVAILABLE): fail closed,
|
|
107
|
+
* never pass the input through.
|
|
108
|
+
*/
|
|
109
|
+
export const sanitizeHtml = (html, options) => {
|
|
110
|
+
const win = resolveWindow(options);
|
|
111
|
+
if (!win)
|
|
112
|
+
throw new SanitizerUnavailableError();
|
|
113
|
+
let purify = instances.get(win);
|
|
114
|
+
if (!purify) {
|
|
115
|
+
purify = createInstance(win);
|
|
116
|
+
instances.set(win, purify);
|
|
117
|
+
}
|
|
118
|
+
return purify.sanitize(String(html), STRICT_CONFIG);
|
|
119
|
+
};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
const SAFE_NAME = /^[a-zA-Z_:][-a-zA-Z0-9_:.]*$/;
|
|
2
|
+
const SAFE_TAG = /^[a-z][a-z0-9-]*$/;
|
|
3
|
+
const HANDLER = /^on/i;
|
|
4
|
+
const BOOLEAN = new Set(["selected", "checked", "disabled", "readonly", "multiple", "hidden", "required"]);
|
|
5
|
+
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
6
|
+
/** Fragments, holes and host replacements flattened into the list of children to draw. */
|
|
7
|
+
const flatten = (children, env, out = []) => {
|
|
8
|
+
for (const child of children) {
|
|
9
|
+
if (child === null || child === undefined || child === false)
|
|
10
|
+
continue;
|
|
11
|
+
if (typeof child === "string" || typeof child === "number")
|
|
12
|
+
out.push(String(child));
|
|
13
|
+
else {
|
|
14
|
+
const replaced = child.host ? env.host?.(child) : undefined;
|
|
15
|
+
if (replaced)
|
|
16
|
+
flatten(replaced, env, out);
|
|
17
|
+
else if (child.tag === "#fragment")
|
|
18
|
+
flatten(child.children, env, out);
|
|
19
|
+
else if (child.tag === "#hole")
|
|
20
|
+
continue;
|
|
21
|
+
else if (SAFE_TAG.test(child.tag))
|
|
22
|
+
out.push(child);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return out;
|
|
26
|
+
};
|
|
27
|
+
const attributesOf = (node) => {
|
|
28
|
+
const out = new Map();
|
|
29
|
+
for (const [name, value] of Object.entries(node.attrs)) {
|
|
30
|
+
if (!SAFE_NAME.test(name) || HANDLER.test(name) || value === undefined || value === null || value === false)
|
|
31
|
+
continue;
|
|
32
|
+
// a textarea's / select's value is state, not an attribute (as React draws them)
|
|
33
|
+
if (Array.isArray(value) || (name === "value" && (node.tag === "textarea" || node.tag === "select")))
|
|
34
|
+
continue;
|
|
35
|
+
out.set(name, value === true ? (BOOLEAN.has(name) ? "" : "true") : String(value));
|
|
36
|
+
}
|
|
37
|
+
return out;
|
|
38
|
+
};
|
|
39
|
+
const isControl = (el) => el.tagName === "INPUT" || el.tagName === "TEXTAREA" || el.tagName === "SELECT";
|
|
40
|
+
/** Live state of form controls: set as properties, and only when it differs (no caret jumps). */
|
|
41
|
+
const syncControl = (el, node) => {
|
|
42
|
+
const { value, checked } = node.attrs;
|
|
43
|
+
if (el.tagName === "INPUT" && (el.type === "checkbox" || el.type === "radio")) {
|
|
44
|
+
const want = checked === true;
|
|
45
|
+
if (el.checked !== want)
|
|
46
|
+
el.checked = want;
|
|
47
|
+
}
|
|
48
|
+
else if (el.tagName === "SELECT" && el.multiple) {
|
|
49
|
+
const want = new Set(Array.isArray(value) ? value.map(String) : []);
|
|
50
|
+
for (const option of el.options)
|
|
51
|
+
if (option.selected !== want.has(option.value))
|
|
52
|
+
option.selected = want.has(option.value);
|
|
53
|
+
}
|
|
54
|
+
else if (el.tagName === "SELECT" && value === undefined) {
|
|
55
|
+
// the option marked `selected` is the selection (React: the select's value), whatever the insertion order did
|
|
56
|
+
const marked = [...el.options].find((o) => o.hasAttribute("selected"));
|
|
57
|
+
if (marked)
|
|
58
|
+
for (const o of el.options)
|
|
59
|
+
if (o.selected !== (o === marked))
|
|
60
|
+
o.selected = o === marked;
|
|
61
|
+
}
|
|
62
|
+
else if (el.tagName === "TEXTAREA") {
|
|
63
|
+
// React keeps a textarea's text (defaultValue) equal to its value
|
|
64
|
+
const want = value === undefined || value === null ? "" : String(value);
|
|
65
|
+
if (el.defaultValue !== want)
|
|
66
|
+
el.defaultValue = want;
|
|
67
|
+
if (el.value !== want)
|
|
68
|
+
el.value = want;
|
|
69
|
+
}
|
|
70
|
+
else if (el.type !== "file" && value !== undefined) {
|
|
71
|
+
const want = value === null ? "" : String(value);
|
|
72
|
+
if (el.value !== want)
|
|
73
|
+
el.value = want;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const create = (node, env, svg) => svg || node.tag === "svg" ? env.doc.createElementNS(SVG_NS, node.tag) : env.doc.createElement(node.tag);
|
|
77
|
+
/** The style text each element was last given (the attribute holds the browser's serialisation). */
|
|
78
|
+
const styles = new WeakMap();
|
|
79
|
+
/** A style goes through the CSSOM, so the attribute reads as React writes it ("display: none;"). */
|
|
80
|
+
const setStyle = (el, value) => {
|
|
81
|
+
if (styles.get(el) === value)
|
|
82
|
+
return;
|
|
83
|
+
styles.set(el, value);
|
|
84
|
+
const style = el.style;
|
|
85
|
+
if (style)
|
|
86
|
+
style.cssText = value;
|
|
87
|
+
else
|
|
88
|
+
el.setAttribute("style", value);
|
|
89
|
+
};
|
|
90
|
+
const patchElement = (el, node, env) => {
|
|
91
|
+
const want = attributesOf(node);
|
|
92
|
+
for (const attr of [...el.attributes])
|
|
93
|
+
if (!want.has(attr.name))
|
|
94
|
+
el.removeAttribute(attr.name);
|
|
95
|
+
if (!want.has("style"))
|
|
96
|
+
styles.delete(el);
|
|
97
|
+
for (const [name, value] of want) {
|
|
98
|
+
if (name === "style")
|
|
99
|
+
setStyle(el, value);
|
|
100
|
+
else if (el.getAttribute(name) !== value)
|
|
101
|
+
el.setAttribute(name, value);
|
|
102
|
+
}
|
|
103
|
+
if (node.on)
|
|
104
|
+
env.on.set(el, node.on);
|
|
105
|
+
else
|
|
106
|
+
env.on.delete(el);
|
|
107
|
+
const svg = el.namespaceURI === SVG_NS;
|
|
108
|
+
// A slot (§2.6) is filled by the host: its content is not ours to patch.
|
|
109
|
+
if (el.tagName !== "INPUT" && el.tagName !== "TEXTAREA" && node.attrs["data-fjsf-slot"] === undefined)
|
|
110
|
+
patchChildren(el, node.children, env, svg);
|
|
111
|
+
if (isControl(el))
|
|
112
|
+
syncControl(el, node);
|
|
113
|
+
env.drawn?.(el, node);
|
|
114
|
+
};
|
|
115
|
+
/** Makes `parent`'s children match `children` (in place where tags match). */
|
|
116
|
+
export const patchChildren = (parent, children, env, svg = false) => {
|
|
117
|
+
const flat = flatten(children, env);
|
|
118
|
+
flat.forEach((child, i) => {
|
|
119
|
+
const existing = parent.childNodes[i];
|
|
120
|
+
if (typeof child === "string") {
|
|
121
|
+
if (existing && existing.nodeType === 3) {
|
|
122
|
+
if (existing.data !== child)
|
|
123
|
+
existing.data = child;
|
|
124
|
+
}
|
|
125
|
+
else
|
|
126
|
+
insert(parent, env.doc.createTextNode(child), existing);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const same = existing && existing.nodeType === 1 && existing.localName === child.tag;
|
|
130
|
+
const el = same ? existing : create(child, env, svg);
|
|
131
|
+
if (!same)
|
|
132
|
+
insert(parent, el, existing);
|
|
133
|
+
patchElement(el, child, env);
|
|
134
|
+
});
|
|
135
|
+
while (parent.childNodes.length > flat.length)
|
|
136
|
+
parent.removeChild(parent.lastChild);
|
|
137
|
+
};
|
|
138
|
+
const insert = (parent, node, existing) => {
|
|
139
|
+
if (existing)
|
|
140
|
+
parent.replaceChild(node, existing);
|
|
141
|
+
else
|
|
142
|
+
parent.appendChild(node);
|
|
143
|
+
};
|
|
144
|
+
/** Draws `node` as the only content of `target`. */
|
|
145
|
+
export const toDOM = (target, node, env) => patchChildren(target, [node], env);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const VOID = new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "source", "track", "wbr"]);
|
|
2
|
+
const BOOLEAN = new Set(["selected", "checked", "disabled", "readonly", "multiple", "hidden", "required"]);
|
|
3
|
+
const SAFE_NAME = /^[a-zA-Z_:][-a-zA-Z0-9_:.]*$/;
|
|
4
|
+
const SAFE_TAG = /^[a-z][a-z0-9-]*$/;
|
|
5
|
+
// Event handlers are never library output; dropped as defence in depth (TASK-063 review N3).
|
|
6
|
+
const HANDLER = /^on/i;
|
|
7
|
+
export const escapeText = (text) => text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
8
|
+
export const escapeAttr = (text) => escapeText(text).replace(/"/g, """).replace(/'/g, "'");
|
|
9
|
+
const attrsOf = (node) => Object.entries(node.attrs)
|
|
10
|
+
.map(([name, value]) => {
|
|
11
|
+
if (!SAFE_NAME.test(name) || HANDLER.test(name) || value === undefined || value === null || value === false)
|
|
12
|
+
return "";
|
|
13
|
+
// a select's / textarea's value is state: React SSR marks the option or writes the text (below)
|
|
14
|
+
if (name === "value" && (node.tag === "select" || node.tag === "textarea"))
|
|
15
|
+
return "";
|
|
16
|
+
if (value === true)
|
|
17
|
+
return BOOLEAN.has(name) ? ` ${name}` : ` ${name}="true"`;
|
|
18
|
+
return ` ${name}="${escapeAttr(String(value))}"`;
|
|
19
|
+
})
|
|
20
|
+
.join("");
|
|
21
|
+
/** The values a select's `value` selects (React SSR: `selected` on those options), or undefined when it has none. */
|
|
22
|
+
const selection = (node) => {
|
|
23
|
+
const value = node.attrs.value;
|
|
24
|
+
if (value === undefined || value === null)
|
|
25
|
+
return undefined;
|
|
26
|
+
return new Set((Array.isArray(value) ? value : [value]).map(String));
|
|
27
|
+
};
|
|
28
|
+
const childToString = (child, selected) => {
|
|
29
|
+
if (child === null || child === undefined || child === false)
|
|
30
|
+
return "";
|
|
31
|
+
if (typeof child === "string")
|
|
32
|
+
return escapeText(child);
|
|
33
|
+
if (typeof child === "number")
|
|
34
|
+
return String(child);
|
|
35
|
+
if (selected && child.tag === "option")
|
|
36
|
+
return toString({ ...child, attrs: { ...child.attrs, selected: selected.has(String(child.attrs.value ?? "")) } });
|
|
37
|
+
return toString(child, selected);
|
|
38
|
+
};
|
|
39
|
+
export const toString = (node, selected) => {
|
|
40
|
+
// A fragment (composite registry component) serialises its children only.
|
|
41
|
+
if (node.tag === "#fragment")
|
|
42
|
+
return node.children.map((c) => childToString(c, selected)).join("");
|
|
43
|
+
if (!SAFE_TAG.test(node.tag))
|
|
44
|
+
return "";
|
|
45
|
+
const open = `<${node.tag}${attrsOf(node)}>`;
|
|
46
|
+
if (VOID.has(node.tag))
|
|
47
|
+
return open;
|
|
48
|
+
if (node.tag === "textarea")
|
|
49
|
+
return `${open}${escapeText(node.attrs.value === undefined || node.attrs.value === null ? "" : String(node.attrs.value))}</textarea>`;
|
|
50
|
+
const inner = node.tag === "select" ? selection(node) : node.tag === "optgroup" ? selected : undefined;
|
|
51
|
+
return `${open}${node.children.map((c) => childToString(c, inner)).join("")}</${node.tag}>`;
|
|
52
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// The RAW state store (S6, §2.7 S-A): the second StateAdapter next to the React layer's Formik adapter.
|
|
2
|
+
// It follows Formik 2's semantics where the corpus and the scripts compare state: setFieldValue /
|
|
3
|
+
// setFieldTouched validate the whole form (validateOnChange / validateOnBlur), "" is undefined for
|
|
4
|
+
// validation, the first message per path wins, submit touches every value and keeps isSubmitting true
|
|
5
|
+
// after a synchronous onSubmit (the consumer resets it, as with Formik).
|
|
6
|
+
import { isPlainObject } from "../core/json";
|
|
7
|
+
import { setIn } from "../core/paths";
|
|
8
|
+
/** formik prepareDataForValidation: "" is undefined, nested objects and arrays included. */
|
|
9
|
+
export const prepareForValidation = (values) => {
|
|
10
|
+
const out = Array.isArray(values) ? [] : {};
|
|
11
|
+
for (const key of Object.keys(values ?? {})) {
|
|
12
|
+
const v = values[key];
|
|
13
|
+
if (Array.isArray(v))
|
|
14
|
+
out[key] = v.map((x) => (Array.isArray(x) || isPlainObject(x) ? prepareForValidation(x) : x !== "" ? x : undefined));
|
|
15
|
+
else if (isPlainObject(v))
|
|
16
|
+
out[key] = prepareForValidation(v);
|
|
17
|
+
else
|
|
18
|
+
out[key] = v !== "" ? v : undefined;
|
|
19
|
+
}
|
|
20
|
+
return out;
|
|
21
|
+
};
|
|
22
|
+
/** formik yupToFormErrors: the first message per path. */
|
|
23
|
+
export const toFormErrors = (error) => {
|
|
24
|
+
let errors = {};
|
|
25
|
+
const inner = error?.inner ?? [];
|
|
26
|
+
if (!inner.length)
|
|
27
|
+
return error?.path !== undefined ? setIn(errors, error.path, error.message) : errors;
|
|
28
|
+
for (const e of inner) {
|
|
29
|
+
if (e.path === undefined)
|
|
30
|
+
continue;
|
|
31
|
+
const segments = String(e.path).split(/[.[\]]+/).filter(Boolean);
|
|
32
|
+
let existing = errors;
|
|
33
|
+
for (const s of segments)
|
|
34
|
+
existing = existing?.[s];
|
|
35
|
+
if (!existing)
|
|
36
|
+
errors = setIn(errors, e.path, e.message);
|
|
37
|
+
}
|
|
38
|
+
return errors;
|
|
39
|
+
};
|
|
40
|
+
/** formik setNestedObjectValues(values, true): the touched map after a submit attempt. */
|
|
41
|
+
export const touchAll = (values, seen = new WeakSet()) => {
|
|
42
|
+
const out = Array.isArray(values) ? [] : {};
|
|
43
|
+
for (const key of Object.keys(values ?? {})) {
|
|
44
|
+
const v = values[key];
|
|
45
|
+
if (v !== null && typeof v === "object") {
|
|
46
|
+
if (!seen.has(v)) {
|
|
47
|
+
seen.add(v);
|
|
48
|
+
out[key] = touchAll(v, seen);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else
|
|
52
|
+
out[key] = true;
|
|
53
|
+
}
|
|
54
|
+
return out;
|
|
55
|
+
};
|
|
56
|
+
const equal = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
57
|
+
export const createStore = (options = {}) => {
|
|
58
|
+
let state = { values: options.initialValues ?? {}, errors: {}, touched: {}, isSubmitting: false, submitCount: 0 };
|
|
59
|
+
const listeners = new Set();
|
|
60
|
+
const set = (patch) => {
|
|
61
|
+
state = { ...state, ...patch };
|
|
62
|
+
listeners.forEach((l) => l(state));
|
|
63
|
+
};
|
|
64
|
+
const onChange = options.validateOnChange ?? true;
|
|
65
|
+
const onBlur = options.validateOnBlur ?? true;
|
|
66
|
+
const validateForm = async (values = state.values) => {
|
|
67
|
+
if (!options.validationSchema)
|
|
68
|
+
return {};
|
|
69
|
+
try {
|
|
70
|
+
await options.validationSchema.validate(prepareForValidation(values), { abortEarly: false });
|
|
71
|
+
return {};
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
return toFormErrors(error);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const validate = async (values) => {
|
|
78
|
+
const errors = await validateForm(values);
|
|
79
|
+
if (!equal(errors, state.errors))
|
|
80
|
+
set({ errors });
|
|
81
|
+
if (options.validationSchema)
|
|
82
|
+
options.onValidated?.(errors);
|
|
83
|
+
return errors;
|
|
84
|
+
};
|
|
85
|
+
const store = {
|
|
86
|
+
getState: () => state,
|
|
87
|
+
setState: (patch) => set(patch),
|
|
88
|
+
subscribe(listener) {
|
|
89
|
+
listeners.add(listener);
|
|
90
|
+
return () => void listeners.delete(listener);
|
|
91
|
+
},
|
|
92
|
+
async setValues(values, shouldValidate = onChange) {
|
|
93
|
+
set({ values });
|
|
94
|
+
if (shouldValidate)
|
|
95
|
+
await validate(values);
|
|
96
|
+
},
|
|
97
|
+
async setFieldValue(path, value, shouldValidate = onChange) {
|
|
98
|
+
const values = path ? setIn(state.values, path, value) : value;
|
|
99
|
+
set({ values });
|
|
100
|
+
if (shouldValidate)
|
|
101
|
+
await validate(values);
|
|
102
|
+
},
|
|
103
|
+
async setFieldTouched(path, touched = true, shouldValidate = onBlur) {
|
|
104
|
+
set({ touched: setIn(state.touched, path, touched) });
|
|
105
|
+
if (shouldValidate)
|
|
106
|
+
await validate(state.values);
|
|
107
|
+
},
|
|
108
|
+
setFieldError(path, message) {
|
|
109
|
+
set({ errors: setIn(state.errors, path, message) });
|
|
110
|
+
},
|
|
111
|
+
setSubmitting: (isSubmitting) => set({ isSubmitting }),
|
|
112
|
+
validateForm: (values) => validateForm(values),
|
|
113
|
+
async submitForm() {
|
|
114
|
+
set({ touched: touchAll(state.values), isSubmitting: true, submitCount: state.submitCount + 1 });
|
|
115
|
+
const errors = await validate(state.values);
|
|
116
|
+
if (Object.keys(errors).length)
|
|
117
|
+
return set({ isSubmitting: false });
|
|
118
|
+
const result = options.onSubmit?.(state.values, store);
|
|
119
|
+
// formik: a synchronous onSubmit leaves isSubmitting true; a promise resets it when it settles.
|
|
120
|
+
if (result && typeof result.then === "function") {
|
|
121
|
+
await Promise.resolve(result).finally(() => set({ isSubmitting: false }));
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
return store;
|
|
126
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// polished 4.3 readableColor / lighten / darken as a RAW port (§4.3 (3): themeToCssVars computes the
|
|
2
|
+
// derived colours of the 2.x styles from the theme). Same parsing, rounding and output format as polished on
|
|
3
|
+
// the colours it accepts (unit-tested against polished); a value it cannot parse (a token theme's
|
|
4
|
+
// `var(--x)`) returns undefined instead of throwing, and the caller decides the fallback.
|
|
5
|
+
import { NAMED_COLORS } from "./colorNames";
|
|
6
|
+
const HEX = /^#[a-fA-F0-9]{6}$/;
|
|
7
|
+
const HEX_ALPHA = /^#[a-fA-F0-9]{8}$/;
|
|
8
|
+
const SHORT_HEX = /^#[a-fA-F0-9]{3}$/;
|
|
9
|
+
const SHORT_HEX_ALPHA = /^#[a-fA-F0-9]{4}$/;
|
|
10
|
+
const RGB = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i;
|
|
11
|
+
const RGBA = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
12
|
+
const HSL = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
13
|
+
const HSLA = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
14
|
+
const int = (s, radix = 10) => parseInt(s, radix);
|
|
15
|
+
const alphaOf = (s) => (parseFloat(s) > 1 ? parseFloat(s) / 100 : parseFloat(s));
|
|
16
|
+
const hslToChannels = (hue, saturation, lightness) => {
|
|
17
|
+
if (saturation === 0)
|
|
18
|
+
return [lightness, lightness, lightness];
|
|
19
|
+
const huePrime = (((hue % 360) + 360) % 360) / 60;
|
|
20
|
+
const chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
21
|
+
const second = chroma * (1 - Math.abs((huePrime % 2) - 1));
|
|
22
|
+
const sextant = [[chroma, second, 0], [second, chroma, 0], [0, chroma, second], [0, second, chroma], [second, 0, chroma], [chroma, 0, second]];
|
|
23
|
+
const [r, g, b] = sextant[Math.floor(huePrime)] ?? [0, 0, 0];
|
|
24
|
+
const m = lightness - chroma / 2;
|
|
25
|
+
return [r + m, g + m, b + m];
|
|
26
|
+
};
|
|
27
|
+
const toInts = (channels) => channels.map((c) => Math.round(c * 255));
|
|
28
|
+
/** polished parseToRgb; undefined where polished throws. */
|
|
29
|
+
export const parseToRgb = (color) => {
|
|
30
|
+
if (typeof color !== "string")
|
|
31
|
+
return undefined;
|
|
32
|
+
const c = NAMED_COLORS[color.toLowerCase()] ? `#${NAMED_COLORS[color.toLowerCase()]}` : color;
|
|
33
|
+
const pair = (i, j = i + 1) => int(`${c[i]}${c[j]}`, 16);
|
|
34
|
+
if (HEX.test(c))
|
|
35
|
+
return { red: pair(1), green: pair(3), blue: pair(5) };
|
|
36
|
+
if (HEX_ALPHA.test(c))
|
|
37
|
+
return { red: pair(1), green: pair(3), blue: pair(5), alpha: parseFloat((pair(7) / 255).toFixed(2)) };
|
|
38
|
+
if (SHORT_HEX.test(c))
|
|
39
|
+
return { red: pair(1, 1), green: pair(2, 2), blue: pair(3, 3) };
|
|
40
|
+
if (SHORT_HEX_ALPHA.test(c))
|
|
41
|
+
return { red: pair(1, 1), green: pair(2, 2), blue: pair(3, 3), alpha: parseFloat((pair(4, 4) / 255).toFixed(2)) };
|
|
42
|
+
let m = RGB.exec(c);
|
|
43
|
+
if (m)
|
|
44
|
+
return { red: int(m[1]), green: int(m[2]), blue: int(m[3]) };
|
|
45
|
+
m = RGBA.exec(c.substring(0, 50));
|
|
46
|
+
if (m)
|
|
47
|
+
return { red: int(m[1]), green: int(m[2]), blue: int(m[3]), alpha: alphaOf(m[4]) };
|
|
48
|
+
m = HSL.exec(c) ?? HSLA.exec(c.substring(0, 50));
|
|
49
|
+
if (!m)
|
|
50
|
+
return undefined;
|
|
51
|
+
const [red, green, blue] = toInts(hslToChannels(int(m[1]), int(m[2]) / 100, int(m[3]) / 100));
|
|
52
|
+
return m[4] === undefined ? { red, green, blue } : { red, green, blue, alpha: alphaOf(m[4]) };
|
|
53
|
+
};
|
|
54
|
+
const rgbToHsl = (c) => {
|
|
55
|
+
const [r, g, b] = [c.red / 255, c.green / 255, c.blue / 255];
|
|
56
|
+
const max = Math.max(r, g, b);
|
|
57
|
+
const min = Math.min(r, g, b);
|
|
58
|
+
const lightness = (max + min) / 2;
|
|
59
|
+
const alpha = c.alpha !== undefined ? { alpha: c.alpha } : {};
|
|
60
|
+
if (max === min)
|
|
61
|
+
return { hue: 0, saturation: 0, lightness, ...alpha };
|
|
62
|
+
const delta = max - min;
|
|
63
|
+
const saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
|
|
64
|
+
const hue = (max === r ? (g - b) / delta + (g < b ? 6 : 0) : max === g ? (b - r) / delta + 2 : (r - g) / delta + 4) * 60;
|
|
65
|
+
return { hue, saturation, lightness, ...alpha };
|
|
66
|
+
};
|
|
67
|
+
const reduceHex = (hex) => (hex.length === 7 && hex[1] === hex[2] && hex[3] === hex[4] && hex[5] === hex[6] ? `#${hex[1]}${hex[3]}${hex[5]}` : hex);
|
|
68
|
+
const toHex = (n) => n.toString(16).padStart(2, "0");
|
|
69
|
+
/** polished toColorString of an HSL colour: reduced hex, or rgba() with an alpha below 1. */
|
|
70
|
+
const hslToString = ({ hue, saturation, lightness, alpha }) => {
|
|
71
|
+
const ints = toInts(hslToChannels(hue, saturation, lightness));
|
|
72
|
+
if (alpha !== undefined && alpha < 1)
|
|
73
|
+
return `rgba(${ints.join(",")},${alpha})`;
|
|
74
|
+
return reduceHex(`#${ints.map(toHex).join("")}`.toLowerCase());
|
|
75
|
+
};
|
|
76
|
+
const shift = (amount, color) => {
|
|
77
|
+
if (color === "transparent")
|
|
78
|
+
return color;
|
|
79
|
+
const rgb = parseToRgb(color);
|
|
80
|
+
if (!rgb)
|
|
81
|
+
return undefined;
|
|
82
|
+
const hsl = rgbToHsl(rgb);
|
|
83
|
+
return hslToString({ ...hsl, lightness: Math.max(0, Math.min(1, hsl.lightness + amount)) });
|
|
84
|
+
};
|
|
85
|
+
export const lighten = (amount, color) => shift(amount, color);
|
|
86
|
+
export const darken = (amount, color) => shift(-amount, color);
|
|
87
|
+
/** polished getLuminance (relative luminance, 3 decimals). */
|
|
88
|
+
export const getLuminance = (color) => {
|
|
89
|
+
if (color === "transparent")
|
|
90
|
+
return 0;
|
|
91
|
+
const rgb = parseToRgb(color);
|
|
92
|
+
if (!rgb)
|
|
93
|
+
return undefined;
|
|
94
|
+
const [r, g, b] = [rgb.red, rgb.green, rgb.blue].map((v) => {
|
|
95
|
+
const c = v / 255;
|
|
96
|
+
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
97
|
+
});
|
|
98
|
+
return parseFloat((0.2126 * r + 0.7152 * g + 0.0722 * b).toFixed(3));
|
|
99
|
+
};
|
|
100
|
+
/** polished readableColor(color) with its defaults: "#000" on light colours, "#fff" on dark ones. */
|
|
101
|
+
export const readableColor = (color) => {
|
|
102
|
+
const luminance = getLuminance(color);
|
|
103
|
+
return luminance === undefined ? undefined : luminance > 0.179 ? "#000" : "#fff";
|
|
104
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// The CSS named colours polished 4.3 accepts (name:hex), for the colour port (color.ts).
|
|
2
|
+
const TABLE = "aliceblue:f0f8ff,antiquewhite:faebd7,aqua:00ffff,aquamarine:7fffd4,azure:f0ffff,beige:f5f5dc,bisque:ffe4c4," +
|
|
3
|
+
"black:000,blanchedalmond:ffebcd,blue:0000ff,blueviolet:8a2be2,brown:a52a2a,burlywood:deb887,cadetblue:5f9ea0," +
|
|
4
|
+
"chartreuse:7fff00,chocolate:d2691e,coral:ff7f50,cornflowerblue:6495ed,cornsilk:fff8dc,crimson:dc143c," +
|
|
5
|
+
"cyan:00ffff,darkblue:00008b,darkcyan:008b8b,darkgoldenrod:b8860b,darkgray:a9a9a9,darkgreen:006400," +
|
|
6
|
+
"darkgrey:a9a9a9,darkkhaki:bdb76b,darkmagenta:8b008b,darkolivegreen:556b2f,darkorange:ff8c00,darkorchid:9932cc," +
|
|
7
|
+
"darkred:8b0000,darksalmon:e9967a,darkseagreen:8fbc8f,darkslateblue:483d8b,darkslategray:2f4f4f," +
|
|
8
|
+
"darkslategrey:2f4f4f,darkturquoise:00ced1,darkviolet:9400d3,deeppink:ff1493,deepskyblue:00bfff,dimgray:696969," +
|
|
9
|
+
"dimgrey:696969,dodgerblue:1e90ff,firebrick:b22222,floralwhite:fffaf0,forestgreen:228b22,fuchsia:ff00ff," +
|
|
10
|
+
"gainsboro:dcdcdc,ghostwhite:f8f8ff,gold:ffd700,goldenrod:daa520,gray:808080,green:008000,greenyellow:adff2f," +
|
|
11
|
+
"grey:808080,honeydew:f0fff0,hotpink:ff69b4,indianred:cd5c5c,indigo:4b0082,ivory:fffff0,khaki:f0e68c," +
|
|
12
|
+
"lavender:e6e6fa,lavenderblush:fff0f5,lawngreen:7cfc00,lemonchiffon:fffacd,lightblue:add8e6,lightcoral:f08080," +
|
|
13
|
+
"lightcyan:e0ffff,lightgoldenrodyellow:fafad2,lightgray:d3d3d3,lightgreen:90ee90,lightgrey:d3d3d3," +
|
|
14
|
+
"lightpink:ffb6c1,lightsalmon:ffa07a,lightseagreen:20b2aa,lightskyblue:87cefa,lightslategray:789," +
|
|
15
|
+
"lightslategrey:789,lightsteelblue:b0c4de,lightyellow:ffffe0,lime:0f0,limegreen:32cd32,linen:faf0e6," +
|
|
16
|
+
"magenta:f0f,maroon:800000,mediumaquamarine:66cdaa,mediumblue:0000cd,mediumorchid:ba55d3,mediumpurple:9370db," +
|
|
17
|
+
"mediumseagreen:3cb371,mediumslateblue:7b68ee,mediumspringgreen:00fa9a,mediumturquoise:48d1cc," +
|
|
18
|
+
"mediumvioletred:c71585,midnightblue:191970,mintcream:f5fffa,mistyrose:ffe4e1,moccasin:ffe4b5," +
|
|
19
|
+
"navajowhite:ffdead,navy:000080,oldlace:fdf5e6,olive:808000,olivedrab:6b8e23,orange:ffa500,orangered:ff4500," +
|
|
20
|
+
"orchid:da70d6,palegoldenrod:eee8aa,palegreen:98fb98,paleturquoise:afeeee,palevioletred:db7093," +
|
|
21
|
+
"papayawhip:ffefd5,peachpuff:ffdab9,peru:cd853f,pink:ffc0cb,plum:dda0dd,powderblue:b0e0e6,purple:800080," +
|
|
22
|
+
"rebeccapurple:639,red:f00,rosybrown:bc8f8f,royalblue:4169e1,saddlebrown:8b4513,salmon:fa8072," +
|
|
23
|
+
"sandybrown:f4a460,seagreen:2e8b57,seashell:fff5ee,sienna:a0522d,silver:c0c0c0,skyblue:87ceeb,slateblue:6a5acd," +
|
|
24
|
+
"slategray:708090,slategrey:708090,snow:fffafa,springgreen:00ff7f,steelblue:4682b4,tan:d2b48c,teal:008080," +
|
|
25
|
+
"thistle:d8bfd8,tomato:ff6347,turquoise:40e0d0,violet:ee82ee,wheat:f5deb3,white:fff,whitesmoke:f5f5f5," +
|
|
26
|
+
"yellow:ff0,yellowgreen:9acd32,";
|
|
27
|
+
export const NAMED_COLORS = Object.fromEntries(TABLE.split(",").filter(Boolean).map((pair) => pair.split(":")));
|