@qwickapps/react-framework 1.4.9 → 1.5.0
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 +23 -0
- package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts +9 -9
- package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +1 -1
- package/dist/components/AccessibilityProvider.d.ts +1 -1
- package/dist/components/AccessibilityProvider.d.ts.map +1 -1
- package/dist/components/ErrorBoundary.d.ts +1 -1
- package/dist/components/Html.d.ts +8 -8
- package/dist/components/Html.d.ts.map +1 -1
- package/dist/components/Logo.d.ts +2 -2
- package/dist/components/Logo.d.ts.map +1 -1
- package/dist/components/Markdown.d.ts +5 -5
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/ProductLogo.d.ts +60 -0
- package/dist/components/ProductLogo.d.ts.map +1 -0
- package/dist/components/QwickAppsLogo.d.ts +1 -1
- package/dist/components/QwickAppsLogo.d.ts.map +1 -1
- package/dist/components/ResponsiveMenu.d.ts.map +1 -1
- package/dist/components/SafeSpan.d.ts +4 -4
- package/dist/components/SafeSpan.d.ts.map +1 -1
- package/dist/components/Scaffold.d.ts.map +1 -1
- package/dist/components/base/Container.d.ts +3 -2
- package/dist/components/base/Container.d.ts.map +1 -1
- package/dist/components/base/ModelView.d.ts +16 -16
- package/dist/components/base/ModelView.d.ts.map +1 -1
- package/dist/components/base/index.d.ts +1 -1
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/blocks/Article.d.ts +4 -18
- package/dist/components/blocks/Article.d.ts.map +1 -1
- package/dist/components/blocks/CardListGrid.d.ts +3 -3
- package/dist/components/blocks/CardListGrid.d.ts.map +1 -1
- package/dist/components/blocks/Code.d.ts +5 -31
- package/dist/components/blocks/Code.d.ts.map +1 -1
- package/dist/components/blocks/Content.d.ts +2 -17
- package/dist/components/blocks/Content.d.ts.map +1 -1
- package/dist/components/blocks/CoverImageHeader.d.ts +2 -12
- package/dist/components/blocks/CoverImageHeader.d.ts.map +1 -1
- package/dist/components/blocks/FeatureCard.d.ts +0 -17
- package/dist/components/blocks/FeatureCard.d.ts.map +1 -1
- package/dist/components/blocks/FeatureGrid.d.ts.map +1 -1
- package/dist/components/blocks/Footer.d.ts +2 -14
- package/dist/components/blocks/Footer.d.ts.map +1 -1
- package/dist/components/blocks/HeroBlock.d.ts +35 -26
- package/dist/components/blocks/HeroBlock.d.ts.map +1 -1
- package/dist/components/blocks/Image.d.ts +23 -23
- package/dist/components/blocks/Image.d.ts.map +1 -1
- package/dist/components/blocks/PageBannerHeader.d.ts +2 -13
- package/dist/components/blocks/PageBannerHeader.d.ts.map +1 -1
- package/dist/components/blocks/ProductCard.d.ts +0 -9
- package/dist/components/blocks/ProductCard.d.ts.map +1 -1
- package/dist/components/blocks/Section.d.ts +16 -24
- package/dist/components/blocks/Section.d.ts.map +1 -1
- package/dist/components/blocks/Text.d.ts +5 -20
- package/dist/components/blocks/Text.d.ts.map +1 -1
- package/dist/components/buttons/Button.d.ts +19 -23
- package/dist/components/buttons/Button.d.ts.map +1 -1
- package/dist/components/buttons/PaletteSwitcher.d.ts +2 -2
- package/dist/components/buttons/PaletteSwitcher.d.ts.map +1 -1
- package/dist/components/buttons/ThemeSwitcher.d.ts +2 -2
- package/dist/components/buttons/ThemeSwitcher.d.ts.map +1 -1
- package/dist/components/dialogs/Dialog.d.ts +35 -0
- package/dist/components/dialogs/Dialog.d.ts.map +1 -0
- package/dist/components/dialogs/index.d.ts +8 -0
- package/dist/components/dialogs/index.d.ts.map +1 -0
- package/dist/components/forms/Captcha.d.ts +55 -0
- package/dist/components/forms/Captcha.d.ts.map +1 -0
- package/dist/components/forms/FormBlock.d.ts +6 -6
- package/dist/components/forms/FormBlock.d.ts.map +1 -1
- package/dist/components/forms/FormCheckbox.d.ts +27 -0
- package/dist/components/forms/FormCheckbox.d.ts.map +1 -0
- package/dist/components/forms/FormField.d.ts +43 -0
- package/dist/components/forms/FormField.d.ts.map +1 -0
- package/dist/components/forms/FormSelect.d.ts +35 -0
- package/dist/components/forms/FormSelect.d.ts.map +1 -0
- package/dist/components/forms/index.d.ts +8 -0
- package/dist/components/forms/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +10 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/ChoiceInputField.d.ts +13 -19
- package/dist/components/input/ChoiceInputField.d.ts.map +1 -1
- package/dist/components/input/HtmlInputField.d.ts +16 -17
- package/dist/components/input/HtmlInputField.d.ts.map +1 -1
- package/dist/components/input/SelectInputField.d.ts +14 -17
- package/dist/components/input/SelectInputField.d.ts.map +1 -1
- package/dist/components/input/SwitchInputField.d.ts +11 -18
- package/dist/components/input/SwitchInputField.d.ts.map +1 -1
- package/dist/components/input/TextInputField.d.ts +16 -19
- package/dist/components/input/TextInputField.d.ts.map +1 -1
- package/dist/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts.map +1 -1
- package/dist/components/layout/GridCell.d.ts +18 -19
- package/dist/components/layout/GridCell.d.ts.map +1 -1
- package/dist/components/layout/GridLayout.d.ts +36 -25
- package/dist/components/layout/GridLayout.d.ts.map +1 -1
- package/dist/components/menu/MenuItem.d.ts +2 -2
- package/dist/components/menu/MenuItem.d.ts.map +1 -1
- package/dist/components/pages/FormPage.d.ts.map +1 -1
- package/dist/components/pages/Page.d.ts +1 -1
- package/dist/components/pages/Page.d.ts.map +1 -1
- package/dist/components/shared/createSerializableView.d.ts +22 -10
- package/dist/components/shared/createSerializableView.d.ts.map +1 -1
- package/dist/components/shared/viewProps.d.ts +3 -3
- package/dist/components/shared/viewProps.d.ts.map +1 -1
- package/dist/config/AppConfig.d.ts +2 -2
- package/dist/config/AppConfig.d.ts.map +1 -1
- package/dist/config/types.d.ts +1 -1
- package/dist/config/types.d.ts.map +1 -1
- package/dist/contexts/DataContext.d.ts +3 -3
- package/dist/contexts/DataContext.d.ts.map +1 -1
- package/dist/contexts/PaletteContext.d.ts.map +1 -1
- package/dist/contexts/ThemeContext.d.ts.map +1 -1
- package/dist/hooks/useDataBinding.d.ts +2 -2
- package/dist/hooks/useDataBinding.d.ts.map +1 -1
- package/dist/hooks/usePrintMode.d.ts +2 -2
- package/dist/hooks/usePrintMode.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +3980 -2194
- package/dist/index.js +4006 -2191
- package/dist/palettes/manifest.json +90 -0
- package/dist/palettes/palette-autumn.1.4.9.min.css +1 -0
- package/dist/palettes/palette-autumn.1.5.0.css +172 -0
- package/dist/palettes/palette-autumn.1.5.0.min.css +1 -0
- package/dist/palettes/palette-autumn.latest.css +172 -0
- package/dist/palettes/palette-autumn.latest.min.css +1 -0
- package/dist/palettes/palette-cosmic.1.4.9.min.css +1 -0
- package/dist/palettes/palette-cosmic.1.5.0.css +172 -0
- package/dist/palettes/palette-cosmic.1.5.0.min.css +1 -0
- package/dist/palettes/palette-cosmic.latest.css +172 -0
- package/dist/palettes/palette-cosmic.latest.min.css +1 -0
- package/dist/palettes/palette-default.1.4.9.min.css +1 -0
- package/dist/palettes/palette-default.1.5.0.css +178 -0
- package/dist/palettes/palette-default.1.5.0.min.css +1 -0
- package/dist/palettes/palette-default.latest.css +178 -0
- package/dist/palettes/palette-default.latest.min.css +1 -0
- package/dist/palettes/palette-ocean.1.4.9.min.css +1 -0
- package/dist/palettes/palette-ocean.1.5.0.css +172 -0
- package/dist/palettes/palette-ocean.1.5.0.min.css +1 -0
- package/dist/palettes/palette-ocean.latest.css +172 -0
- package/dist/palettes/palette-ocean.latest.min.css +1 -0
- package/dist/palettes/palette-spring.1.4.9.min.css +1 -0
- package/dist/palettes/palette-spring.1.5.0.css +160 -0
- package/dist/palettes/palette-spring.1.5.0.min.css +1 -0
- package/dist/palettes/palette-spring.latest.css +160 -0
- package/dist/palettes/palette-spring.latest.min.css +1 -0
- package/dist/palettes/palette-winter.1.4.9.min.css +1 -0
- package/dist/palettes/palette-winter.1.5.0.css +172 -0
- package/dist/palettes/palette-winter.1.5.0.min.css +1 -0
- package/dist/palettes/palette-winter.latest.css +172 -0
- package/dist/palettes/palette-winter.latest.min.css +1 -0
- package/dist/schemas/ButtonSchema.d.ts +5 -2
- package/dist/schemas/ButtonSchema.d.ts.map +1 -1
- package/dist/schemas/CardListGridSchema.d.ts +4 -4
- package/dist/schemas/CardListGridSchema.d.ts.map +1 -1
- package/dist/schemas/ChoiceInputFieldSchema.d.ts +2 -2
- package/dist/schemas/ChoiceInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/CodeSchema.d.ts +1 -2
- package/dist/schemas/CodeSchema.d.ts.map +1 -1
- package/dist/schemas/FormBlockSchema.d.ts +2 -2
- package/dist/schemas/FormBlockSchema.d.ts.map +1 -1
- package/dist/schemas/GridCellSchema.d.ts +2 -4
- package/dist/schemas/GridCellSchema.d.ts.map +1 -1
- package/dist/schemas/GridLayoutSchema.d.ts +3 -5
- package/dist/schemas/GridLayoutSchema.d.ts.map +1 -1
- package/dist/schemas/HeroBlockSchema.d.ts +2 -2
- package/dist/schemas/HeroBlockSchema.d.ts.map +1 -1
- package/dist/schemas/HtmlInputFieldSchema.d.ts +2 -2
- package/dist/schemas/HtmlInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/ImageSchema.d.ts +2 -2
- package/dist/schemas/ImageSchema.d.ts.map +1 -1
- package/dist/schemas/SectionSchema.d.ts +2 -4
- package/dist/schemas/SectionSchema.d.ts.map +1 -1
- package/dist/schemas/SelectInputFieldSchema.d.ts +2 -2
- package/dist/schemas/SelectInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/SwitchInputFieldSchema.d.ts +2 -2
- package/dist/schemas/SwitchInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/TextInputFieldSchema.d.ts +2 -2
- package/dist/schemas/TextInputFieldSchema.d.ts.map +1 -1
- package/dist/schemas/ViewSchema.d.ts +8 -7
- package/dist/schemas/ViewSchema.d.ts.map +1 -1
- package/dist/schemas/transformers/ComponentTransformer.d.ts +2 -2
- package/dist/schemas/transformers/ComponentTransformer.d.ts.map +1 -1
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts +2 -2
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -1
- package/dist/schemas/transformers/registry.d.ts +0 -7
- package/dist/schemas/transformers/registry.d.ts.map +1 -1
- package/dist/schemas/types/Serializable.d.ts +3 -3
- package/dist/schemas/types/Serializable.d.ts.map +1 -1
- package/dist/stories/_templates/SerializationTemplate.d.ts.map +1 -0
- package/dist/types/CollapsibleLayout.d.ts +3 -3
- package/dist/types/CollapsibleLayout.d.ts.map +1 -1
- package/dist/types/ContentProxy.d.ts +4 -4
- package/dist/types/ContentProxy.d.ts.map +1 -1
- package/dist/types/DataTypes.d.ts +4 -4
- package/dist/types/DataTypes.d.ts.map +1 -1
- package/dist/types/TemplateProvider.d.ts +1 -1
- package/dist/types/TemplateProvider.d.ts.map +1 -1
- package/dist/types/TemplateResolver.d.ts +1 -1
- package/dist/types/TemplateResolver.d.ts.map +1 -1
- package/dist/utils/htmlTransform.d.ts +1 -1
- package/dist/utils/htmlTransform.d.ts.map +1 -1
- package/dist/utils/iconMap.d.ts +48 -0
- package/dist/utils/iconMap.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +11 -7
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/paletteLoader.d.ts +34 -0
- package/dist/utils/paletteLoader.d.ts.map +1 -0
- package/dist/utils/paletteManifest.d.ts +51 -0
- package/dist/utils/paletteManifest.d.ts.map +1 -0
- package/dist/utils/paletteUtils.d.ts.map +1 -1
- package/dist/utils/reactUtils.d.ts +12 -6
- package/dist/utils/reactUtils.d.ts.map +1 -1
- package/dist/utils/spacing.d.ts +2 -2
- package/dist/utils/spacing.d.ts.map +1 -1
- package/dist/utils/themePerformanceMonitor.d.ts.map +1 -1
- package/dist/utils/themeUtils.d.ts.map +1 -1
- package/package.json +20 -9
- package/scripts/build-palettes.cjs +120 -0
- package/src/__tests__/components/Article.test.tsx +1 -1
- package/src/__tests__/components/Breadcrumbs.test.tsx +2 -2
- package/src/__tests__/components/Button.test.tsx +3 -3
- package/src/__tests__/components/CardListGrid.test.tsx +5 -5
- package/src/__tests__/components/ChoiceInputField.test.tsx +2 -2
- package/src/__tests__/components/Code.test.tsx +2 -2
- package/src/__tests__/components/Content.integration.test.tsx +1 -1
- package/src/__tests__/components/Content.test.tsx +5 -5
- package/src/__tests__/components/CoverImageHeader.test.tsx +3 -3
- package/src/__tests__/components/FeatureCard.integration.test.tsx +1 -1
- package/src/__tests__/components/FeatureGrid.integration.test.tsx +1 -1
- package/src/__tests__/components/FeatureGrid.test.tsx +3 -3
- package/src/__tests__/components/Footer.test.tsx +3 -3
- package/src/__tests__/components/FormBlock.test.tsx +2 -2
- package/src/__tests__/components/HeroBlock.integration.test.tsx +1 -1
- package/src/__tests__/components/HeroBlock.test.tsx +4 -4
- package/src/__tests__/components/HtmlInputField.test.tsx +8 -8
- package/src/__tests__/components/PageBannerHeader.test.tsx +7 -7
- package/src/__tests__/components/PaletteSwitcher.test.tsx +3 -3
- package/src/__tests__/components/ProductCard.test.tsx +1 -1
- package/src/__tests__/components/Section.integration.test.tsx +1 -1
- package/src/__tests__/components/Section.test.tsx +1 -1
- package/src/__tests__/components/SelectInputField.test.tsx +2 -2
- package/src/__tests__/components/TextInputField.test.tsx +4 -4
- package/src/__tests__/components/ThemeSwitcher.test.tsx +3 -3
- package/src/__tests__/components/base/Container.test.tsx +22 -21
- package/src/__tests__/components/blocks/Code.performance.test.tsx +10 -10
- package/src/__tests__/components/blocks/Code.serialization.test.tsx +9 -9
- package/src/__tests__/components/blocks/HeroBlock.serialization.test.tsx +2 -3
- package/src/__tests__/components/blocks/Image.serialization.test.tsx +8 -7
- package/src/__tests__/components/blocks/Section.serialization.test.tsx +8 -8
- package/src/__tests__/components/blocks/Text.performance.test.tsx +5 -5
- package/src/__tests__/components/blocks/Text.serialization.test.tsx +9 -9
- package/src/__tests__/components/buttons/Button.serialization.test.tsx +4 -4
- package/src/__tests__/components/input/FormComponents.serialization.test.tsx +9 -9
- package/src/__tests__/components/input/SelectInputField.serialization.test.tsx +16 -18
- package/src/__tests__/components/input/TextInputField.serialization.test.tsx +9 -9
- package/src/__tests__/components/layout/CollapsibleLayout.test.tsx +5 -9
- package/src/__tests__/components/layout/GridCell.serialization.test.tsx +5 -5
- package/src/__tests__/components/layout/GridLayout.serialization.test.tsx +5 -5
- package/src/__tests__/hooks/usePrintMode.test.ts +1 -0
- package/src/__tests__/schemas/builders.test.ts +2 -2
- package/src/__tests__/schemas/transformers/ComponentSerializationPatterns.test.tsx +28 -28
- package/src/__tests__/schemas/transformers/ComponentTransformer.htmlPatterns.test.ts +5 -5
- package/src/__tests__/schemas/transformers/ComponentTransformer.test.ts +11 -11
- package/src/__tests__/schemas/transformers/CrossBrowserCompatibility.test.ts +10 -10
- package/src/__tests__/schemas/transformers/MockSerializableComponent.ts +15 -15
- package/src/__tests__/schemas/transformers/RealWorldScenarios.test.tsx +19 -19
- package/src/__tests__/schemas/transformers/SerializationErrorHandling.test.ts +15 -15
- package/src/__tests__/schemas/transformers/SerializationIntegration.test.tsx +19 -21
- package/src/__tests__/schemas/transformers/SerializationPerformance.test.ts +15 -15
- package/src/__tests__/schemas/transformers/TestAutomation.test.ts +3 -3
- package/src/__tests__/schemas/transformers/nested-serialization.test.tsx +1 -1
- package/src/__tests__/schemas/transformers/round-trip-component-serialization.test.tsx +10 -10
- package/src/__tests__/utils/optional-logging.test.ts +3 -3
- package/src/components/AccessibilityProvider.tsx +4 -2
- package/src/components/ErrorBoundary.tsx +1 -1
- package/src/components/Html.tsx +13 -16
- package/src/components/Logo.tsx +42 -29
- package/src/components/Markdown.tsx +9 -9
- package/src/components/ProductLogo.tsx +118 -0
- package/src/components/QwickApp.css +37 -1060
- package/src/components/QwickApp.tsx +1 -1
- package/src/components/QwickAppsLogo.tsx +1 -1
- package/src/components/ResponsiveMenu.tsx +1 -1
- package/src/components/SafeSpan.tsx +8 -8
- package/src/components/Scaffold.tsx +55 -25
- package/src/components/base/Container.tsx +2 -2
- package/src/components/base/ModelView.tsx +28 -27
- package/src/components/base/index.ts +1 -1
- package/src/components/blocks/Article.tsx +213 -69
- package/src/components/blocks/CardListGrid.tsx +18 -14
- package/src/components/blocks/Code.tsx +18 -13
- package/src/components/blocks/Content.tsx +15 -10
- package/src/components/blocks/CoverImageHeader.tsx +14 -9
- package/src/components/blocks/FeatureCard.tsx +16 -11
- package/src/components/blocks/FeatureGrid.tsx +13 -8
- package/src/components/blocks/Footer.tsx +25 -16
- package/src/components/blocks/HeroBlock.tsx +12 -13
- package/src/components/blocks/Image.tsx +16 -8
- package/src/components/blocks/PageBannerHeader.tsx +15 -11
- package/src/components/blocks/ProductCard.tsx +32 -25
- package/src/components/blocks/Section.tsx +21 -13
- package/src/components/blocks/Text.tsx +26 -11
- package/src/components/buttons/Button.tsx +18 -112
- package/src/components/buttons/PaletteSwitcher.tsx +11 -8
- package/src/components/buttons/ThemeSwitcher.tsx +20 -16
- package/src/components/dialogs/Dialog.tsx +126 -0
- package/src/components/dialogs/index.ts +15 -0
- package/src/components/forms/Captcha.tsx +291 -0
- package/src/components/forms/FormBlock.tsx +22 -15
- package/src/components/forms/FormCheckbox.tsx +116 -0
- package/src/components/forms/FormField.tsx +180 -0
- package/src/components/forms/FormSelect.tsx +140 -0
- package/src/components/forms/index.ts +13 -1
- package/src/components/index.ts +13 -2
- package/src/components/input/ChoiceInputField.tsx +1 -2
- package/src/components/input/HtmlInputField.tsx +2 -3
- package/src/components/input/SelectInputField.tsx +31 -5
- package/src/components/input/SwitchInputField.tsx +3 -4
- package/src/components/input/TextField.tsx +2 -2
- package/src/components/input/TextInputField.tsx +32 -6
- package/src/components/layout/CollapsibleLayout/CollapsibleLayout.tsx +13 -13
- package/src/components/layout/GridCell.tsx +10 -9
- package/src/components/layout/GridCellWrapper.tsx +1 -1
- package/src/components/layout/GridLayout.tsx +29 -32
- package/src/components/pages/FormPage.tsx +0 -1
- package/src/components/pages/Page.tsx +2 -2
- package/src/components/shared/createSerializableView.tsx +24 -23
- package/src/components/shared/viewProps.ts +11 -11
- package/src/config/AppConfig.ts +2 -2
- package/src/config/__tests__/AppConfig.test.ts +3 -3
- package/src/config/__tests__/AppConfigBuilder.test.ts +10 -11
- package/src/config/types.ts +1 -1
- package/src/contexts/DataContext.tsx +58 -52
- package/src/contexts/PaletteContext.tsx +22 -9
- package/src/contexts/PrintModeContext.tsx +4 -4
- package/src/contexts/ThemeContext.tsx +2 -1
- package/src/hooks/useBaseProps.ts +10 -10
- package/src/hooks/useDataBinding.ts +15 -18
- package/src/hooks/usePrintMode.ts +3 -3
- package/src/index.ts +2 -0
- package/src/palettes/manifest.json +72 -0
- package/src/palettes/manifest.schema.json +74 -0
- package/src/schemas/CardListGridSchema.ts +3 -3
- package/src/schemas/CodeSchema.ts +0 -1
- package/src/schemas/FeatureGridSchema.ts +1 -1
- package/src/schemas/FormBlockSchema.ts +1 -1
- package/src/schemas/GridCellSchema.ts +0 -1
- package/src/schemas/GridLayoutSchema.ts +0 -1
- package/src/schemas/SectionSchema.ts +0 -1
- package/src/schemas/ViewSchema.ts +6 -6
- package/src/schemas/transformers/ComponentTransformer.ts +37 -20
- package/src/schemas/transformers/ReactNodeTransformer.ts +18 -16
- package/src/schemas/transformers/registry.ts +28 -24
- package/src/schemas/types/Serializable.ts +3 -3
- package/src/setupTests.js +9 -0
- package/src/stories/AccessibilityProvider.stories.tsx +0 -1
- package/src/stories/CardListGrid.stories.tsx +1 -1
- package/src/stories/Code.stories.tsx +2 -3
- package/src/stories/CollapsibleLayout.stories.tsx +41 -37
- package/src/stories/Container.stories.tsx +1 -2
- package/src/stories/DataBinding.advanced.stories.tsx +15 -9
- package/src/stories/DataProvider.stories.tsx +33 -16
- package/src/stories/ErrorBoundary.stories.tsx +28 -26
- package/src/stories/FeatureGrid.stories.tsx +0 -1
- package/src/stories/FormBlock.stories.tsx +8 -8
- package/src/stories/FormComponents.stories.tsx +15 -11
- package/src/stories/GridCell.stories.tsx +5 -5
- package/src/stories/GridLayout.stories.tsx +5 -5
- package/src/stories/Image.stories.tsx +5 -7
- package/src/stories/Introduction.stories.tsx +0 -1
- package/src/stories/ModelView.stories.tsx +7 -7
- package/src/stories/SafeSpan.stories.tsx +7 -3
- package/src/stories/Section.stories.tsx +2 -2
- package/src/stories/Text.stories.tsx +1 -3
- package/src/stories/_templates/SerializationTemplate.tsx +0 -1
- package/src/templates/TemplateResolver.ts +2 -2
- package/src/types/CollapsibleLayout.ts +2 -2
- package/src/types/ContentProxy.ts +6 -6
- package/src/types/DataTypes.ts +4 -4
- package/src/types/TemplateProvider.ts +1 -1
- package/src/types/TemplateResolver.ts +1 -1
- package/src/utils/htmlTransform.tsx +17 -11
- package/src/utils/iconMap.tsx +221 -0
- package/src/utils/index.ts +4 -1
- package/src/utils/logger.ts +20 -14
- package/src/utils/paletteLoader.ts +218 -0
- package/src/utils/paletteManifest.ts +268 -0
- package/src/utils/paletteUtils.ts +19 -1
- package/src/utils/reactUtils.tsx +34 -33
- package/src/utils/spacing.ts +16 -17
- package/src/utils/themePerformanceMonitor.js +14 -6
- package/src/utils/themeUtils.ts +17 -2
- package/dist/components/base/ContainerView.d.ts +0 -65
- package/dist/components/base/ContainerView.d.ts.map +0 -1
- package/dist/components/blocks/Code-factory.d.ts +0 -22
- package/dist/components/blocks/Code-factory.d.ts.map +0 -1
- package/dist/components/blocks/Code-old.d.ts +0 -31
- package/dist/components/blocks/Code-old.d.ts.map +0 -1
- package/dist/qa/ConsoleWarningTest.d.ts +0 -5
- package/dist/qa/ConsoleWarningTest.d.ts.map +0 -1
- package/dist/qa/StorageKeyTest.d.ts +0 -6
- package/dist/qa/StorageKeyTest.d.ts.map +0 -1
- package/dist/qa/ThemeStorageKeyTest.d.ts +0 -6
- package/dist/qa/ThemeStorageKeyTest.d.ts.map +0 -1
- package/dist/schemas/ViewModelSchema.d.ts +0 -63
- package/dist/schemas/ViewModelSchema.d.ts.map +0 -1
- package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts +0 -66
- package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts.map +0 -1
- package/dist/src/__tests__/schemas/transformers/MockSerializableComponent.d.ts +0 -66
- package/dist/src/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +0 -1
- package/dist/src/components/AccessibilityChecker.d.ts +0 -12
- package/dist/src/components/AccessibilityChecker.d.ts.map +0 -1
- package/dist/src/components/AccessibilityProvider.d.ts +0 -64
- package/dist/src/components/AccessibilityProvider.d.ts.map +0 -1
- package/dist/src/components/Breadcrumbs.d.ts +0 -39
- package/dist/src/components/Breadcrumbs.d.ts.map +0 -1
- package/dist/src/components/ErrorBoundary.d.ts +0 -46
- package/dist/src/components/ErrorBoundary.d.ts.map +0 -1
- package/dist/src/components/Html.d.ts +0 -58
- package/dist/src/components/Html.d.ts.map +0 -1
- package/dist/src/components/Logo.d.ts +0 -56
- package/dist/src/components/Logo.d.ts.map +0 -1
- package/dist/src/components/Markdown.d.ts +0 -51
- package/dist/src/components/Markdown.d.ts.map +0 -1
- package/dist/src/components/QwickApp.d.ts +0 -69
- package/dist/src/components/QwickApp.d.ts.map +0 -1
- package/dist/src/components/QwickAppsLogo.d.ts +0 -25
- package/dist/src/components/QwickAppsLogo.d.ts.map +0 -1
- package/dist/src/components/QwickIcon.d.ts +0 -23
- package/dist/src/components/QwickIcon.d.ts.map +0 -1
- package/dist/src/components/ResponsiveMenu.d.ts +0 -38
- package/dist/src/components/ResponsiveMenu.d.ts.map +0 -1
- package/dist/src/components/SafeSpan.d.ts +0 -29
- package/dist/src/components/SafeSpan.d.ts.map +0 -1
- package/dist/src/components/Scaffold.d.ts +0 -57
- package/dist/src/components/Scaffold.d.ts.map +0 -1
- package/dist/src/components/base/Container.d.ts +0 -33
- package/dist/src/components/base/Container.d.ts.map +0 -1
- package/dist/src/components/base/ModelView.d.ts +0 -92
- package/dist/src/components/base/ModelView.d.ts.map +0 -1
- package/dist/src/components/base/index.d.ts +0 -12
- package/dist/src/components/base/index.d.ts.map +0 -1
- package/dist/src/components/blocks/Article.d.ts +0 -32
- package/dist/src/components/blocks/Article.d.ts.map +0 -1
- package/dist/src/components/blocks/CardListGrid.d.ts +0 -23
- package/dist/src/components/blocks/CardListGrid.d.ts.map +0 -1
- package/dist/src/components/blocks/Code.d.ts +0 -37
- package/dist/src/components/blocks/Code.d.ts.map +0 -1
- package/dist/src/components/blocks/Content.d.ts +0 -24
- package/dist/src/components/blocks/Content.d.ts.map +0 -1
- package/dist/src/components/blocks/CoverImageHeader.d.ts +0 -44
- package/dist/src/components/blocks/CoverImageHeader.d.ts.map +0 -1
- package/dist/src/components/blocks/FeatureCard.d.ts +0 -66
- package/dist/src/components/blocks/FeatureCard.d.ts.map +0 -1
- package/dist/src/components/blocks/FeatureGrid.d.ts +0 -48
- package/dist/src/components/blocks/FeatureGrid.d.ts.map +0 -1
- package/dist/src/components/blocks/Footer.d.ts +0 -56
- package/dist/src/components/blocks/Footer.d.ts.map +0 -1
- package/dist/src/components/blocks/HeroBlock.d.ts +0 -55
- package/dist/src/components/blocks/HeroBlock.d.ts.map +0 -1
- package/dist/src/components/blocks/Image.d.ts +0 -40
- package/dist/src/components/blocks/Image.d.ts.map +0 -1
- package/dist/src/components/blocks/PageBannerHeader.d.ts +0 -30
- package/dist/src/components/blocks/PageBannerHeader.d.ts.map +0 -1
- package/dist/src/components/blocks/ProductCard.d.ts +0 -57
- package/dist/src/components/blocks/ProductCard.d.ts.map +0 -1
- package/dist/src/components/blocks/Section.d.ts +0 -45
- package/dist/src/components/blocks/Section.d.ts.map +0 -1
- package/dist/src/components/blocks/Text.d.ts +0 -34
- package/dist/src/components/blocks/Text.d.ts.map +0 -1
- package/dist/src/components/blocks/index.d.ts +0 -41
- package/dist/src/components/blocks/index.d.ts.map +0 -1
- package/dist/src/components/buttons/Button.d.ts +0 -57
- package/dist/src/components/buttons/Button.d.ts.map +0 -1
- package/dist/src/components/buttons/PaletteSwitcher.d.ts +0 -24
- package/dist/src/components/buttons/PaletteSwitcher.d.ts.map +0 -1
- package/dist/src/components/buttons/ThemeSwitcher.d.ts +0 -24
- package/dist/src/components/buttons/ThemeSwitcher.d.ts.map +0 -1
- package/dist/src/components/buttons/index.d.ts +0 -11
- package/dist/src/components/buttons/index.d.ts.map +0 -1
- package/dist/src/components/forms/FormBlock.d.ts +0 -51
- package/dist/src/components/forms/FormBlock.d.ts.map +0 -1
- package/dist/src/components/forms/index.d.ts +0 -8
- package/dist/src/components/forms/index.d.ts.map +0 -1
- package/dist/src/components/index.d.ts +0 -41
- package/dist/src/components/index.d.ts.map +0 -1
- package/dist/src/components/input/ChoiceInputField.d.ts +0 -29
- package/dist/src/components/input/ChoiceInputField.d.ts.map +0 -1
- package/dist/src/components/input/HtmlInputField.d.ts +0 -33
- package/dist/src/components/input/HtmlInputField.d.ts.map +0 -1
- package/dist/src/components/input/SelectInputField.d.ts +0 -31
- package/dist/src/components/input/SelectInputField.d.ts.map +0 -1
- package/dist/src/components/input/SwitchInputField.d.ts +0 -27
- package/dist/src/components/input/SwitchInputField.d.ts.map +0 -1
- package/dist/src/components/input/TextField.d.ts +0 -18
- package/dist/src/components/input/TextField.d.ts.map +0 -1
- package/dist/src/components/input/TextInputField.d.ts +0 -34
- package/dist/src/components/input/TextInputField.d.ts.map +0 -1
- package/dist/src/components/input/index.d.ts +0 -19
- package/dist/src/components/input/index.d.ts.map +0 -1
- package/dist/src/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts +0 -34
- package/dist/src/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts.map +0 -1
- package/dist/src/components/layout/CollapsibleLayout/index.d.ts +0 -9
- package/dist/src/components/layout/CollapsibleLayout/index.d.ts.map +0 -1
- package/dist/src/components/layout/GridCell.d.ts +0 -32
- package/dist/src/components/layout/GridCell.d.ts.map +0 -1
- package/dist/src/components/layout/GridCellWrapper.d.ts +0 -46
- package/dist/src/components/layout/GridCellWrapper.d.ts.map +0 -1
- package/dist/src/components/layout/GridLayout.d.ts +0 -50
- package/dist/src/components/layout/GridLayout.d.ts.map +0 -1
- package/dist/src/components/layout/index.d.ts +0 -14
- package/dist/src/components/layout/index.d.ts.map +0 -1
- package/dist/src/components/menu/Menu.d.ts +0 -1
- package/dist/src/components/menu/Menu.d.ts.map +0 -1
- package/dist/src/components/menu/MenuItem.d.ts +0 -31
- package/dist/src/components/menu/MenuItem.d.ts.map +0 -1
- package/dist/src/components/menu/index.d.ts +0 -7
- package/dist/src/components/menu/index.d.ts.map +0 -1
- package/dist/src/components/pages/FormPage.d.ts +0 -66
- package/dist/src/components/pages/FormPage.d.ts.map +0 -1
- package/dist/src/components/pages/Page.d.ts +0 -68
- package/dist/src/components/pages/Page.d.ts.map +0 -1
- package/dist/src/components/pages/index.d.ts +0 -10
- package/dist/src/components/pages/index.d.ts.map +0 -1
- package/dist/src/components/shared/createSerializableView.d.ts +0 -81
- package/dist/src/components/shared/createSerializableView.d.ts.map +0 -1
- package/dist/src/components/shared/viewProps.d.ts +0 -37
- package/dist/src/components/shared/viewProps.d.ts.map +0 -1
- package/dist/src/config/AppConfig.d.ts +0 -49
- package/dist/src/config/AppConfig.d.ts.map +0 -1
- package/dist/src/config/AppConfigBuilder.d.ts +0 -75
- package/dist/src/config/AppConfigBuilder.d.ts.map +0 -1
- package/dist/src/config/index.d.ts +0 -13
- package/dist/src/config/index.d.ts.map +0 -1
- package/dist/src/config/types.d.ts +0 -130
- package/dist/src/config/types.d.ts.map +0 -1
- package/dist/src/config.d.ts +0 -15
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/contexts/DataContext.d.ts +0 -139
- package/dist/src/contexts/DataContext.d.ts.map +0 -1
- package/dist/src/contexts/DimensionsContext.d.ts +0 -42
- package/dist/src/contexts/DimensionsContext.d.ts.map +0 -1
- package/dist/src/contexts/PaletteContext.d.ts +0 -53
- package/dist/src/contexts/PaletteContext.d.ts.map +0 -1
- package/dist/src/contexts/PrintModeContext.d.ts +0 -27
- package/dist/src/contexts/PrintModeContext.d.ts.map +0 -1
- package/dist/src/contexts/QwickAppContext.d.ts +0 -71
- package/dist/src/contexts/QwickAppContext.d.ts.map +0 -1
- package/dist/src/contexts/ThemeContext.d.ts +0 -65
- package/dist/src/contexts/ThemeContext.d.ts.map +0 -1
- package/dist/src/contexts/index.d.ts +0 -11
- package/dist/src/contexts/index.d.ts.map +0 -1
- package/dist/src/hooks/index.d.ts +0 -12
- package/dist/src/hooks/index.d.ts.map +0 -1
- package/dist/src/hooks/useBaseProps.d.ts +0 -101
- package/dist/src/hooks/useBaseProps.d.ts.map +0 -1
- package/dist/src/hooks/useDataBinding.d.ts +0 -22
- package/dist/src/hooks/useDataBinding.d.ts.map +0 -1
- package/dist/src/hooks/usePrintMode.d.ts +0 -39
- package/dist/src/hooks/usePrintMode.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -9
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/palettes/PaletteAutumn.d.ts +0 -10
- package/dist/src/palettes/PaletteAutumn.d.ts.map +0 -1
- package/dist/src/palettes/PaletteCosmic.d.ts +0 -10
- package/dist/src/palettes/PaletteCosmic.d.ts.map +0 -1
- package/dist/src/palettes/PaletteDefault.d.ts +0 -10
- package/dist/src/palettes/PaletteDefault.d.ts.map +0 -1
- package/dist/src/palettes/PaletteOcean.d.ts +0 -10
- package/dist/src/palettes/PaletteOcean.d.ts.map +0 -1
- package/dist/src/palettes/PaletteSpring.d.ts +0 -10
- package/dist/src/palettes/PaletteSpring.d.ts.map +0 -1
- package/dist/src/palettes/PaletteWinter.d.ts +0 -10
- package/dist/src/palettes/PaletteWinter.d.ts.map +0 -1
- package/dist/src/palettes/index.d.ts +0 -13
- package/dist/src/palettes/index.d.ts.map +0 -1
- package/dist/src/schemas/ActionSchema.d.ts +0 -21
- package/dist/src/schemas/ActionSchema.d.ts.map +0 -1
- package/dist/src/schemas/ArticleSchema.d.ts +0 -13
- package/dist/src/schemas/ArticleSchema.d.ts.map +0 -1
- package/dist/src/schemas/ButtonSchema.d.ts +0 -22
- package/dist/src/schemas/ButtonSchema.d.ts.map +0 -1
- package/dist/src/schemas/CardListGridSchema.d.ts +0 -17
- package/dist/src/schemas/CardListGridSchema.d.ts.map +0 -1
- package/dist/src/schemas/ChoiceInputFieldSchema.d.ts +0 -18
- package/dist/src/schemas/ChoiceInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/CodeSchema.d.ts +0 -18
- package/dist/src/schemas/CodeSchema.d.ts.map +0 -1
- package/dist/src/schemas/CollapsibleLayoutSchema.d.ts +0 -32
- package/dist/src/schemas/CollapsibleLayoutSchema.d.ts.map +0 -1
- package/dist/src/schemas/ContainerSchema.d.ts +0 -12
- package/dist/src/schemas/ContainerSchema.d.ts.map +0 -1
- package/dist/src/schemas/ContentSchema.d.ts +0 -21
- package/dist/src/schemas/ContentSchema.d.ts.map +0 -1
- package/dist/src/schemas/CoverImageHeaderSchema.d.ts +0 -28
- package/dist/src/schemas/CoverImageHeaderSchema.d.ts.map +0 -1
- package/dist/src/schemas/FeatureCardSchema.d.ts +0 -28
- package/dist/src/schemas/FeatureCardSchema.d.ts.map +0 -1
- package/dist/src/schemas/FeatureGridSchema.d.ts +0 -17
- package/dist/src/schemas/FeatureGridSchema.d.ts.map +0 -1
- package/dist/src/schemas/FeatureItemSchema.d.ts +0 -16
- package/dist/src/schemas/FeatureItemSchema.d.ts.map +0 -1
- package/dist/src/schemas/FooterItemSchema.d.ts +0 -15
- package/dist/src/schemas/FooterItemSchema.d.ts.map +0 -1
- package/dist/src/schemas/FooterSchema.d.ts +0 -20
- package/dist/src/schemas/FooterSchema.d.ts.map +0 -1
- package/dist/src/schemas/FooterSectionSchema.d.ts +0 -15
- package/dist/src/schemas/FooterSectionSchema.d.ts.map +0 -1
- package/dist/src/schemas/FormBlockSchema.d.ts +0 -19
- package/dist/src/schemas/FormBlockSchema.d.ts.map +0 -1
- package/dist/src/schemas/GridCellSchema.d.ts +0 -23
- package/dist/src/schemas/GridCellSchema.d.ts.map +0 -1
- package/dist/src/schemas/GridLayoutSchema.d.ts +0 -21
- package/dist/src/schemas/GridLayoutSchema.d.ts.map +0 -1
- package/dist/src/schemas/HeaderActionSchema.d.ts +0 -17
- package/dist/src/schemas/HeaderActionSchema.d.ts.map +0 -1
- package/dist/src/schemas/HeroBlockSchema.d.ts +0 -22
- package/dist/src/schemas/HeroBlockSchema.d.ts.map +0 -1
- package/dist/src/schemas/HtmlInputFieldSchema.d.ts +0 -18
- package/dist/src/schemas/HtmlInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/HtmlSchema.d.ts +0 -14
- package/dist/src/schemas/HtmlSchema.d.ts.map +0 -1
- package/dist/src/schemas/ImageSchema.d.ts +0 -32
- package/dist/src/schemas/ImageSchema.d.ts.map +0 -1
- package/dist/src/schemas/LogoSchema.d.ts +0 -35
- package/dist/src/schemas/LogoSchema.d.ts.map +0 -1
- package/dist/src/schemas/MarkdownSchema.d.ts +0 -14
- package/dist/src/schemas/MarkdownSchema.d.ts.map +0 -1
- package/dist/src/schemas/MetadataItemSchema.d.ts +0 -13
- package/dist/src/schemas/MetadataItemSchema.d.ts.map +0 -1
- package/dist/src/schemas/PageBannerHeaderSchema.d.ts +0 -28
- package/dist/src/schemas/PageBannerHeaderSchema.d.ts.map +0 -1
- package/dist/src/schemas/PageTemplateSchema.d.ts +0 -31
- package/dist/src/schemas/PageTemplateSchema.d.ts.map +0 -1
- package/dist/src/schemas/PaletteSwitcherSchema.d.ts +0 -16
- package/dist/src/schemas/PaletteSwitcherSchema.d.ts.map +0 -1
- package/dist/src/schemas/PrintConfigSchema.d.ts +0 -31
- package/dist/src/schemas/PrintConfigSchema.d.ts.map +0 -1
- package/dist/src/schemas/ProductCardSchema.d.ts +0 -39
- package/dist/src/schemas/ProductCardSchema.d.ts.map +0 -1
- package/dist/src/schemas/SafeSpanSchema.d.ts +0 -13
- package/dist/src/schemas/SafeSpanSchema.d.ts.map +0 -1
- package/dist/src/schemas/SectionSchema.d.ts +0 -16
- package/dist/src/schemas/SectionSchema.d.ts.map +0 -1
- package/dist/src/schemas/SelectInputFieldSchema.d.ts +0 -27
- package/dist/src/schemas/SelectInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/SwitchInputFieldSchema.d.ts +0 -18
- package/dist/src/schemas/SwitchInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/TextInputFieldSchema.d.ts +0 -22
- package/dist/src/schemas/TextInputFieldSchema.d.ts.map +0 -1
- package/dist/src/schemas/TextSchema.d.ts +0 -37
- package/dist/src/schemas/TextSchema.d.ts.map +0 -1
- package/dist/src/schemas/ThemeSwitcherSchema.d.ts +0 -19
- package/dist/src/schemas/ThemeSwitcherSchema.d.ts.map +0 -1
- package/dist/src/schemas/ViewSchema.d.ts +0 -66
- package/dist/src/schemas/ViewSchema.d.ts.map +0 -1
- package/dist/src/schemas/index.d.ts +0 -47
- package/dist/src/schemas/index.d.ts.map +0 -1
- package/dist/src/schemas/transformers/ComponentTransformer.d.ts +0 -128
- package/dist/src/schemas/transformers/ComponentTransformer.d.ts.map +0 -1
- package/dist/src/schemas/transformers/ReactNodeTransformer.d.ts +0 -53
- package/dist/src/schemas/transformers/ReactNodeTransformer.d.ts.map +0 -1
- package/dist/src/schemas/transformers/registry.d.ts +0 -18
- package/dist/src/schemas/transformers/registry.d.ts.map +0 -1
- package/dist/src/schemas/types/Serializable.d.ts +0 -46
- package/dist/src/schemas/types/Serializable.d.ts.map +0 -1
- package/dist/src/stories/_templates/SerializationTemplate.d.ts.map +0 -1
- package/dist/src/templates/TemplateResolver.d.ts +0 -52
- package/dist/src/templates/TemplateResolver.d.ts.map +0 -1
- package/dist/src/templates/index.d.ts +0 -7
- package/dist/src/templates/index.d.ts.map +0 -1
- package/dist/src/types/CacheProvider.d.ts +0 -18
- package/dist/src/types/CacheProvider.d.ts.map +0 -1
- package/dist/src/types/CollapsibleLayout.d.ts +0 -142
- package/dist/src/types/CollapsibleLayout.d.ts.map +0 -1
- package/dist/src/types/ContentProxy.d.ts +0 -47
- package/dist/src/types/ContentProxy.d.ts.map +0 -1
- package/dist/src/types/DataTypes.d.ts +0 -185
- package/dist/src/types/DataTypes.d.ts.map +0 -1
- package/dist/src/types/TemplateProvider.d.ts +0 -10
- package/dist/src/types/TemplateProvider.d.ts.map +0 -1
- package/dist/src/types/TemplateResolver.d.ts +0 -23
- package/dist/src/types/TemplateResolver.d.ts.map +0 -1
- package/dist/src/types/index.d.ts +0 -82
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/utils/breakpoints.d.ts +0 -35
- package/dist/src/utils/breakpoints.d.ts.map +0 -1
- package/dist/src/utils/cssUtils.d.ts +0 -17
- package/dist/src/utils/cssUtils.d.ts.map +0 -1
- package/dist/src/utils/customPaletteManager.d.ts +0 -8
- package/dist/src/utils/customPaletteManager.d.ts.map +0 -1
- package/dist/src/utils/dimensions.d.ts +0 -34
- package/dist/src/utils/dimensions.d.ts.map +0 -1
- package/dist/src/utils/htmlTransform.d.ts +0 -44
- package/dist/src/utils/htmlTransform.d.ts.map +0 -1
- package/dist/src/utils/index.d.ts +0 -16
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/logger.d.ts +0 -26
- package/dist/src/utils/logger.d.ts.map +0 -1
- package/dist/src/utils/paletteUtils.d.ts +0 -38
- package/dist/src/utils/paletteUtils.d.ts.map +0 -1
- package/dist/src/utils/persistenceUtils.d.ts +0 -31
- package/dist/src/utils/persistenceUtils.d.ts.map +0 -1
- package/dist/src/utils/reactUtils.d.ts +0 -33
- package/dist/src/utils/reactUtils.d.ts.map +0 -1
- package/dist/src/utils/spacing.d.ts +0 -34
- package/dist/src/utils/spacing.d.ts.map +0 -1
- package/dist/src/utils/themePerformanceMonitor.d.ts +0 -32
- package/dist/src/utils/themePerformanceMonitor.d.ts.map +0 -1
- package/dist/src/utils/themeUtils.d.ts +0 -27
- package/dist/src/utils/themeUtils.d.ts.map +0 -1
- package/dist/tests/ConsoleWarningTest.d.ts +0 -5
- package/dist/tests/ConsoleWarningTest.d.ts.map +0 -1
- package/dist/tests/StorageKeyTest.d.ts +0 -6
- package/dist/tests/StorageKeyTest.d.ts.map +0 -1
- package/dist/tests/ThemeStorageKeyTest.d.ts +0 -6
- package/dist/tests/ThemeStorageKeyTest.d.ts.map +0 -1
- /package/dist/palettes/{PaletteAutumn.css → palette-autumn.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteCosmic.css → palette-cosmic.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteDefault.css → palette-default.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteOcean.css → palette-ocean.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteSpring.css → palette-spring.1.4.9.css} +0 -0
- /package/dist/palettes/{PaletteWinter.css → palette-winter.1.4.9.css} +0 -0
- /package/dist/{src/stories → stories}/_templates/SerializationTemplate.d.ts +0 -0
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { DataBindingMeta,
|
|
11
|
+
import { DataBindingMeta, Model } from '@qwickapps/schema';
|
|
12
12
|
import { useMemo } from 'react';
|
|
13
13
|
import { useDataSafe } from '../contexts/DataContext';
|
|
14
14
|
|
|
@@ -23,15 +23,13 @@ import { useDataSafe } from '../contexts/DataContext';
|
|
|
23
23
|
*/
|
|
24
24
|
export function useDataBinding<T extends Model>(
|
|
25
25
|
dataSource?: string,
|
|
26
|
-
fallbackProps?: Partial<T
|
|
27
|
-
schema?: SchemaDefinition,
|
|
28
|
-
options?: DataBindingOptions
|
|
26
|
+
fallbackProps?: Partial<T>
|
|
29
27
|
): T & DataBindingMeta {
|
|
30
28
|
// Determine if we should use data binding
|
|
31
29
|
const isDataSourceAvailable = dataSource && dataSource.trim().length > 0;
|
|
32
30
|
|
|
33
|
-
// Get data if
|
|
34
|
-
const safeDataResult = isDataSourceAvailable ?
|
|
31
|
+
// Get data - always call the hook unconditionally, but pass empty string if not available
|
|
32
|
+
const safeDataResult = useDataSafe(isDataSourceAvailable ? dataSource : '');
|
|
35
33
|
|
|
36
34
|
// Resolve the final props
|
|
37
35
|
const resolvedData = useMemo(() => {
|
|
@@ -46,16 +44,15 @@ export function useDataBinding<T extends Model>(
|
|
|
46
44
|
} as Partial<T>;
|
|
47
45
|
|
|
48
46
|
return resolved;
|
|
47
|
+
}, [isDataSourceAvailable, safeDataResult.data, fallbackProps]);
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
//
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
cached: false // TODO: Implement cache detection
|
|
58
|
-
};
|
|
49
|
+
// Build the data binding metadata (not currently returned but available for future use)
|
|
50
|
+
// const metadata: DataBindingMeta = {
|
|
51
|
+
// loading: safeDataResult.loading,
|
|
52
|
+
// error: safeDataResult.error,
|
|
53
|
+
// dataSource,
|
|
54
|
+
// cached: false // TODO: Implement cache detection
|
|
55
|
+
// };
|
|
59
56
|
|
|
60
57
|
// Return resolved data with metadata, ensuring data properties aren't overridden
|
|
61
58
|
return {
|
|
@@ -66,10 +63,10 @@ export function useDataBinding<T extends Model>(
|
|
|
66
63
|
$dataSource: dataSource,
|
|
67
64
|
$cached: false,
|
|
68
65
|
// Keep old names for backward compatibility, but data takes precedence
|
|
69
|
-
...(
|
|
70
|
-
...(
|
|
66
|
+
...(Object.prototype.hasOwnProperty.call(resolvedData, 'loading') ? {} : { loading: safeDataResult.loading }),
|
|
67
|
+
...(Object.prototype.hasOwnProperty.call(resolvedData, 'error') ? {} : { error: safeDataResult.error }),
|
|
71
68
|
cached: false
|
|
72
|
-
} as
|
|
69
|
+
} as T & DataBindingMeta;
|
|
73
70
|
}
|
|
74
71
|
|
|
75
72
|
// Old validation function removed - using new schema system
|
|
@@ -43,11 +43,11 @@ export interface PrintModeState {
|
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* Hook to access print mode state from app-level context
|
|
46
|
-
*
|
|
47
|
-
* @param
|
|
46
|
+
*
|
|
47
|
+
* @param _initialConfig - Initial print configuration (ignored, use context provider config)
|
|
48
48
|
* @returns Print mode state and controls
|
|
49
49
|
*/
|
|
50
|
-
export function usePrintMode(
|
|
50
|
+
export function usePrintMode(): PrintModeState {
|
|
51
51
|
const context = usePrintModeContext();
|
|
52
52
|
|
|
53
53
|
// Map context interface to legacy interface
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./manifest.schema.json",
|
|
3
|
+
"version": "1.4.9",
|
|
4
|
+
"palettes": [
|
|
5
|
+
{
|
|
6
|
+
"id": "default",
|
|
7
|
+
"name": "Default",
|
|
8
|
+
"description": "Classic blue and neutral color scheme - the original QwickApps palette",
|
|
9
|
+
"author": "QwickApps",
|
|
10
|
+
"license": "PolyForm-Shield-1.0.0",
|
|
11
|
+
"version": "1.4.9",
|
|
12
|
+
"file": "PaletteDefault.css",
|
|
13
|
+
"primaryColor": "#007bff",
|
|
14
|
+
"inlined": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "autumn",
|
|
18
|
+
"name": "Autumn",
|
|
19
|
+
"description": "Warm oranges, golden yellows, and earthy browns - inspired by fall foliage",
|
|
20
|
+
"author": "QwickApps",
|
|
21
|
+
"license": "PolyForm-Shield-1.0.0",
|
|
22
|
+
"version": "1.4.9",
|
|
23
|
+
"file": "PaletteAutumn.css",
|
|
24
|
+
"primaryColor": "#ea580c",
|
|
25
|
+
"inlined": false
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "cosmic",
|
|
29
|
+
"name": "Cosmic",
|
|
30
|
+
"description": "Modern purple gradient for creative and tech brands - inspired by cosmic nebulae",
|
|
31
|
+
"author": "QwickApps",
|
|
32
|
+
"license": "PolyForm-Shield-1.0.0",
|
|
33
|
+
"version": "1.4.9",
|
|
34
|
+
"file": "PaletteCosmic.css",
|
|
35
|
+
"primaryColor": "#8b5cf6",
|
|
36
|
+
"inlined": false
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "ocean",
|
|
40
|
+
"name": "Ocean",
|
|
41
|
+
"description": "Deep blues, aqua teals, and seafoam greens - inspired by ocean depths",
|
|
42
|
+
"author": "QwickApps",
|
|
43
|
+
"license": "PolyForm-Shield-1.0.0",
|
|
44
|
+
"version": "1.4.9",
|
|
45
|
+
"file": "PaletteOcean.css",
|
|
46
|
+
"primaryColor": "#0891b2",
|
|
47
|
+
"inlined": false
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "spring",
|
|
51
|
+
"name": "Spring",
|
|
52
|
+
"description": "Fresh greens, soft pinks, and bright yellows - inspired by spring blooms",
|
|
53
|
+
"author": "QwickApps",
|
|
54
|
+
"license": "PolyForm-Shield-1.0.0",
|
|
55
|
+
"version": "1.4.9",
|
|
56
|
+
"file": "PaletteSpring.css",
|
|
57
|
+
"primaryColor": "#16a34a",
|
|
58
|
+
"inlined": false
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "winter",
|
|
62
|
+
"name": "Winter",
|
|
63
|
+
"description": "Cool blues, icy whites, and frosty grays - inspired by winter landscapes",
|
|
64
|
+
"author": "QwickApps",
|
|
65
|
+
"license": "PolyForm-Shield-1.0.0",
|
|
66
|
+
"version": "1.4.9",
|
|
67
|
+
"file": "PaletteWinter.css",
|
|
68
|
+
"primaryColor": "#0077be",
|
|
69
|
+
"inlined": false
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "QwickApps Palette Manifest",
|
|
4
|
+
"description": "Manifest file describing available color palettes for QwickApps React Framework",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["version", "palettes"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"version": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Version of the manifest/framework",
|
|
11
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
12
|
+
},
|
|
13
|
+
"palettes": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"description": "List of available color palettes",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": ["id", "name", "description", "version", "file", "primaryColor"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"id": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Unique identifier for the palette (kebab-case)",
|
|
23
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
24
|
+
},
|
|
25
|
+
"name": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Human-readable name of the palette"
|
|
28
|
+
},
|
|
29
|
+
"description": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Brief description of the palette theme"
|
|
32
|
+
},
|
|
33
|
+
"author": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Author or organization that created the palette"
|
|
36
|
+
},
|
|
37
|
+
"license": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "License under which the palette is distributed"
|
|
40
|
+
},
|
|
41
|
+
"version": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "Version of the palette",
|
|
44
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
45
|
+
},
|
|
46
|
+
"file": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Filename of the palette CSS (unminified)",
|
|
49
|
+
"pattern": "^palette-[a-z][a-z0-9-]*\\.\\d+\\.\\d+\\.\\d+\\.css$"
|
|
50
|
+
},
|
|
51
|
+
"fileMinified": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "Filename of the minified palette CSS",
|
|
54
|
+
"pattern": "^palette-[a-z][a-z0-9-]*\\.\\d+\\.\\d+\\.\\d+\\.min\\.css$"
|
|
55
|
+
},
|
|
56
|
+
"thumbnail": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"description": "Filename of the palette thumbnail image"
|
|
59
|
+
},
|
|
60
|
+
"primaryColor": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "Primary color of the palette (hex format)",
|
|
63
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
64
|
+
},
|
|
65
|
+
"inlined": {
|
|
66
|
+
"type": "boolean",
|
|
67
|
+
"description": "Whether this palette is inlined in the main CSS bundle",
|
|
68
|
+
"default": false
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { IsArray, IsOptional, IsNumber, IsIn, IsBoolean, IsObject
|
|
7
|
+
import { IsArray, IsOptional, IsNumber, IsIn, IsBoolean, IsObject } from 'class-validator';
|
|
8
8
|
import 'reflect-metadata';
|
|
9
9
|
import { Editor, Field, Schema, FieldType } from '@qwickapps/schema';
|
|
10
10
|
import { ContainerSchema } from './ContainerSchema';
|
|
@@ -18,7 +18,7 @@ export class CardListGridModel extends ContainerSchema {
|
|
|
18
18
|
description: 'Array of items to display in the grid'
|
|
19
19
|
})
|
|
20
20
|
@IsArray()
|
|
21
|
-
items?:
|
|
21
|
+
items?: unknown[];
|
|
22
22
|
|
|
23
23
|
@Field()
|
|
24
24
|
@Editor({
|
|
@@ -96,7 +96,7 @@ export class CardListGridModel extends ContainerSchema {
|
|
|
96
96
|
})
|
|
97
97
|
@IsOptional()
|
|
98
98
|
@IsObject()
|
|
99
|
-
itemProps?: Record<string,
|
|
99
|
+
itemProps?: Record<string, unknown>;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { ReactNode } from 'react';
|
|
8
7
|
import { IsBoolean, IsOptional, IsString } from 'class-validator';
|
|
9
8
|
import 'reflect-metadata';
|
|
10
9
|
import { Editor, Field, Schema, FieldType } from '@qwickapps/schema';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { IsArray, IsOptional, IsNumber, IsIn, IsBoolean, IsString, ValidateNested
|
|
7
|
+
import { IsArray, IsOptional, IsNumber, IsIn, IsBoolean, IsString, ValidateNested } from 'class-validator';
|
|
8
8
|
import { Type } from 'class-transformer';
|
|
9
9
|
import 'reflect-metadata';
|
|
10
10
|
import { Editor, Field, Schema, Model, FieldType } from '@qwickapps/schema';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { IsIn, IsOptional, IsString } from 'class-validator';
|
|
8
8
|
import 'reflect-metadata';
|
|
9
9
|
import { Editor, Field, Schema, FieldType } from '@qwickapps/schema';
|
|
10
10
|
import { ContainerSchema } from './ContainerSchema';
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { ReactNode } from 'react';
|
|
8
7
|
import { IsOptional, IsString, IsNumber, IsIn } from 'class-validator';
|
|
9
8
|
import 'reflect-metadata';
|
|
10
9
|
import { Editor, Field, Schema, FieldType } from '@qwickapps/schema';
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { ReactNode } from 'react';
|
|
8
7
|
import { IsBoolean, IsOptional, IsString, IsNumber, IsIn, Min } from 'class-validator';
|
|
9
8
|
import 'reflect-metadata';
|
|
10
9
|
import { Editor, Field, Schema, FieldType } from '@qwickapps/schema';
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
import { IsOptional, IsString, IsIn } from 'class-validator';
|
|
8
8
|
import 'reflect-metadata';
|
|
9
9
|
import { Editor, Field, Schema, FieldType } from '@qwickapps/schema';
|
|
10
|
-
import { ReactNode } from 'react';
|
|
11
10
|
import { ContainerSchema } from './ContainerSchema';
|
|
12
11
|
|
|
13
12
|
@Schema('Section', '1.0.0')
|
|
@@ -170,7 +170,7 @@ export class ViewSchema extends Model {
|
|
|
170
170
|
})
|
|
171
171
|
@IsOptional()
|
|
172
172
|
@IsString()
|
|
173
|
-
height?: string | number
|
|
173
|
+
height?: string | number;
|
|
174
174
|
|
|
175
175
|
@Field()
|
|
176
176
|
@Editor({
|
|
@@ -520,7 +520,7 @@ export class ViewSchema extends Model {
|
|
|
520
520
|
})
|
|
521
521
|
@IsOptional()
|
|
522
522
|
@IsString()
|
|
523
|
-
onClick?: MouseEventHandler<
|
|
523
|
+
onClick?: MouseEventHandler<unknown>;
|
|
524
524
|
|
|
525
525
|
@Field()
|
|
526
526
|
@Editor({
|
|
@@ -531,7 +531,7 @@ export class ViewSchema extends Model {
|
|
|
531
531
|
})
|
|
532
532
|
@IsOptional()
|
|
533
533
|
@IsString()
|
|
534
|
-
onMouseEnter?: MouseEventHandler<
|
|
534
|
+
onMouseEnter?: MouseEventHandler<unknown>;
|
|
535
535
|
|
|
536
536
|
@Field()
|
|
537
537
|
@Editor({
|
|
@@ -542,7 +542,7 @@ export class ViewSchema extends Model {
|
|
|
542
542
|
})
|
|
543
543
|
@IsOptional()
|
|
544
544
|
@IsString()
|
|
545
|
-
onMouseLeave?: MouseEventHandler<
|
|
545
|
+
onMouseLeave?: MouseEventHandler<unknown>;
|
|
546
546
|
|
|
547
547
|
@Field()
|
|
548
548
|
@Editor({
|
|
@@ -553,7 +553,7 @@ export class ViewSchema extends Model {
|
|
|
553
553
|
})
|
|
554
554
|
@IsOptional()
|
|
555
555
|
@IsString()
|
|
556
|
-
onFocus?: FocusEventHandler<
|
|
556
|
+
onFocus?: FocusEventHandler<unknown>;
|
|
557
557
|
|
|
558
558
|
@Field()
|
|
559
559
|
@Editor({
|
|
@@ -564,7 +564,7 @@ export class ViewSchema extends Model {
|
|
|
564
564
|
})
|
|
565
565
|
@IsOptional()
|
|
566
566
|
@IsString()
|
|
567
|
-
onBlur?: FocusEventHandler<
|
|
567
|
+
onBlur?: FocusEventHandler<unknown>;
|
|
568
568
|
}
|
|
569
569
|
|
|
570
570
|
export default ViewSchema;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import React, { ReactNode, ReactElement } from 'react';
|
|
13
13
|
import { SerializableConstructor } from '../types/Serializable';
|
|
14
14
|
import { ReactNodeTransformer } from './ReactNodeTransformer';
|
|
15
|
+
import SafeSpan from '../../components/SafeSpan';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Registry for component classes that support serialization
|
|
@@ -26,7 +27,7 @@ const patternRegistry = new Map<string, PatternHandler>();
|
|
|
26
27
|
/**
|
|
27
28
|
* Type for HTML pattern transformation handlers
|
|
28
29
|
*/
|
|
29
|
-
export type PatternHandler = (element: Element) =>
|
|
30
|
+
export type PatternHandler = (element: Element) => unknown;
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* Strict mode: throw on unregistered components
|
|
@@ -77,7 +78,7 @@ export class ComponentTransformer {
|
|
|
77
78
|
throw new Error(`Component class '${tagName}' must have a static 'version' property`);
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
if (typeof (componentClass as
|
|
81
|
+
if (typeof (componentClass as { fromJson?: unknown }).fromJson !== 'function') {
|
|
81
82
|
throw new Error(`Component class '${tagName}' must implement static 'fromJson' method`);
|
|
82
83
|
}
|
|
83
84
|
|
|
@@ -88,8 +89,9 @@ export class ComponentTransformer {
|
|
|
88
89
|
componentRegistry.set(tagName, componentClass);
|
|
89
90
|
|
|
90
91
|
// Register HTML patterns if component supports them
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
const classWithPatterns = componentClass as SerializableConstructor & { registerPatternHandlers?: (transformer: typeof ComponentTransformer) => void };
|
|
93
|
+
if (typeof classWithPatterns.registerPatternHandlers === 'function') {
|
|
94
|
+
classWithPatterns.registerPatternHandlers(ComponentTransformer);
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
|
|
@@ -99,7 +101,7 @@ export class ComponentTransformer {
|
|
|
99
101
|
* In legacy mode: uses fallback tag for unregistered components/html/text
|
|
100
102
|
*/
|
|
101
103
|
static serialize(node: ReactNode | ReactNode[]): string {
|
|
102
|
-
const serializedData = ComponentTransformer.serializeNode(node
|
|
104
|
+
const serializedData = ComponentTransformer.serializeNode(node);
|
|
103
105
|
return JSON.stringify(serializedData);
|
|
104
106
|
}
|
|
105
107
|
|
|
@@ -122,20 +124,20 @@ export class ComponentTransformer {
|
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
if (input == null) return null;
|
|
125
|
-
return ComponentTransformer.deserializeData(input
|
|
127
|
+
return ComponentTransformer.deserializeData(input);
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
/**
|
|
129
131
|
* Type guard for serialized component schema objects
|
|
130
|
-
* Requires: { tagName: string; version: string; data:
|
|
132
|
+
* Requires: { tagName: string; version: string; data: unknown }
|
|
131
133
|
* Optional: key?: string
|
|
132
134
|
*/
|
|
133
|
-
private static isSerializedComponent(obj:
|
|
135
|
+
private static isSerializedComponent(obj: unknown): obj is { tagName: string; version: string; data: unknown; key?: string } {
|
|
134
136
|
return !!obj
|
|
135
137
|
&& typeof obj === 'object'
|
|
136
|
-
&& typeof (obj as
|
|
137
|
-
&& typeof (obj as
|
|
138
|
-
&& 'data' in
|
|
138
|
+
&& typeof (obj as { tagName?: string }).tagName === 'string'
|
|
139
|
+
&& typeof (obj as { version?: string }).version === 'string'
|
|
140
|
+
&& 'data' in obj;
|
|
139
141
|
}
|
|
140
142
|
|
|
141
143
|
/**
|
|
@@ -143,7 +145,7 @@ export class ComponentTransformer {
|
|
|
143
145
|
* @param data - Data to deserialize
|
|
144
146
|
* @returns React node(s)
|
|
145
147
|
*/
|
|
146
|
-
private static deserializeData(data:
|
|
148
|
+
private static deserializeData(data: unknown): ReactNode | ReactNode[] {
|
|
147
149
|
if (data == null) return null;
|
|
148
150
|
|
|
149
151
|
// Arrays: map recursively
|
|
@@ -177,8 +179,21 @@ export class ComponentTransformer {
|
|
|
177
179
|
}
|
|
178
180
|
}
|
|
179
181
|
|
|
182
|
+
// Handle primitives that are valid React children
|
|
183
|
+
if (typeof data === 'string' || typeof data === 'number' || typeof data === 'boolean') {
|
|
184
|
+
return data;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// For objects, we can't render them directly
|
|
180
188
|
console.warn(`TEST: Unrecognized data:`, data);
|
|
181
|
-
|
|
189
|
+
|
|
190
|
+
// In development, show debug info; in production, return null
|
|
191
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
192
|
+
const displayText = typeof data === 'object' ? JSON.stringify(data, null, 2) : String(data);
|
|
193
|
+
return React.createElement(SafeSpan, { html: `<pre>${displayText}</pre>` });
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return null;
|
|
182
197
|
}
|
|
183
198
|
|
|
184
199
|
/**
|
|
@@ -186,7 +201,7 @@ export class ComponentTransformer {
|
|
|
186
201
|
* @param node - React node to serialize
|
|
187
202
|
* @returns Serializable data structure { tagName, version, data }
|
|
188
203
|
*/
|
|
189
|
-
private static serializeNode(node:
|
|
204
|
+
private static serializeNode(node: unknown): unknown {
|
|
190
205
|
if (node == null) return null;
|
|
191
206
|
|
|
192
207
|
// Handle arrays of nodes (produce array of schema objects/null)
|
|
@@ -211,9 +226,10 @@ export class ComponentTransformer {
|
|
|
211
226
|
if (tagName) {
|
|
212
227
|
const componentClass = componentRegistry.get(tagName)!;
|
|
213
228
|
|
|
214
|
-
let serializedData:
|
|
215
|
-
|
|
216
|
-
|
|
229
|
+
let serializedData: unknown = null;
|
|
230
|
+
const classWithToJson = componentClass as SerializableConstructor & { toJson?: (props: unknown) => unknown };
|
|
231
|
+
if (typeof classWithToJson.toJson === 'function') {
|
|
232
|
+
serializedData = classWithToJson.toJson(element.props);
|
|
217
233
|
}
|
|
218
234
|
|
|
219
235
|
if (serializedData !== null) {
|
|
@@ -231,7 +247,8 @@ export class ComponentTransformer {
|
|
|
231
247
|
}
|
|
232
248
|
} else if (strictMode) {
|
|
233
249
|
// In strict mode, throw if we can't find a tag name for the component
|
|
234
|
-
const
|
|
250
|
+
const typeWithName = componentType as { displayName?: string; name?: string };
|
|
251
|
+
const componentName = typeWithName.displayName || typeWithName.name || 'Unknown';
|
|
235
252
|
throw new Error(`Unregistered component '${componentName}' cannot be serialized in strict mode`);
|
|
236
253
|
}
|
|
237
254
|
}
|
|
@@ -255,7 +272,7 @@ export class ComponentTransformer {
|
|
|
255
272
|
* @param data - Serialized data from ReactNodeTransformer
|
|
256
273
|
* @returns React node
|
|
257
274
|
*/
|
|
258
|
-
private static deserializeUnregisteredComponent(data:
|
|
275
|
+
private static deserializeUnregisteredComponent(data: unknown): ReactNode {
|
|
259
276
|
return ReactNodeTransformer.deserialize(data);
|
|
260
277
|
}
|
|
261
278
|
|
|
@@ -264,7 +281,7 @@ export class ComponentTransformer {
|
|
|
264
281
|
* @param componentType - Component constructor function
|
|
265
282
|
* @returns Tag name or null if not found
|
|
266
283
|
*/
|
|
267
|
-
private static findTagNameForComponent(componentType:
|
|
284
|
+
private static findTagNameForComponent(componentType: unknown): string | null {
|
|
268
285
|
// Direct constructor match
|
|
269
286
|
for (const [tagName, registeredClass] of componentRegistry.entries()) {
|
|
270
287
|
if (registeredClass === componentType) return tagName;
|
|
@@ -21,7 +21,7 @@ export class ReactNodeTransformer {
|
|
|
21
21
|
* @param node - React node to serialize
|
|
22
22
|
* @returns Serializable data structure
|
|
23
23
|
*/
|
|
24
|
-
static serialize(node: ReactNode):
|
|
24
|
+
static serialize(node: ReactNode): unknown {
|
|
25
25
|
if (node === null || node === undefined) {
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
@@ -46,7 +46,7 @@ export class ReactNodeTransformer {
|
|
|
46
46
|
if (isValidElement(node)) {
|
|
47
47
|
const element = node as ReactElement;
|
|
48
48
|
|
|
49
|
-
const comp:
|
|
49
|
+
const comp: unknown = element.type;
|
|
50
50
|
const rawName =
|
|
51
51
|
typeof comp === 'string'
|
|
52
52
|
? comp
|
|
@@ -69,7 +69,7 @@ export class ReactNodeTransformer {
|
|
|
69
69
|
// Handle plain objects
|
|
70
70
|
if (typeof node === 'object' && node !== null) {
|
|
71
71
|
try {
|
|
72
|
-
const serialized:
|
|
72
|
+
const serialized: unknown = { type: 'object', data: {} };
|
|
73
73
|
for (const [key, value] of Object.entries(node)) {
|
|
74
74
|
serialized.data[key] = ReactNodeTransformer.serialize(value);
|
|
75
75
|
}
|
|
@@ -94,7 +94,7 @@ export class ReactNodeTransformer {
|
|
|
94
94
|
* @param data - Data to deserialize
|
|
95
95
|
* @returns React node
|
|
96
96
|
*/
|
|
97
|
-
static deserialize(data:
|
|
97
|
+
static deserialize(data: unknown): ReactNode {
|
|
98
98
|
if (data === null || data === undefined) {
|
|
99
99
|
return null;
|
|
100
100
|
}
|
|
@@ -109,19 +109,20 @@ export class ReactNodeTransformer {
|
|
|
109
109
|
return data.value;
|
|
110
110
|
|
|
111
111
|
case 'array':
|
|
112
|
-
return data.children?.map((child:
|
|
112
|
+
return data.children?.map((child: unknown) => ReactNodeTransformer.deserialize(child)) || [];
|
|
113
113
|
|
|
114
114
|
case 'react-element':
|
|
115
115
|
return ReactNodeTransformer.deserializeReactElement(data);
|
|
116
116
|
|
|
117
|
-
case 'object':
|
|
118
|
-
const result:
|
|
117
|
+
case 'object': {
|
|
118
|
+
const result: Record<string, unknown> = {};
|
|
119
119
|
if (data.data && typeof data.data === 'object') {
|
|
120
120
|
for (const [key, value] of Object.entries(data.data)) {
|
|
121
121
|
result[key] = ReactNodeTransformer.deserialize(value);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
return result;
|
|
125
|
+
}
|
|
125
126
|
|
|
126
127
|
default:
|
|
127
128
|
return String(data.value || data);
|
|
@@ -142,12 +143,12 @@ export class ReactNodeTransformer {
|
|
|
142
143
|
* @param props - Props object to serialize
|
|
143
144
|
* @returns Serialized props
|
|
144
145
|
*/
|
|
145
|
-
private static serializeProps(props:
|
|
146
|
+
private static serializeProps(props: unknown): unknown {
|
|
146
147
|
if (!props || typeof props !== 'object') {
|
|
147
148
|
return props;
|
|
148
149
|
}
|
|
149
150
|
|
|
150
|
-
const serialized:
|
|
151
|
+
const serialized: Record<string, unknown> = {};
|
|
151
152
|
for (const [key, value] of Object.entries(props)) {
|
|
152
153
|
if (key === 'children') {
|
|
153
154
|
// Special handling for children prop
|
|
@@ -168,14 +169,15 @@ export class ReactNodeTransformer {
|
|
|
168
169
|
* @param data - Serialized React element data
|
|
169
170
|
* @returns React element or fallback content
|
|
170
171
|
*/
|
|
171
|
-
private static deserializeReactElement(data:
|
|
172
|
-
const { elementType
|
|
172
|
+
private static deserializeReactElement(data: unknown): ReactNode {
|
|
173
|
+
const typedData = data as { elementType?: string; props?: unknown; key?: string };
|
|
174
|
+
const { elementType, props, key } = typedData;
|
|
173
175
|
|
|
174
176
|
try {
|
|
175
177
|
// Handle HTML elements
|
|
176
178
|
if (typeof elementType === 'string') {
|
|
177
|
-
const deserializedProps = ReactNodeTransformer.deserializeProps(props)
|
|
178
|
-
|
|
179
|
+
const deserializedProps = ReactNodeTransformer.deserializeProps(props) as Record<string, unknown>;
|
|
180
|
+
|
|
179
181
|
return createElement(elementType, { key, ...deserializedProps });
|
|
180
182
|
}
|
|
181
183
|
} catch (error) {
|
|
@@ -191,12 +193,12 @@ export class ReactNodeTransformer {
|
|
|
191
193
|
* @param props - Serialized props object
|
|
192
194
|
* @returns Deserialized props
|
|
193
195
|
*/
|
|
194
|
-
private static deserializeProps(props:
|
|
196
|
+
private static deserializeProps(props: unknown): unknown {
|
|
195
197
|
if (!props || typeof props !== 'object') {
|
|
196
198
|
return props;
|
|
197
199
|
}
|
|
198
200
|
|
|
199
|
-
const deserialized:
|
|
201
|
+
const deserialized: Record<string, unknown> = {};
|
|
200
202
|
for (const [key, value] of Object.entries(props)) {
|
|
201
203
|
if (key === 'children') {
|
|
202
204
|
// Special handling for children prop
|
|
@@ -214,7 +216,7 @@ export class ReactNodeTransformer {
|
|
|
214
216
|
* @param props - Props object
|
|
215
217
|
* @returns Text content or null
|
|
216
218
|
*/
|
|
217
|
-
private static extractTextContent(props:
|
|
219
|
+
private static extractTextContent(props: unknown): string | null {
|
|
218
220
|
if (!props) return null;
|
|
219
221
|
|
|
220
222
|
if (typeof props.children === 'string') {
|