@synetics/ui 0.7.0-alpha
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/.env +3 -0
- package/.eslintrc.cjs +83 -0
- package/.eslintrc.json +53 -0
- package/.github/workflows/deploy.yml +7 -0
- package/.turbo/turbo-build.log +3 -0
- package/CONTRIBUTING.md +47 -0
- package/FIXES-IMPLEMENTATION-LOG.md +180 -0
- package/LICENSE +21 -0
- package/README.md +414 -0
- package/ROADMAP.md +112 -0
- package/TEST-DOCUMENTATION.md +67 -0
- package/TEST-FAILURE-ANALYSIS.md +326 -0
- package/console-mirror.html +79 -0
- package/control-flow-transformed.js +10129 -0
- package/daily-push.log +9 -0
- package/debug-router.html +54 -0
- package/debug-screenshot.png +0 -0
- package/dev-error.log +84 -0
- package/dev-output.log +10689 -0
- package/docs/README.md +527 -0
- package/e2e-results.txt +0 -0
- package/error-boundary-output.js +353 -0
- package/final-test.txt +2816 -0
- package/index.html +41 -0
- package/latest-test.txt +2900 -0
- package/package.json +68 -0
- package/parse-debug.txt +10 -0
- package/ping.txt +1 -0
- package/playwright.config.ts +25 -0
- package/postcss.config.js +6 -0
- package/pre-validation-code.js +25 -0
- package/reactivity-output.txt +0 -0
- package/reactivity-page.html +0 -0
- package/return-parse-test.txt +139 -0
- package/run-psr-test.ps1 +65 -0
- package/src/README.md +138 -0
- package/src/components/app-footer.syn +17 -0
- package/src/components/app-header.syn +43 -0
- package/src/components/atoms/avatar/avatar-simple.syn +25 -0
- package/src/components/atoms/avatar/avatar.syn +86 -0
- package/src/components/atoms/avatar/avatar.type.ts +39 -0
- package/src/components/atoms/avatar/index.ts +7 -0
- package/src/components/atoms/checkbox/checkbox.syn +72 -0
- package/src/components/atoms/checkbox/checkbox.type.ts +25 -0
- package/src/components/atoms/checkbox/index.ts +6 -0
- package/src/components/atoms/container/container.syn +53 -0
- package/src/components/atoms/container/container.type.ts +32 -0
- package/src/components/atoms/container/index.ts +7 -0
- package/src/components/atoms/divider/divider.syn +45 -0
- package/src/components/atoms/divider/divider.type.ts +24 -0
- package/src/components/atoms/divider/index.ts +7 -0
- package/src/components/atoms/grid/grid.syn +56 -0
- package/src/components/atoms/grid/grid.type.ts +44 -0
- package/src/components/atoms/grid/index.ts +7 -0
- package/src/components/atoms/icon/icon.syn +0 -0
- package/src/components/atoms/icon/icon.type.ts +5 -0
- package/src/components/atoms/input/index.ts +6 -0
- package/src/components/atoms/input/input.syn +75 -0
- package/src/components/atoms/input/input.type.ts +29 -0
- package/src/components/atoms/progress/index.ts +7 -0
- package/src/components/atoms/progress/progress.syn +68 -0
- package/src/components/atoms/progress/progress.type.ts +48 -0
- package/src/components/atoms/radio/index.ts +6 -0
- package/src/components/atoms/radio/radio.syn +72 -0
- package/src/components/atoms/radio/radio.type.ts +31 -0
- package/src/components/atoms/rating/index.ts +6 -0
- package/src/components/atoms/rating/rating.syn +119 -0
- package/src/components/atoms/rating/rating.type.ts +53 -0
- package/src/components/atoms/skeleton/index.ts +6 -0
- package/src/components/atoms/skeleton/skeleton.syn +31 -0
- package/src/components/atoms/skeleton/skeleton.type.ts +12 -0
- package/src/components/atoms/slider/index.ts +6 -0
- package/src/components/atoms/slider/slider.syn +101 -0
- package/src/components/atoms/slider/slider.type.ts +54 -0
- package/src/components/atoms/spinner/index.ts +6 -0
- package/src/components/atoms/spinner/spinner.syn +39 -0
- package/src/components/atoms/spinner/spinner.type.ts +40 -0
- package/src/components/atoms/stack/index.ts +7 -0
- package/src/components/atoms/stack/stack.syn +79 -0
- package/src/components/atoms/stack/stack.type.ts +42 -0
- package/src/components/atoms/textarea/index.ts +6 -0
- package/src/components/atoms/textarea/textarea.syn +78 -0
- package/src/components/atoms/textarea/textarea.type.ts +28 -0
- package/src/components/atoms/toggle/index.ts +6 -0
- package/src/components/atoms/toggle/toggle.syn +69 -0
- package/src/components/atoms/toggle/toggle.type.ts +27 -0
- package/src/components/atoms/tooltip/index.ts +5 -0
- package/src/components/atoms/tooltip/tooltip.syn +83 -0
- package/src/components/atoms/tooltip/tooltip.type.ts +36 -0
- package/src/components/atoms/typography/index.ts +6 -0
- package/src/components/atoms/typography/typography.syn +113 -0
- package/src/components/atoms/typography/typography.type.ts +36 -0
- package/src/components/enums/alert-variant.type.ts +5 -0
- package/src/components/enums/avatar-size.type.ts +5 -0
- package/src/components/enums/button-type.type.ts +5 -0
- package/src/components/enums/container-max-width.type.ts +5 -0
- package/src/components/enums/container-padding.type.ts +5 -0
- package/src/components/enums/divider-orientation.type.ts +5 -0
- package/src/components/enums/drawer-placement.type.ts +5 -0
- package/src/components/enums/drawer-size.type.ts +5 -0
- package/src/components/enums/icon-position.type.ts +5 -0
- package/src/components/enums/index.ts +27 -0
- package/src/components/enums/input-type.type.ts +5 -0
- package/src/components/enums/modal-size.type.ts +5 -0
- package/src/components/enums/popover-placement.type.ts +5 -0
- package/src/components/enums/popover-trigger.type.ts +5 -0
- package/src/components/enums/progress-size.type.ts +5 -0
- package/src/components/enums/progress-variant.type.ts +5 -0
- package/src/components/enums/readme.md +1 -0
- package/src/components/enums/spacing.type.ts +5 -0
- package/src/components/enums/stack-align.type.ts +5 -0
- package/src/components/enums/stack-justify.type.ts +11 -0
- package/src/components/enums/toast-position.type.ts +11 -0
- package/src/components/enums/toast-variant.type.ts +5 -0
- package/src/components/enums/tooltip-placement.type.ts +5 -0
- package/src/components/enums/typography-tag.type.ts +5 -0
- package/src/components/enums/typography-variant.type.ts +5 -0
- package/src/components/formular/components/debug/form-data-display.syn +155 -0
- package/src/components/formular/components/examples/advanced-text-field.syn +211 -0
- package/src/components/formular/components/form-context/form-context.ts +15 -0
- package/src/components/formular/components/form-context/index.ts +6 -0
- package/src/components/formular/components/form-context/use-form-context.ts +31 -0
- package/src/components/formular/components/form-provider/form-provider.syn +182 -0
- package/src/components/formular/components/form-provider/index.ts +5 -0
- package/src/components/formular/components/index.ts +20 -0
- package/src/components/formular/components/integrated/checkbox-field.syn +50 -0
- package/src/components/formular/components/integrated/checkbox.syn +53 -0
- package/src/components/formular/components/integrated/index.ts +21 -0
- package/src/components/formular/components/integrated/input-field.syn +51 -0
- package/src/components/formular/components/integrated/radio-group-field.syn +68 -0
- package/src/components/formular/components/integrated/radio-group.syn +63 -0
- package/src/components/formular/components/integrated/select-field.syn +51 -0
- package/src/components/formular/components/integrated/select-input.syn +73 -0
- package/src/components/formular/components/integrated/text-field.syn +49 -0
- package/src/components/formular/components/integrated/textarea-field.syn +51 -0
- package/src/components/formular/components/integrated/textarea-input.syn +73 -0
- package/src/components/formular/components/integrated/toggle-field.syn +50 -0
- package/src/components/formular/components/integrated/toggle.syn +53 -0
- package/src/components/formular/components/modal/error-message.syn +21 -0
- package/src/components/formular/components/modal/form-modale.syn +44 -0
- package/src/components/formular/components/modal/form-validation-results.syn +46 -0
- package/src/components/formular/components/modal/guide-message.syn +21 -0
- package/src/components/formular/components/modal/index.ts +10 -0
- package/src/components/formular/components/modal/use-modale.ts +82 -0
- package/src/components/formular/components/modal/validation-results.syn +63 -0
- package/src/components/formular/components/primitives/f-checkbox-field.syn +50 -0
- package/src/components/formular/components/primitives/f-input-field.syn +77 -0
- package/src/components/formular/components/primitives/f-radio-button.syn +64 -0
- package/src/components/formular/components/primitives/f-select-field.syn +61 -0
- package/src/components/formular/components/primitives/f-textarea-field.syn +53 -0
- package/src/components/formular/components/primitives/f-toggle-field.syn +50 -0
- package/src/components/formular/components/primitives/field-label.syn +49 -0
- package/src/components/formular/components/primitives/helper-text.syn +32 -0
- package/src/components/formular/components/primitives/index.ts +32 -0
- package/src/components/formular/components/primitives/validation-results.syn +76 -0
- package/src/components/formular/hooks/bindings/field-bindings.type.ts +58 -0
- package/src/components/formular/hooks/bindings/index.ts +16 -0
- package/src/components/formular/hooks/bindings/use-checkbox-bind.ts +31 -0
- package/src/components/formular/hooks/bindings/use-input-bind.ts +31 -0
- package/src/components/formular/hooks/bindings/use-radio-bind.ts +39 -0
- package/src/components/formular/hooks/bindings/use-select-bind.ts +32 -0
- package/src/components/formular/hooks/bindings/use-textarea-bind.ts +31 -0
- package/src/components/formular/hooks/bindings/use-toggle-bind.ts +31 -0
- package/src/components/formular/hooks/index.ts +28 -0
- package/src/components/formular/hooks/use-field-validation.ts +42 -0
- package/src/components/formular/hooks/use-field.ts +282 -0
- package/src/components/formular/hooks/use-formular-signal.ts +29 -0
- package/src/components/formular/index.ts +3 -0
- package/src/components/formular/types/field-component.type.ts +78 -0
- package/src/components/formular/types/field-descriptor-config.type.ts +79 -0
- package/src/components/formular/types/form-context.type.ts +67 -0
- package/src/components/formular/types/form-provider.type.ts +67 -0
- package/src/components/formular/types/formular.types.ts +49 -0
- package/src/components/formular/types/index.ts +78 -0
- package/src/components/formular/types/portal.type.ts +36 -0
- package/src/components/formular/utils/dev-logger.ts +44 -0
- package/src/components/formular/utils/index.ts +23 -0
- package/src/components/formular/utils/use-field-descriptors.ts +75 -0
- package/src/components/formular/utils/use-formular-manager.ts +37 -0
- package/src/components/hooks/use-drawer-position.ts +91 -0
- package/src/components/interfaces/component-config-internal.interface.ts +10 -0
- package/src/components/interfaces/component-config.interface.ts +57 -0
- package/src/components/interfaces/component-config.ts +151 -0
- package/src/components/interfaces/index.ts +7 -0
- package/src/components/interfaces/prototype/active.ts +13 -0
- package/src/components/interfaces/prototype/border.ts +13 -0
- package/src/components/interfaces/prototype/build.ts +31 -0
- package/src/components/interfaces/prototype/class-name.ts +13 -0
- package/src/components/interfaces/prototype/disabled.ts +13 -0
- package/src/components/interfaces/prototype/focus.ts +13 -0
- package/src/components/interfaces/prototype/full-width.ts +13 -0
- package/src/components/interfaces/prototype/hover.ts +13 -0
- package/src/components/interfaces/prototype/loading.ts +13 -0
- package/src/components/interfaces/prototype/rounded.ts +13 -0
- package/src/components/interfaces/prototype/shadow.ts +13 -0
- package/src/components/interfaces/prototype/size.ts +14 -0
- package/src/components/interfaces/prototype/transition-duration.ts +13 -0
- package/src/components/interfaces/prototype/transition.ts +13 -0
- package/src/components/interfaces/prototype/variant.ts +14 -0
- package/src/components/interfaces/readme.md +1 -0
- package/src/components/molecules/accordion/accordion-item.syn +80 -0
- package/src/components/molecules/accordion/accordion-item.type.ts +28 -0
- package/src/components/molecules/accordion/accordion.syn +92 -0
- package/src/components/molecules/accordion/accordion.type.ts +29 -0
- package/src/components/molecules/accordion/index.ts +8 -0
- package/src/components/molecules/alert/alert-description.syn +23 -0
- package/src/components/molecules/alert/alert-description.type.ts +9 -0
- package/src/components/molecules/alert/alert-icon.syn +19 -0
- package/src/components/molecules/alert/alert-icon.type.ts +9 -0
- package/src/components/molecules/alert/alert-title.syn +19 -0
- package/src/components/molecules/alert/alert-title.type.ts +9 -0
- package/src/components/molecules/alert/alert.syn +76 -0
- package/src/components/molecules/alert/alert.type.ts +17 -0
- package/src/components/molecules/alert/index.ts +12 -0
- package/src/components/molecules/badge/badge.syn +66 -0
- package/src/components/molecules/badge/badge.type.ts +25 -0
- package/src/components/molecules/badge/index.ts +6 -0
- package/src/components/molecules/breadcrumbs/breadcrumb-item.type.ts +23 -0
- package/src/components/molecules/breadcrumbs/breadcrumbs.syn +60 -0
- package/src/components/molecules/breadcrumbs/breadcrumbs.type.ts +18 -0
- package/src/components/molecules/breadcrumbs/index.ts +8 -0
- package/src/components/molecules/button/button.syn +124 -0
- package/src/components/molecules/button/button.type.ts +24 -0
- package/src/components/molecules/button/index.ts +9 -0
- package/src/components/molecules/dropdown/dropdown-item.syn +30 -0
- package/src/components/molecules/dropdown/dropdown-item.type.ts +11 -0
- package/src/components/molecules/dropdown/dropdown.syn +135 -0
- package/src/components/molecules/dropdown/dropdown.type.ts +12 -0
- package/src/components/molecules/dropdown/index.ts +8 -0
- package/src/components/molecules/label/index.ts +6 -0
- package/src/components/molecules/label/label.syn +72 -0
- package/src/components/molecules/label/label.type.ts +28 -0
- package/src/components/molecules/list/index.ts +8 -0
- package/src/components/molecules/list/list-item.syn +33 -0
- package/src/components/molecules/list/list-item.type.ts +10 -0
- package/src/components/molecules/list/list.syn +54 -0
- package/src/components/molecules/list/list.type.ts +17 -0
- package/src/components/molecules/menu/index.ts +10 -0
- package/src/components/molecules/menu/menu-divider.syn +21 -0
- package/src/components/molecules/menu/menu-divider.type.ts +8 -0
- package/src/components/molecules/menu/menu-item.syn +56 -0
- package/src/components/molecules/menu/menu-item.type.ts +12 -0
- package/src/components/molecules/menu/menu.syn +78 -0
- package/src/components/molecules/menu/menu.type.ts +14 -0
- package/src/components/molecules/option/index.ts +6 -0
- package/src/components/molecules/option/option.syn +41 -0
- package/src/components/molecules/option/option.type.ts +23 -0
- package/src/components/molecules/pagination/index.ts +7 -0
- package/src/components/molecules/pagination/pagination.syn +123 -0
- package/src/components/molecules/pagination/pagination.type.ts +34 -0
- package/src/components/molecules/popover/index.ts +6 -0
- package/src/components/molecules/popover/popover.syn +88 -0
- package/src/components/molecules/popover/popover.type.ts +20 -0
- package/src/components/molecules/radio-group/index.ts +7 -0
- package/src/components/molecules/radio-group/radio-group.syn +79 -0
- package/src/components/molecules/radio-group/radio-group.type.ts +29 -0
- package/src/components/molecules/radio-group/radio-option.type.ts +9 -0
- package/src/components/molecules/tabs/index.ts +14 -0
- package/src/components/molecules/tabs/tab-list.syn +70 -0
- package/src/components/molecules/tabs/tab-list.type.ts +9 -0
- package/src/components/molecules/tabs/tab-panel.syn +34 -0
- package/src/components/molecules/tabs/tab-panel.type.ts +11 -0
- package/src/components/molecules/tabs/tab-panels.syn +40 -0
- package/src/components/molecules/tabs/tab-panels.type.ts +9 -0
- package/src/components/molecules/tabs/tab.syn +52 -0
- package/src/components/molecules/tabs/tab.type.ts +13 -0
- package/src/components/molecules/tabs/tabs.syn +74 -0
- package/src/components/molecules/tabs/tabs.type.ts +17 -0
- package/src/components/organisms/card/card.syn +64 -0
- package/src/components/organisms/card/card.type.ts +25 -0
- package/src/components/organisms/card/index.ts +6 -0
- package/src/components/organisms/commands/commands.syn +0 -0
- package/src/components/organisms/commands/commands.type.ts +1 -0
- package/src/components/organisms/date-picker/components/date-picker.body.days.syn +98 -0
- package/src/components/organisms/date-picker/components/date-picker.body.months.syn +77 -0
- package/src/components/organisms/date-picker/components/date-picker.body.years.syn +86 -0
- package/src/components/organisms/date-picker/components/date-picker.cell.syn +104 -0
- package/src/components/organisms/date-picker/components/date-picker.context.ts +36 -0
- package/src/components/organisms/date-picker/components/date-picker.drawer.content.ui.syn +93 -0
- package/src/components/organisms/date-picker/components/date-picker.header.syn +130 -0
- package/src/components/organisms/date-picker/components/date-picker.switch.syn +27 -0
- package/src/components/organisms/date-picker/core/computed/compute-days-grid.ts +46 -0
- package/src/components/organisms/date-picker/core/computed/compute-months-grid.ts +43 -0
- package/src/components/organisms/date-picker/core/computed/compute-range.ts +36 -0
- package/src/components/organisms/date-picker/core/computed/compute-years-grid.ts +56 -0
- package/src/components/organisms/date-picker/core/constructors/create-cell.ts +37 -0
- package/src/components/organisms/date-picker/core/date-picker.types.ts +41 -0
- package/src/components/organisms/date-picker/core/getters/get-current-month-days.ts +35 -0
- package/src/components/organisms/date-picker/core/getters/get-next-date.ts +32 -0
- package/src/components/organisms/date-picker/core/getters/get-next-month-days.ts +23 -0
- package/src/components/organisms/date-picker/core/getters/get-previous-date.ts +32 -0
- package/src/components/organisms/date-picker/core/getters/get-previous-month-days.ts +32 -0
- package/src/components/organisms/date-picker/core/models/date-picker.models.constructors.ts +36 -0
- package/src/components/organisms/date-picker/core/models/date-picker.models.ts +46 -0
- package/src/components/organisms/date-picker/core/system/get-local-system-separator.ts +5 -0
- package/src/components/organisms/date-picker/date-picker.css +426 -0
- package/src/components/organisms/date-picker/date-picker.drawer.content.syn +238 -0
- package/src/components/organisms/date-picker/date-picker.stories.syn +275 -0
- package/src/components/organisms/date-picker/date-picker.syn +298 -0
- package/src/components/organisms/date-picker/examples.syn +197 -0
- package/src/components/organisms/date-picker/hooks/use-object-ref.ts +18 -0
- package/src/components/organisms/date-picker/index.ts +23 -0
- package/src/components/organisms/date-picker/internal-components/button.syn +36 -0
- package/src/components/organisms/date-picker/internal-components/icons.syn +76 -0
- package/src/components/organisms/date-picker/internal-components/portal.syn +62 -0
- package/src/components/organisms/date-picker/toggleable/toggleable.context.hook.ts +14 -0
- package/src/components/organisms/date-picker/toggleable/toggleable.context.ts +6 -0
- package/src/components/organisms/date-picker/toggleable/toggleable.syn +37 -0
- package/src/components/organisms/date-picker/utils/class-utils.ts +25 -0
- package/src/components/organisms/date-picker/utils/date-object.ts +42 -0
- package/src/components/organisms/date-picker/utils/date-utils.ts +112 -0
- package/src/components/organisms/drawer/drawer.syn +112 -0
- package/src/components/organisms/drawer/drawer.type.ts +53 -0
- package/src/components/organisms/drawer/index.ts +6 -0
- package/src/components/organisms/footer/footer.syn +53 -0
- package/src/components/organisms/footer/footer.type.ts +20 -0
- package/src/components/organisms/footer/index.ts +6 -0
- package/src/components/organisms/header/header.syn +52 -0
- package/src/components/organisms/header/header.type.ts +24 -0
- package/src/components/organisms/header/index.ts +6 -0
- package/src/components/organisms/modal/index.ts +12 -0
- package/src/components/organisms/modal/modal-body.syn +19 -0
- package/src/components/organisms/modal/modal-body.type.ts +9 -0
- package/src/components/organisms/modal/modal-footer.syn +25 -0
- package/src/components/organisms/modal/modal-footer.type.ts +9 -0
- package/src/components/organisms/modal/modal-header.syn +25 -0
- package/src/components/organisms/modal/modal-header.type.ts +9 -0
- package/src/components/organisms/modal/modal-parts.syn +21 -0
- package/src/components/organisms/modal/modal.syn +104 -0
- package/src/components/organisms/modal/modal.type.ts +15 -0
- package/src/components/organisms/retractable-panel/retractable-panel.syn +141 -0
- package/src/components/organisms/retractable-panel/retractable-panel.type.ts +52 -0
- package/src/components/organisms/select/index.ts +7 -0
- package/src/components/organisms/select/select-option.type.ts +9 -0
- package/src/components/organisms/select/select.syn +92 -0
- package/src/components/organisms/select/select.type.ts +31 -0
- package/src/components/organisms/stepper/INTEGRATION_GUIDE.md +230 -0
- package/src/components/organisms/stepper/PACKAGE_STATUS.md +180 -0
- package/src/components/organisms/stepper/README.md +293 -0
- package/src/components/organisms/stepper/Step.syn +61 -0
- package/src/components/organisms/stepper/Stepper.syn +605 -0
- package/src/components/organisms/stepper/StepperSummary.syn +36 -0
- package/src/components/organisms/stepper/adapters/atomosFormAdapter.ts +163 -0
- package/src/components/organisms/stepper/adapters/index.ts +7 -0
- package/src/components/organisms/stepper/adapters/rhfAdapter.ts +54 -0
- package/src/components/organisms/stepper/components/StepperDebug.syn +454 -0
- package/src/components/organisms/stepper/components/StepperFooter.syn +144 -0
- package/src/components/organisms/stepper/components/StepperHeader.syn +66 -0
- package/src/components/organisms/stepper/components/StepperTab.syn +118 -0
- package/src/components/organisms/stepper/components/stepperDebug.css +72 -0
- package/src/components/organisms/stepper/components/stepperFooter.css +28 -0
- package/src/components/organisms/stepper/components/stepperHeader.css +49 -0
- package/src/components/organisms/stepper/components/stepperTab.css +97 -0
- package/src/components/organisms/stepper/copy-to-atomos.ps1 +78 -0
- package/src/components/organisms/stepper/core/actions.ts +25 -0
- package/src/components/organisms/stepper/core/formAdapter.ts +66 -0
- package/src/components/organisms/stepper/core/helpers.ts +216 -0
- package/src/components/organisms/stepper/core/models.ts +220 -0
- package/src/components/organisms/stepper/core/reducer/addCustomValidators.ts +14 -0
- package/src/components/organisms/stepper/core/reducer/addError.ts +10 -0
- package/src/components/organisms/stepper/core/reducer/addStep.ts +7 -0
- package/src/components/organisms/stepper/core/reducer/computeSiblingStatus.ts +45 -0
- package/src/components/organisms/stepper/core/reducer/computeValidation.ts +61 -0
- package/src/components/organisms/stepper/core/reducer/goToStep.ts +143 -0
- package/src/components/organisms/stepper/core/reducer/init.ts +7 -0
- package/src/components/organisms/stepper/core/reducer/navigationRequest.ts +16 -0
- package/src/components/organisms/stepper/core/reducer/removeAllErrors.ts +26 -0
- package/src/components/organisms/stepper/core/reducer/removeError.ts +12 -0
- package/src/components/organisms/stepper/core/reducer/reset.ts +44 -0
- package/src/components/organisms/stepper/core/reducer/setData.ts +12 -0
- package/src/components/organisms/stepper/core/reducer/setFieldDefaultValue.ts +39 -0
- package/src/components/organisms/stepper/core/reducer/setFields.ts +41 -0
- package/src/components/organisms/stepper/core/reducer/setStepperDefaultValue.ts +33 -0
- package/src/components/organisms/stepper/core/reducer/setSubmittedTimes.ts +9 -0
- package/src/components/organisms/stepper/core/reducer/setVisible.ts +26 -0
- package/src/components/organisms/stepper/core/reducer/submitRequest.ts +19 -0
- package/src/components/organisms/stepper/core/reducer/updateFormCommon.ts +82 -0
- package/src/components/organisms/stepper/core/state.ts +106 -0
- package/src/components/organisms/stepper/index.ts +34 -0
- package/src/components/organisms/stepper/step.css +66 -0
- package/src/components/organisms/stepper/stepper.css +32 -0
- package/src/components/organisms/stepper/stepper.stories.tsx.disabled +329 -0
- package/src/components/organisms/table/index.ts +14 -0
- package/src/components/organisms/table/table-body.syn +43 -0
- package/src/components/organisms/table/table-body.type.ts +9 -0
- package/src/components/organisms/table/table-cell.syn +35 -0
- package/src/components/organisms/table/table-cell.type.ts +10 -0
- package/src/components/organisms/table/table-header.syn +23 -0
- package/src/components/organisms/table/table-header.type.ts +9 -0
- package/src/components/organisms/table/table-row.syn +35 -0
- package/src/components/organisms/table/table-row.type.ts +9 -0
- package/src/components/organisms/table/table.syn +71 -0
- package/src/components/organisms/table/table.type.ts +17 -0
- package/src/components/organisms/toast/index.ts +10 -0
- package/src/components/organisms/toast/toast-container.syn +108 -0
- package/src/components/organisms/toast/toast-container.type.ts +11 -0
- package/src/components/organisms/toast/toast-options.type.ts +11 -0
- package/src/components/organisms/toast/toast.syn +82 -0
- package/src/components/organisms/toast/toast.type.ts +14 -0
- package/src/components/organisms/toast/use-toast.ts +62 -0
- package/src/components/sidebar-nav.syn +107 -0
- package/src/components/utils/component-config-builder/component-config-builder.ts +49 -0
- package/src/components/utils/component-config-builder/component-config-builder.type.ts +27 -0
- package/src/components/utils/component-config-builder/component-config.type.ts +36 -0
- package/src/components/utils/component-config-builder/index.ts +7 -0
- package/src/components/utils/component-config-builder/prototype/active.ts +10 -0
- package/src/components/utils/component-config-builder/prototype/border.ts +10 -0
- package/src/components/utils/component-config-builder/prototype/build.ts +10 -0
- package/src/components/utils/component-config-builder/prototype/class-name.ts +10 -0
- package/src/components/utils/component-config-builder/prototype/color.ts +11 -0
- package/src/components/utils/component-config-builder/prototype/disabled.ts +10 -0
- package/src/components/utils/component-config-builder/prototype/focus.ts +10 -0
- package/src/components/utils/component-config-builder/prototype/full-width.ts +10 -0
- package/src/components/utils/component-config-builder/prototype/hover.ts +10 -0
- package/src/components/utils/component-config-builder/prototype/loading.ts +10 -0
- package/src/components/utils/component-config-builder/prototype/rounded.ts +11 -0
- package/src/components/utils/component-config-builder/prototype/shadow.ts +11 -0
- package/src/components/utils/component-config-builder/prototype/size.ts +11 -0
- package/src/components/utils/component-config-builder/prototype/transition-duration.ts +11 -0
- package/src/components/utils/component-config-builder/prototype/transition.ts +10 -0
- package/src/components/utils/component-config-builder/prototype/variant.ts +11 -0
- package/src/components/utils/component-styling-builder/component-styling-builder.ts +45 -0
- package/src/components/utils/component-styling-builder/component-styling-builder.type.ts +26 -0
- package/src/components/utils/component-styling-builder/component-styling.type.ts +21 -0
- package/src/components/utils/component-styling-builder/index.ts +7 -0
- package/src/components/utils/component-styling-builder/prototype/active.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/background.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/base.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/border.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/build.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/custom.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/disabled.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/focus.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/hover.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/loading.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/read-only.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/rounded.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/shadow.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/size.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/transition.ts +10 -0
- package/src/components/utils/component-styling-builder/prototype/variant.ts +10 -0
- package/src/components/utils/index.ts +6 -0
- package/src/components/utils/readme.md +1 -0
- package/src/css.d.ts +14 -0
- package/src/debug-tokens.syn +11 -0
- package/src/design/sizes/index.ts +6 -0
- package/src/design/utility/class-names.ts +6 -0
- package/src/design/utility/index.ts +6 -0
- package/src/design/utility/rounded-classes.ts +6 -0
- package/src/docs/EXAMPLES.md +319 -0
- package/src/docs/EXAMPLES.ts.md +188 -0
- package/src/docs/IMPLEMENTATION_COMPLETE.md +232 -0
- package/src/docs/IMPLEMENTATION_PATTERN.md +319 -0
- package/src/docs/copilot-implementation-rules.md +328 -0
- package/src/index.ts +23 -0
- package/src/jsx.d.ts +8 -0
- package/src/lab/counter.syn +76 -0
- package/src/lab/transformer/README.md +115 -0
- package/src/lab/transformer/async-lazy-loading/2026-02-11-14-20-async-lazy-loading.syn +242 -0
- package/src/lab/transformer/batch-updates/2026-02-11-14-20-batch-updates.syn +228 -0
- package/src/lab/transformer/catcher-error-handlers/2026-02-11-14-20-catcher-error-handlers.syn +211 -0
- package/src/lab/transformer/complex-jsx-expressions/2026-02-11-14-20-complex-jsx-expressions.syn +49 -0
- package/src/lab/transformer/complex-jsx-expressions/2026-02-11-15-01-complex-jsx-expressions.syn +227 -0
- package/src/lab/transformer/concurrent-rendering/2026-02-11-14-20-concurrent-rendering.syn +291 -0
- package/src/lab/transformer/create-context-providers/2026-02-11-14-20-create-context-providers.syn +240 -0
- package/src/lab/transformer/create-effect-side-effects/2026-02-11-14-20-create-effect-side-effects.syn +339 -0
- package/src/lab/transformer/create-resource/2026-02-11-14-20-create-resource.syn +80 -0
- package/src/lab/transformer/dynamic-components/2026-02-11-14-20-dynamic-components.syn +78 -0
- package/src/lab/transformer/dynamic-components/2026-02-11-15-09-dynamic-components.syn +468 -0
- package/src/lab/transformer/for-iteration/2026-02-11-14-20-for-iteration.syn +62 -0
- package/src/lab/transformer/for-iteration-components/2026-02-11-15-07-for-iteration-components.syn +489 -0
- package/src/lab/transformer/generic-type-arguments/2026-02-11-14-20-generic-type-arguments.syn +53 -0
- package/src/lab/transformer/generic-type-arguments/2026-02-11-15-02-generic-type-arguments.syn +140 -0
- package/src/lab/transformer/memo-optimization/2026-02-11-14-20-memo-optimization.syn +275 -0
- package/src/lab/transformer/on-cleanup-patterns/2026-02-11-14-20-on-cleanup-patterns.syn +375 -0
- package/src/lab/transformer/on-mount-lifecycle/2026-02-11-14-20-on-mount-lifecycle.syn +347 -0
- package/src/lab/transformer/portal-transformation/2026-02-11-14-20-portal-transformation.syn +141 -0
- package/src/lab/transformer/render-effect-timing/2026-02-11-14-20-render-effect-timing.syn +334 -0
- package/src/lab/transformer/resource-dependency-tracking/2026-02-11-14-20-resource-dependency-tracking.syn +153 -0
- package/src/lab/transformer/resource-loading-states/2026-02-11-14-20-resource-loading-states.syn +382 -0
- package/src/lab/transformer/resource-mutations/2026-02-11-14-20-resource-mutations.syn +399 -0
- package/src/lab/transformer/resource-parallel-fetching/2026-02-11-14-20-resource-parallel-fetching.syn +446 -0
- package/src/lab/transformer/resource-pre-resolution/2026-02-11-14-20-resource-pre-resolution.syn +405 -0
- package/src/lab/transformer/resource-refetch-patterns/2026-02-11-14-20-resource-refetch-patterns.syn +120 -0
- package/src/lab/transformer/resource-state-handling/2026-02-11-14-20-resource-state-handling.syn +104 -0
- package/src/lab/transformer/server-side-rendering/2026-02-11-14-20-server-side-rendering.syn +234 -0
- package/src/lab/transformer/show-components/2026-02-11-14-20-show-components.syn +57 -0
- package/src/lab/transformer/show-when-components/2026-02-11-15-03-show-when-components.syn +202 -0
- package/src/lab/transformer/template-literals/2026-02-11-14-20-template-literals.syn +34 -0
- package/src/lab/transformer/template-literals/2026-02-11-15-00-template-literals.syn +146 -0
- package/src/lab/transformer/tryer-error-boundaries/2026-02-11-14-20-tryer-error-boundaries.syn +111 -0
- package/src/lab/transformer/type-inference-system/2026-02-11-14-20-type-inference-system.syn +50 -0
- package/src/lab/transformer/type-inference-system/2026-02-11-15-05-type-inference-system.syn +353 -0
- package/src/lab/transformer/untrack-isolation/2026-02-11-14-20-untrack-isolation.syn +326 -0
- package/src/lab/transformer/waiting-suspense/2026-02-11-14-20-waiting-suspense.syn +78 -0
- package/src/main-simple.syn +23 -0
- package/src/main.syn +101 -0
- package/src/main.ts +57 -0
- package/src/showcase/__tests__/e2e/context-structure.spec.ts +46 -0
- package/src/showcase/__tests__/e2e/context-ui.spec.ts +137 -0
- package/src/showcase/__tests__/e2e/control-flow-ui.spec.ts +149 -0
- package/src/showcase/__tests__/e2e/debug-compiled.spec.ts +13 -0
- package/src/showcase/__tests__/e2e/debug-screenshot.png +0 -0
- package/src/showcase/__tests__/e2e/debug.spec.ts +20 -0
- package/src/showcase/__tests__/e2e/deep-debug.spec.ts +130 -0
- package/src/showcase/__tests__/e2e/error-boundary-ui.spec.ts +113 -0
- package/src/showcase/__tests__/e2e/main-transformed.js +0 -0
- package/src/showcase/__tests__/e2e/portal-ui.spec.ts +135 -0
- package/src/showcase/__tests__/e2e/reactivity-ui.spec.ts +81 -0
- package/src/showcase/__tests__/e2e/resource-debug.spec.ts +37 -0
- package/src/showcase/__tests__/e2e/visual-debug.spec.ts +147 -0
- package/src/showcase/__tests__/integration/context-provider-consumer.test.ts +114 -0
- package/src/showcase/__tests__/integration/context-ui.test.ts +150 -0
- package/src/showcase/__tests__/integration/error-boundary-reactivity.test.ts +164 -0
- package/src/showcase/__tests__/integration/reactivity-control-flow.test.ts +226 -0
- package/src/showcase/__tests__/integration/reactivity-cross-component.test.ts +103 -0
- package/src/showcase/__tests__/integration/showcase-navigation.test.ts +159 -0
- package/src/showcase/__tests__/setup.ts +37 -0
- package/src/showcase/__tests__/unit/context.test.ts +122 -0
- package/src/showcase/__tests__/unit/control-flow.test.ts +167 -0
- package/src/showcase/__tests__/unit/error-boundary.test.ts +116 -0
- package/src/showcase/__tests__/unit/portal.test.ts +122 -0
- package/src/showcase/__tests__/unit/reactivity.test.ts +152 -0
- package/src/showcase/about/about.syn +59 -0
- package/src/showcase/about/components/details-section.syn +29 -0
- package/src/showcase/about/components/feature-list.syn +23 -0
- package/src/showcase/about/components/index.ts +7 -0
- package/src/showcase/about/components/route-info.syn +29 -0
- package/src/showcase/bootstrap/bootstrap-test.syn +152 -0
- package/src/showcase/bootstrap/components/config-service-error-view.syn +41 -0
- package/src/showcase/bootstrap/components/config-service-resolved-view.syn +69 -0
- package/src/showcase/bootstrap/demos/basic-demo.syn +26 -0
- package/src/showcase/bootstrap/demos/di-demo-interactive.syn +94 -0
- package/src/showcase/bootstrap/demos/di-demo.syn +64 -0
- package/src/showcase/bootstrap/demos/lifecycle-demo.syn +74 -0
- package/src/showcase/bootstrap/demos/return-value-demo.syn +95 -0
- package/src/showcase/bootstrap/types/config-service.types.ts +9 -0
- package/src/showcase/common/components/code-block.syn +24 -0
- package/src/showcase/common/components/console-log-viewer.syn +133 -0
- package/src/showcase/common/components/demo-button.syn +42 -0
- package/src/showcase/common/components/demo-section.syn +29 -0
- package/src/showcase/common/components/index.ts +13 -0
- package/src/showcase/common/components/isolated-demo.syn +95 -0
- package/src/showcase/common/components/modal.syn +58 -0
- package/src/showcase/common/components/page-header.syn +29 -0
- package/src/showcase/common/components/status-indicator.syn +34 -0
- package/src/showcase/common/examples/logging-example.syn +67 -0
- package/src/showcase/common/hooks/use-logger.ts +60 -0
- package/src/showcase/context/components/index.ts +12 -0
- package/src/showcase/context/components/multi-context-dashboard.syn +135 -0
- package/src/showcase/context/components/settings-provider.syn +35 -0
- package/src/showcase/context/components/theme-controls.syn +51 -0
- package/src/showcase/context/components/theme-provider.syn +25 -0
- package/src/showcase/context/components/themed-box.syn +20 -0
- package/src/showcase/context/components/user-controls.syn +38 -0
- package/src/showcase/context/components/user-profile.syn +26 -0
- package/src/showcase/context/components/user-provider.syn +34 -0
- package/src/showcase/context/context-test.syn +66 -0
- package/src/showcase/control-flow/components/for-demo.syn +67 -0
- package/src/showcase/control-flow/components/index-demo.syn +41 -0
- package/src/showcase/control-flow/components/index.ts +8 -0
- package/src/showcase/control-flow/components/show-demo.syn +53 -0
- package/src/showcase/control-flow/control-flow-test.syn +104 -0
- package/src/showcase/di/components/circular-dependency-demo.syn +113 -0
- package/src/showcase/di/components/hierarchical-di-demo.syn +81 -0
- package/src/showcase/di/components/index.ts +6 -0
- package/src/showcase/di/components/lifetime-card.syn +30 -0
- package/src/showcase/di/components/registered-services-list.syn +29 -0
- package/src/showcase/di/components/resolution-result.syn +34 -0
- package/src/showcase/di/components/service-button.syn +26 -0
- package/src/showcase/di/components/service-lifetime-demo.syn +135 -0
- package/src/showcase/di/components/service-registration-demo.syn +85 -0
- package/src/showcase/di/components/service-resolution-demo.syn +145 -0
- package/src/showcase/di/di-test.syn +121 -0
- package/src/showcase/di/services/demo-services.ts +128 -0
- package/src/showcase/drag-drop/components/drag-drop-zone-demo.syn +75 -0
- package/src/showcase/drag-drop/components/index.ts +7 -0
- package/src/showcase/drag-drop/components/kanban-board-demo.syn +76 -0
- package/src/showcase/drag-drop/components/sortable-list-demo.syn +71 -0
- package/src/showcase/drag-drop/drag-drop-test.syn +44 -0
- package/src/showcase/error-boundary/components/basic-boundary-demo.syn +54 -0
- package/src/showcase/error-boundary/components/boundary-section.syn +47 -0
- package/src/showcase/error-boundary/components/cleanup-demo.syn +88 -0
- package/src/showcase/error-boundary/components/control-button-group.syn +48 -0
- package/src/showcase/error-boundary/components/error-boundary-control-panel.syn +76 -0
- package/src/showcase/error-boundary/components/error-boundary-status-summary.syn +46 -0
- package/src/showcase/error-boundary/components/error-component.syn +15 -0
- package/src/showcase/error-boundary/components/error-display.syn +27 -0
- package/src/showcase/error-boundary/components/index.ts +14 -0
- package/src/showcase/error-boundary/components/reset-flow-demo.syn +107 -0
- package/src/showcase/error-boundary/components/retry-counter-demo.syn +97 -0
- package/src/showcase/error-boundary/components/safe-component.syn +12 -0
- package/src/showcase/error-boundary/components/visual-boundary-wrapper.syn +78 -0
- package/src/showcase/error-boundary/error-boundary-mega.syn +180 -0
- package/src/showcase/error-boundary/error-boundary-simple.syn +88 -0
- package/src/showcase/error-boundary/error-boundary-test.syn +77 -0
- package/src/showcase/forms/components/async-validation-demo.syn +101 -0
- package/src/showcase/forms/components/basic-form-demo.syn +42 -0
- package/src/showcase/forms/components/field-state-demo.syn +70 -0
- package/src/showcase/forms/components/index.ts +9 -0
- package/src/showcase/forms/components/submission-demo.syn +78 -0
- package/src/showcase/forms/components/validation-demo.syn +59 -0
- package/src/showcase/forms/forms-test.syn +179 -0
- package/src/showcase/forms/pages/cross-validation-page.syn +181 -0
- package/src/showcase/forms/pages/dependent-fields-page.syn +122 -0
- package/src/showcase/forms/pages/dynamic-fields-page.syn +245 -0
- package/src/showcase/forms/pages/edit-form-page.syn +163 -0
- package/src/showcase/forms/pages/index.ts +10 -0
- package/src/showcase/forms/pages/select-controls-page.syn +112 -0
- package/src/showcase/forms/pages/wizard-page.syn +253 -0
- package/src/showcase/home/home.syn +22 -0
- package/src/showcase/http/components/abort-demo.syn +87 -0
- package/src/showcase/http/components/basic-requests-demo.syn +88 -0
- package/src/showcase/http/components/index.ts +8 -0
- package/src/showcase/http/components/interceptors-demo.syn +90 -0
- package/src/showcase/http/components/retry-demo.syn +84 -0
- package/src/showcase/http/http-test.syn +88 -0
- package/src/showcase/index.ts +46 -0
- package/src/showcase/jsx/components/event-handlers-demo.syn +78 -0
- package/src/showcase/jsx/components/index.ts +7 -0
- package/src/showcase/jsx/components/reactive-attributes-demo.syn +69 -0
- package/src/showcase/jsx/components/style-objects-demo.syn +40 -0
- package/src/showcase/jsx/jsx-test.syn +81 -0
- package/src/showcase/pages/__tests__/about.test.ts +120 -0
- package/src/showcase/pages/__tests__/assignment-test.test.ts +68 -0
- package/src/showcase/pages/__tests__/context-test.test.ts +218 -0
- package/src/showcase/pages/__tests__/control-flow-test.test.ts +184 -0
- package/src/showcase/pages/__tests__/error-boundary-test.test.ts +220 -0
- package/src/showcase/pages/__tests__/home.test.ts +54 -0
- package/src/showcase/pages/__tests__/jsx-test.test.ts +182 -0
- package/src/showcase/pages/__tests__/reactivity-test.test.ts +177 -0
- package/src/showcase/pages/__tests__/resource-test.test.ts +215 -0
- package/src/showcase/pages/error-boundary-mega-demo.syn +0 -0
- package/src/showcase/portal/components/basic-portal-demo.syn +41 -0
- package/src/showcase/portal/components/index.ts +7 -0
- package/src/showcase/portal/components/modal-portal-demo.syn +84 -0
- package/src/showcase/portal/components/tooltip-portal-demo.syn +56 -0
- package/src/showcase/portal/portal-test.syn +44 -0
- package/src/showcase/reactivity/components/batch-demo.syn +43 -0
- package/src/showcase/reactivity/components/effect-demo.syn +19 -0
- package/src/showcase/reactivity/components/index.ts +11 -0
- package/src/showcase/reactivity/components/memo-demo.syn +29 -0
- package/src/showcase/reactivity/components/render-effect-demo.syn +78 -0
- package/src/showcase/reactivity/components/signal-demo.syn +45 -0
- package/src/showcase/reactivity/components/untrack-demo.syn +67 -0
- package/src/showcase/reactivity/components/use-sync-demo.syn +96 -0
- package/src/showcase/reactivity/reactivity-test.syn +170 -0
- package/src/showcase/resource/components/cache-demo.syn +141 -0
- package/src/showcase/resource/components/coordination-demo.syn +136 -0
- package/src/showcase/resource/components/deduplication-demo.syn +33 -0
- package/src/showcase/resource/components/error-resource-demo.syn +93 -0
- package/src/showcase/resource/components/image-card.syn +53 -0
- package/src/showcase/resource/components/image-gallery-demo.syn +56 -0
- package/src/showcase/resource/components/index.ts +15 -0
- package/src/showcase/resource/components/mock-api.ts +67 -0
- package/src/showcase/resource/components/refetch-clear-demo.syn +99 -0
- package/src/showcase/resource/components/suspend-control-demo.syn +62 -0
- package/src/showcase/resource/components/suspense-skeleton.syn +24 -0
- package/src/showcase/resource/components/user-card.syn +57 -0
- package/src/showcase/resource/components/waiting-demo.syn +118 -0
- package/src/showcase/resource/resource-test.syn +193 -0
- package/src/showcase/routing/components/guard-demo.syn +75 -0
- package/src/showcase/routing/components/index.ts +9 -0
- package/src/showcase/routing/components/navigation-demo.syn +47 -0
- package/src/showcase/routing/components/nested-outlet-demo.syn +73 -0
- package/src/showcase/routing/components/params-demo.syn +54 -0
- package/src/showcase/routing/components/query-demo.syn +63 -0
- package/src/showcase/routing/routing-test.syn +102 -0
- package/src/showcase/ssr/components/escape-demo.syn +80 -0
- package/src/showcase/ssr/components/hydrate-demo.syn +142 -0
- package/src/showcase/ssr/components/hydration-script-demo.syn +104 -0
- package/src/showcase/ssr/components/index.ts +8 -0
- package/src/showcase/ssr/components/render-to-string-demo.syn +71 -0
- package/src/showcase/ssr/ssr-test.syn +88 -0
- package/src/showcase/svg-canvas/board/components/canvas-badge-list.syn +59 -0
- package/src/showcase/svg-canvas/board/components/canvas-draw-preview.syn +75 -0
- package/src/showcase/svg-canvas/board/components/canvas-toolbar.syn +59 -0
- package/src/showcase/svg-canvas/board/components/line-canvas.syn +673 -0
- package/src/showcase/svg-canvas/board/components/side-toolbox.syn +51 -0
- package/src/showcase/svg-canvas/board/components/svg/canvas-dot-grid.syn +18 -0
- package/src/showcase/svg-canvas/board/model/i-board.ts +20 -0
- package/src/showcase/svg-canvas/board/store/canvas-board.slice.ts +51 -0
- package/src/showcase/svg-canvas/index.ts +2 -0
- package/src/showcase/svg-canvas/line/components/canvas-line-item.syn +85 -0
- package/src/showcase/svg-canvas/line/components/svg/svg-endpoint-handle.syn +29 -0
- package/src/showcase/svg-canvas/line/components/svg/svg-line-label.syn +33 -0
- package/src/showcase/svg-canvas/line/entity/canvas-line.ts +42 -0
- package/src/showcase/svg-canvas/line/entity/create-canvas-line.ts +24 -0
- package/src/showcase/svg-canvas/line/model/i-canvas-line.ts +42 -0
- package/src/showcase/svg-canvas/line/store/canvas-line.slice.ts +38 -0
- package/src/showcase/svg-canvas/modal/components/canvas-settings-modal.syn +118 -0
- package/src/showcase/svg-canvas/modal/model/i-canvas-modal.ts +10 -0
- package/src/showcase/svg-canvas/modal/store/canvas-modal.slice.ts +36 -0
- package/src/showcase/svg-canvas/shape/components/canvas-anchor-group.syn +33 -0
- package/src/showcase/svg-canvas/shape/components/canvas-diamond-body.syn +48 -0
- package/src/showcase/svg-canvas/shape/components/canvas-entity-card.syn +89 -0
- package/src/showcase/svg-canvas/shape/components/canvas-rect-body.syn +37 -0
- package/src/showcase/svg-canvas/shape/components/canvas-shape-item.syn +110 -0
- package/src/showcase/svg-canvas/shape/components/card-header.syn +45 -0
- package/src/showcase/svg-canvas/shape/components/property-row.syn +29 -0
- package/src/showcase/svg-canvas/shape/components/svg/svg-anchor-circle.syn +44 -0
- package/src/showcase/svg-canvas/shape/entity/canvas-diamond.ts +102 -0
- package/src/showcase/svg-canvas/shape/entity/canvas-entity.ts +19 -0
- package/src/showcase/svg-canvas/shape/entity/canvas-rectangle.ts +53 -0
- package/src/showcase/svg-canvas/shape/entity/canvas-square.ts +72 -0
- package/src/showcase/svg-canvas/shape/entity/create-shape.ts +69 -0
- package/src/showcase/svg-canvas/shape/model/i-shape.ts +37 -0
- package/src/showcase/svg-canvas/shape/store/canvas-shape.slice.ts +38 -0
- package/src/showcase/svg-canvas/shared/atoms/canvas-badge.syn +34 -0
- package/src/showcase/svg-canvas/shared/atoms/canvas-icon-btn.syn +32 -0
- package/src/showcase/svg-canvas/shared/atoms/canvas-text-input.syn +27 -0
- package/src/showcase/svg-canvas/shared/helpers/canvas-dom-ops.ts +187 -0
- package/src/showcase/svg-canvas/shared/helpers/canvas-helpers.ts +112 -0
- package/src/showcase/svg-canvas/shared/helpers/route-orthogonal.ts +176 -0
- package/src/showcase/svg-canvas/shared/model/i-drag.ts +84 -0
- package/src/showcase/svg-canvas/shared/model/i-entity.ts +71 -0
- package/src/showcase/svg-canvas/store/canvas-store.ts +60 -0
- package/src/showcase/svg-canvas/svg-canvas-page.syn +28 -0
- package/src/showcase/tests/assignment-test.syn +37 -0
- package/src/showcase/tests/minimal-export-test.syn +7 -0
- package/src/showcase/tests/object-literal-test.syn +26 -0
- package/src/showcase/tests/simple-codegen-test.syn +12 -0
- package/src/showcase/tests/simple-test.syn +51 -0
- package/src/showcase/tests/template-literal-demo.syn +138 -0
- package/src/showcase-styles.css +96 -0
- package/src/styles/design-system.css +275 -0
- package/src/styles/motion.css +121 -0
- package/src/styles/showcase-base.css +522 -0
- package/src/styles/showcase.css +653 -0
- package/src/styles/state-layers.css +55 -0
- package/src/styles/touch-targets.css +41 -0
- package/src/styles/transitions.css +617 -0
- package/src/styles/utilities.css +115 -0
- package/src/styles.css +23 -0
- package/src/test-keywords.syn +15 -0
- package/src/test-loop.syn +29 -0
- package/src/test-minimal.syn +9 -0
- package/src/test-object-literal.syn +19 -0
- package/src/test-simple.syn +12 -0
- package/src/types/psr-modules.d.ts +6 -0
- package/src/types.ts +37 -0
- package/tailwind.config.js +354 -0
- package/test-results/.last-run.json +4 -0
- package/test-signal-debug.syn +9 -0
- package/test-transformation.ts +35 -0
- package/tsconfig.build.json +31 -0
- package/tsconfig.json +44 -0
- package/tsconfig.stories.json +10 -0
- package/vite.config.ts +47 -0
- package/vitest.config.ts +41 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useToggleBind
|
|
3
|
+
*
|
|
4
|
+
* Adapts a formular IUseFieldResult to the props contract of atom/toggle/Toggle.
|
|
5
|
+
* Called inside a component render function — values are evaluated in the reactive context.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* const field = useFormContext().getField('notifications')
|
|
10
|
+
* const state = useField(field)
|
|
11
|
+
* const bind = useToggleBind(state)
|
|
12
|
+
* return <Toggle {...bind} />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import type { IUseFieldResult } from '../use-field';
|
|
17
|
+
import type { IToggleBindProps } from './field-bindings.type';
|
|
18
|
+
|
|
19
|
+
export function useToggleBind(field: IUseFieldResult): IToggleBindProps {
|
|
20
|
+
return {
|
|
21
|
+
name: field.name(),
|
|
22
|
+
checked: () => Boolean(field.value()),
|
|
23
|
+
disabled: field.isDisabled,
|
|
24
|
+
required: field.isRequired,
|
|
25
|
+
'aria-invalid': field.hasErrors,
|
|
26
|
+
'aria-required': field.isRequired,
|
|
27
|
+
onChange: (checked: boolean) => field.setValue(checked),
|
|
28
|
+
onFocus: field.focus,
|
|
29
|
+
onBlur: field.blur,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hooks exports
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export { useField } from './use-field';
|
|
6
|
+
export type { IUseFieldResult } from './use-field';
|
|
7
|
+
export { useFieldValidation } from './use-field-validation';
|
|
8
|
+
export type { IFieldValidationResult } from './use-field-validation';
|
|
9
|
+
export { useFormularSignal } from './use-formular-signal';
|
|
10
|
+
|
|
11
|
+
// Signal adapter / headless bind hooks — atoms stay agnostic of formular
|
|
12
|
+
export {
|
|
13
|
+
useCheckboxBind,
|
|
14
|
+
useInputBind,
|
|
15
|
+
useRadioBind,
|
|
16
|
+
useSelectBind,
|
|
17
|
+
useTextareaBind,
|
|
18
|
+
useToggleBind,
|
|
19
|
+
} from './bindings';
|
|
20
|
+
export type {
|
|
21
|
+
IBaseBindProps,
|
|
22
|
+
ICheckboxBindProps,
|
|
23
|
+
IInputBindProps,
|
|
24
|
+
IRadioBindProps,
|
|
25
|
+
ISelectBindProps,
|
|
26
|
+
ITextareaBindProps,
|
|
27
|
+
IToggleBindProps,
|
|
28
|
+
} from './bindings';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useFieldValidation hook
|
|
3
|
+
* Abstracts validation data gathering from formular.dev fields
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* const { hasErrors, errors, guides } = useFieldValidation(field);
|
|
8
|
+
*
|
|
9
|
+
* return (
|
|
10
|
+
* <div>
|
|
11
|
+
* {hasErrors() && <ErrorList errors={errors()} />}
|
|
12
|
+
* </div>
|
|
13
|
+
* );
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { IFieldGuide } from '@synetics/formular.dev';
|
|
18
|
+
import type { IFieldError, IValidationResult } from '../types';
|
|
19
|
+
import { useField } from './use-field';
|
|
20
|
+
|
|
21
|
+
export interface IFieldValidationResult {
|
|
22
|
+
/** Reactive function: returns true if field has validation errors */
|
|
23
|
+
hasErrors: () => boolean;
|
|
24
|
+
/** Reactive function: returns array of error messages */
|
|
25
|
+
errors: () => IFieldError[];
|
|
26
|
+
/** Reactive function: returns array of guide/hint messages */
|
|
27
|
+
guides: () => IFieldGuide[];
|
|
28
|
+
/** Reactive function: returns raw validation results */
|
|
29
|
+
validationResults: () => IValidationResult[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Hook to extract and track validation state from formular.dev field
|
|
34
|
+
*
|
|
35
|
+
* @param field - The formular.dev field instance (from form.getField())
|
|
36
|
+
* @returns Reactive functions for validation state
|
|
37
|
+
*/
|
|
38
|
+
export function useFieldValidation(field: any): IFieldValidationResult {
|
|
39
|
+
// Delegate to the unified useField hook — it owns the single notifier bridge.
|
|
40
|
+
const { hasErrors, errors, guides, validationResults } = useField(field);
|
|
41
|
+
return { hasErrors, errors, guides, validationResults };
|
|
42
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useField hook - Unified formular.dev field synchronization
|
|
3
|
+
*
|
|
4
|
+
* This hook consolidates ALL field state reactivity in ONE place for optimal performance.
|
|
5
|
+
* Instead of having multiple hooks (useFieldValidation, useFieldState, useFieldFocus, etc.),
|
|
6
|
+
* this single hook syncs all formular.dev signals to Pulsar reactivity.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const field = formContext.getField('email');
|
|
11
|
+
* const {
|
|
12
|
+
* value,
|
|
13
|
+
* setValue,
|
|
14
|
+
* hasErrors,
|
|
15
|
+
* errors,
|
|
16
|
+
* guides,
|
|
17
|
+
* isValid,
|
|
18
|
+
* isDirty,
|
|
19
|
+
* isPristine,
|
|
20
|
+
* isTouched,
|
|
21
|
+
* isFocused,
|
|
22
|
+
* isDisabled,
|
|
23
|
+
* isRequired,
|
|
24
|
+
* focus,
|
|
25
|
+
* blur,
|
|
26
|
+
* reset,
|
|
27
|
+
* } = useField(field);
|
|
28
|
+
*
|
|
29
|
+
* return (
|
|
30
|
+
* <input
|
|
31
|
+
* value={value()}
|
|
32
|
+
* onInput={(e) => setValue(e.target.value)}
|
|
33
|
+
* disabled={isDisabled()}
|
|
34
|
+
* required={isRequired()}
|
|
35
|
+
* />
|
|
36
|
+
* );
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
import type { IFieldGuide } from '@synetics/formular.dev';
|
|
41
|
+
import { useSync } from '@synetics/synetics.dev';
|
|
42
|
+
import type { IFieldError, IValidationResult } from '../types';
|
|
43
|
+
|
|
44
|
+
export interface IUseFieldResult {
|
|
45
|
+
// ==================== VALUE MANAGEMENT ====================
|
|
46
|
+
/** Reactive function: returns current field value */
|
|
47
|
+
value: () => any;
|
|
48
|
+
/** Set field value programmatically */
|
|
49
|
+
setValue: (newValue: any) => void;
|
|
50
|
+
|
|
51
|
+
// ==================== VALIDATION STATE ====================
|
|
52
|
+
/** Reactive function: returns true if field has validation errors */
|
|
53
|
+
hasErrors: () => boolean;
|
|
54
|
+
/** Reactive function: returns array of error messages */
|
|
55
|
+
errors: () => IFieldError[];
|
|
56
|
+
/** Reactive function: returns array of guide/hint messages */
|
|
57
|
+
guides: () => IFieldGuide[];
|
|
58
|
+
/** Reactive function: returns raw validation results */
|
|
59
|
+
validationResults: () => IValidationResult[];
|
|
60
|
+
|
|
61
|
+
// ==================== FIELD STATE ====================
|
|
62
|
+
/** Reactive function: returns true if field passes all validation */
|
|
63
|
+
isValid: () => boolean;
|
|
64
|
+
/** Reactive function: returns true if field has been modified */
|
|
65
|
+
isDirty: () => boolean;
|
|
66
|
+
/** Reactive function: returns true if field is in original state */
|
|
67
|
+
isPristine: () => boolean;
|
|
68
|
+
/** Reactive function: returns true if field has been interacted with */
|
|
69
|
+
isTouched: () => boolean;
|
|
70
|
+
/** Reactive function: returns true if field currently has focus */
|
|
71
|
+
isFocused: () => boolean;
|
|
72
|
+
|
|
73
|
+
// ==================== FIELD PROPERTIES ====================
|
|
74
|
+
/** Reactive function: returns true if field is disabled */
|
|
75
|
+
isDisabled: () => boolean;
|
|
76
|
+
/** Reactive function: returns true if field is required */
|
|
77
|
+
isRequired: () => boolean;
|
|
78
|
+
/** Get field label */
|
|
79
|
+
label: () => string;
|
|
80
|
+
/** Get field name */
|
|
81
|
+
name: () => string;
|
|
82
|
+
/** Get field type */
|
|
83
|
+
type: () => string;
|
|
84
|
+
|
|
85
|
+
// ==================== FIELD ACTIONS ====================
|
|
86
|
+
/** Focus the field */
|
|
87
|
+
focus: () => void;
|
|
88
|
+
/** Blur the field */
|
|
89
|
+
blur: () => void;
|
|
90
|
+
/** Reset field to default value */
|
|
91
|
+
reset: () => void;
|
|
92
|
+
/** Mark field as touched */
|
|
93
|
+
touch: () => void;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Hook to sync ALL formular.dev field state to Pulsar reactivity
|
|
98
|
+
*
|
|
99
|
+
* This is the ONE hook to rule them all - consolidates all field behaviors:
|
|
100
|
+
* - Value management
|
|
101
|
+
* - Validation state
|
|
102
|
+
* - User interaction state (touched, focused, dirty)
|
|
103
|
+
* - Field properties (disabled, required)
|
|
104
|
+
* - Field actions (focus, blur, reset)
|
|
105
|
+
*
|
|
106
|
+
* @param field - The formular.dev field instance (from form.getField())
|
|
107
|
+
* @returns Complete reactive field interface
|
|
108
|
+
*/
|
|
109
|
+
export function useField(field: any): IUseFieldResult {
|
|
110
|
+
if (!field) {
|
|
111
|
+
throw new Error('[useField] Field instance is required');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const input = field.input;
|
|
115
|
+
|
|
116
|
+
// ==================== SINGLE OBSERVER-CHANNEL BRIDGE ====================
|
|
117
|
+
// formular.dev's reactive flow runs through `notifiers` (debounceNotify path),
|
|
118
|
+
// NOT through `observers`. The value setter calls debounceNotify('onUiUpdate', ...)
|
|
119
|
+
// after every value change; handleValidation calls it after every validation run.
|
|
120
|
+
// We register a notifier that listens to 'onUiUpdate' events and calls notify(),
|
|
121
|
+
// which re-reads all plain formular.dev properties fresh from the field instance.
|
|
122
|
+
// Key = `"${event.target}.${event.action}"` — must be unique per field instance.
|
|
123
|
+
const snapshot = useSync<{
|
|
124
|
+
value: any;
|
|
125
|
+
validationResults: IValidationResult[];
|
|
126
|
+
isValid: boolean;
|
|
127
|
+
isDirty: boolean;
|
|
128
|
+
isPristine: boolean;
|
|
129
|
+
isFocus: boolean;
|
|
130
|
+
isRequired: boolean;
|
|
131
|
+
}>(
|
|
132
|
+
(notify) => {
|
|
133
|
+
const nm = input?.notificationManager;
|
|
134
|
+
if (!nm) return () => {};
|
|
135
|
+
const fieldKey = input?.name ? String(input.name) : String(input?.id ?? 'unknown');
|
|
136
|
+
const notifier = {
|
|
137
|
+
event: {
|
|
138
|
+
types: ['onUiUpdate'] as unknown as any[],
|
|
139
|
+
target: `${fieldKey}.use-field`,
|
|
140
|
+
action: 'sync',
|
|
141
|
+
emitterName: 'use-field',
|
|
142
|
+
name: `${fieldKey}.use-field`,
|
|
143
|
+
toFlags: () => '',
|
|
144
|
+
},
|
|
145
|
+
method: () => notify(),
|
|
146
|
+
};
|
|
147
|
+
nm.accept(notifier as any);
|
|
148
|
+
return () => nm.dismiss(notifier as any);
|
|
149
|
+
},
|
|
150
|
+
() => ({
|
|
151
|
+
value: input?.value ?? null,
|
|
152
|
+
validationResults: input?.validationResults ?? [],
|
|
153
|
+
isValid: input?.isValid ?? true,
|
|
154
|
+
isDirty: input?.isDirty ?? false,
|
|
155
|
+
isPristine: input?.isPristine ?? true,
|
|
156
|
+
isFocus: input?.isFocus ?? false,
|
|
157
|
+
isRequired: input?.validationOptions?.required?.value ?? false,
|
|
158
|
+
})
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
// ==================== REACTIVE ACCESSORS ====================
|
|
162
|
+
const value = (): any => snapshot().value;
|
|
163
|
+
const validationResults = (): IValidationResult[] =>
|
|
164
|
+
snapshot().validationResults as IValidationResult[];
|
|
165
|
+
const isValid = (): boolean => snapshot().isValid;
|
|
166
|
+
const isDirty = (): boolean => snapshot().isDirty;
|
|
167
|
+
const isPristine = (): boolean => snapshot().isPristine;
|
|
168
|
+
const isFocused = (): boolean => snapshot().isFocus;
|
|
169
|
+
const isRequired = (): boolean => snapshot().isRequired;
|
|
170
|
+
const isDisabled = (): boolean => input?.disabled ?? false;
|
|
171
|
+
|
|
172
|
+
// ==================== DERIVED VALIDATION FUNCTIONS ====================
|
|
173
|
+
const hasErrors = () => {
|
|
174
|
+
const results = validationResults();
|
|
175
|
+
return results.some((r) => r.state === false && r.error);
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
const errors = (): IFieldError[] => {
|
|
179
|
+
const results = validationResults();
|
|
180
|
+
return results
|
|
181
|
+
.filter((result: IValidationResult) => result.state === false && result.error)
|
|
182
|
+
.map(
|
|
183
|
+
(result: IValidationResult) =>
|
|
184
|
+
({
|
|
185
|
+
name: result.fieldName,
|
|
186
|
+
message: result.error!,
|
|
187
|
+
code: result.code,
|
|
188
|
+
}) as IFieldError
|
|
189
|
+
);
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
const guides = (): IFieldGuide[] => {
|
|
193
|
+
const results = validationResults();
|
|
194
|
+
// ✅ Return ALL guides regardless of validation state
|
|
195
|
+
// Guides are helpful hints that should show even when validation passes
|
|
196
|
+
return results
|
|
197
|
+
.filter((result: IValidationResult) => result.guide)
|
|
198
|
+
.map(
|
|
199
|
+
(result: IValidationResult) =>
|
|
200
|
+
({
|
|
201
|
+
name: result.fieldName,
|
|
202
|
+
code: result.code,
|
|
203
|
+
message: result.guide!,
|
|
204
|
+
}) as IFieldGuide
|
|
205
|
+
);
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
// ==================== DERIVED STATE FUNCTIONS ====================
|
|
209
|
+
// "Touched" means the field has been focused and then blurred at least once
|
|
210
|
+
// We derive this from isDirty state (if dirty, user must have touched it)
|
|
211
|
+
const isTouched = () => {
|
|
212
|
+
// If field is dirty, it's been touched
|
|
213
|
+
return isDirty();
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
// ==================== FIELD METADATA ====================
|
|
217
|
+
const label = () => input?.label ?? field.name ?? '';
|
|
218
|
+
const name = () => input?.name ?? field.name ?? '';
|
|
219
|
+
const type = () => input?.type ?? 'text';
|
|
220
|
+
|
|
221
|
+
// ==================== FIELD ACTIONS ====================
|
|
222
|
+
const setValue = (newValue: any) => {
|
|
223
|
+
// input.setValue() is the formular.dev public API — _value signal does not exist
|
|
224
|
+
input?.setValue(newValue);
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
const focus = () => {
|
|
228
|
+
field?.focus?.();
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
const blur = () => {
|
|
232
|
+
field?.blur?.();
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
const reset = () => {
|
|
236
|
+
field?.reset?.();
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
const touch = () => {
|
|
240
|
+
// Mark field as touched by making it dirty if it isn't already
|
|
241
|
+
// In formular, "touched" is implicit from user interaction
|
|
242
|
+
// We can simulate it by ensuring the field has been interacted with
|
|
243
|
+
if (!isDirty() && !isFocused()) {
|
|
244
|
+
// Focus and blur to mark as touched
|
|
245
|
+
focus();
|
|
246
|
+
// Use setTimeout to allow focus to register before blur
|
|
247
|
+
setTimeout(() => blur(), 0);
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
return {
|
|
252
|
+
// Value management
|
|
253
|
+
value,
|
|
254
|
+
setValue,
|
|
255
|
+
|
|
256
|
+
// Validation state
|
|
257
|
+
hasErrors,
|
|
258
|
+
errors,
|
|
259
|
+
guides,
|
|
260
|
+
validationResults,
|
|
261
|
+
|
|
262
|
+
// Field state
|
|
263
|
+
isValid,
|
|
264
|
+
isDirty,
|
|
265
|
+
isPristine,
|
|
266
|
+
isTouched,
|
|
267
|
+
isFocused,
|
|
268
|
+
|
|
269
|
+
// Field properties
|
|
270
|
+
isDisabled,
|
|
271
|
+
isRequired,
|
|
272
|
+
label,
|
|
273
|
+
name,
|
|
274
|
+
type,
|
|
275
|
+
|
|
276
|
+
// Field actions
|
|
277
|
+
focus,
|
|
278
|
+
blur,
|
|
279
|
+
reset,
|
|
280
|
+
touch,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bridge between formular.dev signals and Pulsar's reactive system
|
|
3
|
+
* Similar to React's useSyncExternalStore
|
|
4
|
+
*
|
|
5
|
+
* This hook allows Pulsar components to reactively subscribe to formular.dev signals
|
|
6
|
+
* and trigger re-renders when the signal values change.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { createSignal } from '@synetics/synetics.dev';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Subscribe a Pulsar signal to a formular.dev signal
|
|
13
|
+
*
|
|
14
|
+
* @deprecated Pulsar's createEffect uses a separate reactive graph and cannot
|
|
15
|
+
* track formular.dev signals. Use useField() from formular/hooks instead.
|
|
16
|
+
* This function returns a one-shot snapshot that never updates.
|
|
17
|
+
*
|
|
18
|
+
* @param formularSignalGetter - The formular.dev signal getter to subscribe to
|
|
19
|
+
* @returns A Pulsar signal that holds the initial value only — DOES NOT update
|
|
20
|
+
*/
|
|
21
|
+
export function useFormularSignal<T>(formularSignalGetter: () => T): [() => T, (value: T) => void] {
|
|
22
|
+
console.warn(
|
|
23
|
+
'[useFormularSignal] DEPRECATED: Pulsar createEffect cannot observe formular.dev signals. ' +
|
|
24
|
+
'The returned signal will hold the initial value only and never update. ' +
|
|
25
|
+
'Use useField() from @synetics/synetics-ui.dev instead.'
|
|
26
|
+
);
|
|
27
|
+
const [pulsarValue, setPulsarValue] = createSignal<T>(formularSignalGetter());
|
|
28
|
+
return [pulsarValue, setPulsarValue];
|
|
29
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Field component prop types
|
|
3
|
+
* Shared interfaces for field components
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Field options for integrated components
|
|
8
|
+
* Controls debugging and loading states
|
|
9
|
+
*/
|
|
10
|
+
export interface IFieldOptions {
|
|
11
|
+
/** Enable debug mode to show field state information */
|
|
12
|
+
readonly debug: boolean;
|
|
13
|
+
|
|
14
|
+
/** Show skeleton loader instead of field */
|
|
15
|
+
readonly loading: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Default field options factory
|
|
20
|
+
*/
|
|
21
|
+
export const fieldOptions: IFieldOptions = {
|
|
22
|
+
debug: false,
|
|
23
|
+
loading: false,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Base props for primitive field components (F-prefixed)
|
|
28
|
+
* These components bind directly to Formular fields via context
|
|
29
|
+
*/
|
|
30
|
+
export interface IFieldComponentProps {
|
|
31
|
+
/** Name of the field (must match field descriptor name) */
|
|
32
|
+
readonly name: string;
|
|
33
|
+
|
|
34
|
+
/** Show skeleton loader */
|
|
35
|
+
readonly loading?: boolean;
|
|
36
|
+
|
|
37
|
+
/** Additional CSS classes */
|
|
38
|
+
readonly className?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Props for integrated field components (Field-suffixed wrappers)
|
|
43
|
+
* These wrap primitives with Label + ValidationResults + Debug
|
|
44
|
+
*/
|
|
45
|
+
export interface IFieldSetProps {
|
|
46
|
+
/** Name of the field (must match field descriptor name) */
|
|
47
|
+
readonly name: string;
|
|
48
|
+
|
|
49
|
+
/** Field options for debug and loading */
|
|
50
|
+
readonly options?: IFieldOptions;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Props for select field components
|
|
55
|
+
*/
|
|
56
|
+
export interface ISelectFieldProps extends IFieldComponentProps {
|
|
57
|
+
/** Placeholder text for the select */
|
|
58
|
+
readonly placeholder?: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Props for radio button components
|
|
63
|
+
*/
|
|
64
|
+
export interface IRadioButtonProps extends IFieldComponentProps {
|
|
65
|
+
/** Value of this specific radio button */
|
|
66
|
+
readonly value: any;
|
|
67
|
+
|
|
68
|
+
/** Label for this radio button */
|
|
69
|
+
readonly label?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Props for checkbox field components
|
|
74
|
+
*/
|
|
75
|
+
export interface ICheckboxFieldProps extends IFieldComponentProps {
|
|
76
|
+
/** Label for the checkbox */
|
|
77
|
+
readonly label?: string;
|
|
78
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Field descriptor configuration types
|
|
3
|
+
* Used for declarative field definition with useFieldDescriptors hook
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { IFieldDescriptor, ValidationConstraintConfig } from '@synetics/formular.dev';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Field configuration for a single field
|
|
10
|
+
* Simplified API for creating field descriptors
|
|
11
|
+
*/
|
|
12
|
+
export interface IFieldConfig {
|
|
13
|
+
/** Field type (text, email, password, number, checkbox, select, radio, etc.) */
|
|
14
|
+
readonly type?: string;
|
|
15
|
+
|
|
16
|
+
/** Display label for the field */
|
|
17
|
+
readonly label?: string;
|
|
18
|
+
|
|
19
|
+
/** Default value for the field */
|
|
20
|
+
readonly defaultValue?: string | number | boolean | null;
|
|
21
|
+
|
|
22
|
+
/** Validation constraints for this field */
|
|
23
|
+
readonly validation?: ValidationConstraintConfig[];
|
|
24
|
+
|
|
25
|
+
/** Minimum value (for numbers) or length (for text) */
|
|
26
|
+
readonly min?: number;
|
|
27
|
+
|
|
28
|
+
/** Maximum value (for numbers) or length (for text) */
|
|
29
|
+
readonly max?: number;
|
|
30
|
+
|
|
31
|
+
/** Minimum length (for text fields) */
|
|
32
|
+
readonly minLength?: number;
|
|
33
|
+
|
|
34
|
+
/** Maximum length (for text fields) */
|
|
35
|
+
readonly maxLength?: number;
|
|
36
|
+
|
|
37
|
+
/** Pattern for validation (regex) */
|
|
38
|
+
readonly pattern?: string;
|
|
39
|
+
|
|
40
|
+
/** Options for select/radio/checkbox fields */
|
|
41
|
+
readonly options?: Array<{ label: string; value: any }>;
|
|
42
|
+
|
|
43
|
+
/** Placeholder text */
|
|
44
|
+
readonly placeholder?: string;
|
|
45
|
+
|
|
46
|
+
/** Whether field is disabled */
|
|
47
|
+
readonly disabled?: boolean;
|
|
48
|
+
|
|
49
|
+
/** Whether field is read-only */
|
|
50
|
+
readonly readOnly?: boolean;
|
|
51
|
+
|
|
52
|
+
/** Input mask pattern */
|
|
53
|
+
readonly mask?: string;
|
|
54
|
+
|
|
55
|
+
/** Any additional properties to pass to the field descriptor */
|
|
56
|
+
[key: string]: any;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Configuration object for multiple fields
|
|
61
|
+
* Maps field names to their configurations
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const config: FieldDescriptorConfig<User> = {
|
|
66
|
+
* username: { type: 'text', required: true },
|
|
67
|
+
* email: { type: 'email', required: true },
|
|
68
|
+
* age: { type: 'number', min: 18 }
|
|
69
|
+
* }
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export type FieldDescriptorConfig<T extends Record<string, any>> = {
|
|
73
|
+
[K in keyof T]?: IFieldConfig;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Result type from useFieldDescriptors hook
|
|
78
|
+
*/
|
|
79
|
+
export type FieldDescriptorResult = IFieldDescriptor[];
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form context type definitions
|
|
3
|
+
* Defines the shape of the FormContext provider value
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { IExtendedInput, IFieldError, IFormular } from '@synetics/formular.dev';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Form context interface
|
|
10
|
+
* Provides access to form operations and field instances
|
|
11
|
+
*
|
|
12
|
+
* @template T - The shape of the form data
|
|
13
|
+
*/
|
|
14
|
+
export interface IFormContext<T extends object> {
|
|
15
|
+
/** The form instance */
|
|
16
|
+
readonly form: IFormular<T>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Update a field's value
|
|
20
|
+
* @param fieldName - Name of the field to update
|
|
21
|
+
* @param value - New value for the field
|
|
22
|
+
*/
|
|
23
|
+
updateField: (fieldName: string, value: unknown) => void;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Clear a field's value (reset to default)
|
|
27
|
+
* @param fieldName - Name of the field to clear
|
|
28
|
+
*/
|
|
29
|
+
clearField: (fieldName: string) => void;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Reset the entire form to its default state
|
|
33
|
+
*/
|
|
34
|
+
reset: () => void;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Get a field instance by name
|
|
38
|
+
* @param fieldName - Name of the field to retrieve
|
|
39
|
+
* @returns The field instance or undefined
|
|
40
|
+
*/
|
|
41
|
+
getField: (fieldName: string) => IExtendedInput | undefined;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Validate a single field
|
|
45
|
+
* @param fieldName - Name of the field to validate
|
|
46
|
+
*/
|
|
47
|
+
validateField: (fieldName: string) => void;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Pre-validate a field (before blur/change)
|
|
51
|
+
* @param fieldName - Name of the field to pre-validate
|
|
52
|
+
* @returns Whether pre-validation passed
|
|
53
|
+
*/
|
|
54
|
+
preValidateField: (fieldName: string) => boolean;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Validate the entire form
|
|
58
|
+
* @returns Promise resolving to whether the form is valid
|
|
59
|
+
*/
|
|
60
|
+
validateForm: () => Promise<boolean>;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Get all form errors
|
|
64
|
+
* @returns Object mapping field names to their error arrays
|
|
65
|
+
*/
|
|
66
|
+
getErrors: () => Record<string, IFieldError[]>;
|
|
67
|
+
}
|