@qwickapps/react-framework 1.4.9 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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 +4143 -2318
- package/dist/index.js +4169 -2315
- 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.1.5.1.css +172 -0
- package/dist/palettes/palette-autumn.1.5.1.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.1.5.1.css +172 -0
- package/dist/palettes/palette-cosmic.1.5.1.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.1.5.1.css +178 -0
- package/dist/palettes/palette-default.1.5.1.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.1.5.1.css +172 -0
- package/dist/palettes/palette-ocean.1.5.1.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.1.5.1.css +160 -0
- package/dist/palettes/palette-spring.1.5.1.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.1.5.1.css +172 -0
- package/dist/palettes/palette-winter.1.5.1.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.css +11 -1
- 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 +22 -118
- 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 +244 -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
|
@@ -62,14 +62,14 @@ class CrossBrowserTestComponent implements Serializable {
|
|
|
62
62
|
text?: string;
|
|
63
63
|
number?: number;
|
|
64
64
|
boolean?: boolean;
|
|
65
|
-
array?:
|
|
66
|
-
object?: Record<string,
|
|
65
|
+
array?: unknown[];
|
|
66
|
+
object?: Record<string, unknown>;
|
|
67
67
|
date?: string;
|
|
68
68
|
unicode?: string;
|
|
69
69
|
specialChars?: string;
|
|
70
70
|
}) {}
|
|
71
71
|
|
|
72
|
-
static fromJson(jsonData:
|
|
72
|
+
static fromJson(jsonData: Record<string, unknown>): ReactElement {
|
|
73
73
|
return React.createElement('div', {
|
|
74
74
|
'data-testid': 'cross-browser-test',
|
|
75
75
|
'data-text': jsonData.text,
|
|
@@ -81,14 +81,14 @@ class CrossBrowserTestComponent implements Serializable {
|
|
|
81
81
|
'data-unicode': jsonData.unicode,
|
|
82
82
|
'data-special-chars': jsonData.specialChars
|
|
83
83
|
}, [
|
|
84
|
-
jsonData.text ? React.createElement('span', { key: 'text' }, jsonData.text) : null,
|
|
85
|
-
jsonData.number !== undefined ? React.createElement('span', { key: 'number' }, jsonData.number.toString()) : null,
|
|
86
|
-
jsonData.boolean !== undefined ? React.createElement('span', { key: 'boolean' }, jsonData.boolean.toString()) : null,
|
|
87
|
-
jsonData.unicode ? React.createElement('span', { key: 'unicode' }, jsonData.unicode) : null
|
|
84
|
+
jsonData.text ? React.createElement('span', { key: 'text' }, jsonData.text as string) : null,
|
|
85
|
+
jsonData.number !== undefined ? React.createElement('span', { key: 'number' }, (jsonData.number as number).toString()) : null,
|
|
86
|
+
jsonData.boolean !== undefined ? React.createElement('span', { key: 'boolean' }, (jsonData.boolean as boolean).toString()) : null,
|
|
87
|
+
jsonData.unicode ? React.createElement('span', { key: 'unicode' }, jsonData.unicode as string) : null
|
|
88
88
|
].filter(Boolean));
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
toJson():
|
|
91
|
+
toJson(): Record<string, unknown> {
|
|
92
92
|
return {
|
|
93
93
|
text: this.props.text,
|
|
94
94
|
number: this.props.number,
|
|
@@ -218,7 +218,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
218
218
|
{ name: 'mixed', text: 'Hello 世界 🌍 مرحبا Привет!' }
|
|
219
219
|
];
|
|
220
220
|
|
|
221
|
-
unicodeTests.forEach(({
|
|
221
|
+
unicodeTests.forEach(({ text }) => {
|
|
222
222
|
const testData = {
|
|
223
223
|
tagName: 'CrossBrowserTest',
|
|
224
224
|
version: '1.0.0',
|
|
@@ -338,7 +338,7 @@ describe('Cross-Browser Compatibility Tests', () => {
|
|
|
338
338
|
{
|
|
339
339
|
name: 'sparse array',
|
|
340
340
|
data: {
|
|
341
|
-
sparse: [1, , , 4, , 6] //
|
|
341
|
+
sparse: [1, undefined, undefined, 4, undefined, 6] // Array with undefined values
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
];
|
|
@@ -27,18 +27,18 @@ export class MockSerializableComponent implements Serializable {
|
|
|
27
27
|
children?: React.ReactNode;
|
|
28
28
|
}) {}
|
|
29
29
|
|
|
30
|
-
static fromJson(jsonData:
|
|
30
|
+
static fromJson(jsonData: Record<string, unknown>): ReactElement {
|
|
31
31
|
return React.createElement('div', {
|
|
32
|
-
className: `mock-component ${jsonData.variant || 'default'}`,
|
|
32
|
+
className: `mock-component ${(jsonData.variant as string) || 'default'}`,
|
|
33
33
|
'data-testid': 'mock-component'
|
|
34
|
-
}, [
|
|
35
|
-
jsonData.title && React.createElement('h3', { key: 'title' }, jsonData.title),
|
|
36
|
-
jsonData.content && React.createElement('p', { key: 'content' }, jsonData.content),
|
|
34
|
+
}, ([
|
|
35
|
+
jsonData.title && React.createElement('h3', { key: 'title' }, jsonData.title as string),
|
|
36
|
+
jsonData.content && React.createElement('p', { key: 'content' }, jsonData.content as string),
|
|
37
37
|
jsonData.children
|
|
38
|
-
].filter(Boolean));
|
|
38
|
+
].filter(Boolean) as React.ReactNode[]));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
toJson():
|
|
41
|
+
toJson(): Record<string, unknown> {
|
|
42
42
|
return {
|
|
43
43
|
title: this.props.title,
|
|
44
44
|
content: this.props.content,
|
|
@@ -64,15 +64,15 @@ export class AlternativeMockComponent implements Serializable {
|
|
|
64
64
|
active?: boolean;
|
|
65
65
|
}) {}
|
|
66
66
|
|
|
67
|
-
static fromJson(jsonData:
|
|
67
|
+
static fromJson(jsonData: Record<string, unknown>): ReactElement {
|
|
68
68
|
return React.createElement('button', {
|
|
69
|
-
className: `alt-mock ${jsonData.type || 'default'}`,
|
|
69
|
+
className: `alt-mock ${(jsonData.type as string) || 'default'}`,
|
|
70
70
|
'data-active': jsonData.active,
|
|
71
71
|
'data-testid': 'alternative-mock'
|
|
72
|
-
}, jsonData.label || 'Alternative Component');
|
|
72
|
+
}, (jsonData.label as string) || 'Alternative Component');
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
toJson():
|
|
75
|
+
toJson(): Record<string, unknown> {
|
|
76
76
|
return {
|
|
77
77
|
label: this.props.label,
|
|
78
78
|
type: this.props.type,
|
|
@@ -89,15 +89,15 @@ export const AlternativeMockComponentClass = AlternativeMockComponent as unknown
|
|
|
89
89
|
export class InvalidMockComponent implements Serializable {
|
|
90
90
|
// Missing static tagName and version properties intentionally
|
|
91
91
|
|
|
92
|
-
constructor(public props:
|
|
92
|
+
constructor(public props: Record<string, unknown>) {}
|
|
93
93
|
|
|
94
|
-
static fromJson(
|
|
94
|
+
static fromJson(): ReactElement {
|
|
95
95
|
return React.createElement('div', {}, 'Invalid Component');
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
toJson():
|
|
98
|
+
toJson(): Record<string, unknown> {
|
|
99
99
|
return {};
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
export const InvalidMockComponentClass = InvalidMockComponent as
|
|
103
|
+
export const InvalidMockComponentClass = InvalidMockComponent as unknown; // Intentionally not typed as SerializableConstructor
|
|
@@ -30,11 +30,11 @@ class RealButton implements Serializable {
|
|
|
30
30
|
className?: string;
|
|
31
31
|
}) {}
|
|
32
32
|
|
|
33
|
-
static fromJson(jsonData:
|
|
33
|
+
static fromJson(jsonData: Record<string, unknown>): ReactElement {
|
|
34
34
|
const isLink = !!jsonData.href;
|
|
35
35
|
const element = isLink ? 'a' : 'button';
|
|
36
|
-
|
|
37
|
-
const props:
|
|
36
|
+
|
|
37
|
+
const props: Record<string, unknown> = {
|
|
38
38
|
id: jsonData.id,
|
|
39
39
|
className: [
|
|
40
40
|
'btn',
|
|
@@ -75,7 +75,7 @@ class RealButton implements Serializable {
|
|
|
75
75
|
return React.createElement(element, props, children);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
toJson():
|
|
78
|
+
toJson(): Record<string, unknown> {
|
|
79
79
|
return {
|
|
80
80
|
id: this.props.id,
|
|
81
81
|
label: this.props.label,
|
|
@@ -113,14 +113,14 @@ class RealCard implements Serializable {
|
|
|
113
113
|
category?: string;
|
|
114
114
|
readTime?: string;
|
|
115
115
|
};
|
|
116
|
-
actions?:
|
|
116
|
+
actions?: React.ReactNode[];
|
|
117
117
|
variant?: 'default' | 'outlined' | 'elevated';
|
|
118
118
|
clickable?: boolean;
|
|
119
119
|
href?: string;
|
|
120
120
|
className?: string;
|
|
121
121
|
}) {}
|
|
122
122
|
|
|
123
|
-
static fromJson(jsonData:
|
|
123
|
+
static fromJson(jsonData: unknown): ReactElement {
|
|
124
124
|
const actions = jsonData.actions ? ComponentTransformer.deserialize(jsonData.actions) : null;
|
|
125
125
|
const isClickable = jsonData.clickable || jsonData.href;
|
|
126
126
|
|
|
@@ -194,7 +194,7 @@ class RealCard implements Serializable {
|
|
|
194
194
|
].filter(Boolean))
|
|
195
195
|
].filter(Boolean);
|
|
196
196
|
|
|
197
|
-
const props:
|
|
197
|
+
const props: unknown = {
|
|
198
198
|
id: jsonData.id,
|
|
199
199
|
className: [
|
|
200
200
|
'card',
|
|
@@ -216,7 +216,7 @@ class RealCard implements Serializable {
|
|
|
216
216
|
return React.createElement('div', props, cardContent);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
toJson():
|
|
219
|
+
toJson(): unknown {
|
|
220
220
|
return {
|
|
221
221
|
id: this.props.id,
|
|
222
222
|
title: this.props.title,
|
|
@@ -238,7 +238,7 @@ class RealSection implements Serializable {
|
|
|
238
238
|
id?: string;
|
|
239
239
|
title?: string;
|
|
240
240
|
subtitle?: string;
|
|
241
|
-
children?:
|
|
241
|
+
children?: unknown;
|
|
242
242
|
layout?: 'container' | 'full-width' | 'grid';
|
|
243
243
|
columns?: number;
|
|
244
244
|
gap?: string;
|
|
@@ -250,18 +250,18 @@ class RealSection implements Serializable {
|
|
|
250
250
|
'data-section'?: string;
|
|
251
251
|
}) {}
|
|
252
252
|
|
|
253
|
-
static fromJson(jsonData:
|
|
253
|
+
static fromJson(jsonData: unknown): ReactElement {
|
|
254
254
|
const children = jsonData.children ? ComponentTransformer.deserialize(jsonData.children) : null;
|
|
255
255
|
|
|
256
256
|
const sectionStyle: React.CSSProperties = {
|
|
257
257
|
backgroundColor: jsonData.backgroundColor,
|
|
258
258
|
backgroundImage: jsonData.backgroundImage ? `url(${jsonData.backgroundImage})` : undefined,
|
|
259
259
|
padding: jsonData.padding,
|
|
260
|
-
textAlign: jsonData.textAlign as
|
|
260
|
+
textAlign: jsonData.textAlign as unknown,
|
|
261
261
|
gap: jsonData.gap
|
|
262
262
|
};
|
|
263
263
|
|
|
264
|
-
const contentProps:
|
|
264
|
+
const contentProps: unknown = {
|
|
265
265
|
className: 'section-content'
|
|
266
266
|
};
|
|
267
267
|
|
|
@@ -305,7 +305,7 @@ class RealSection implements Serializable {
|
|
|
305
305
|
].filter(Boolean));
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
toJson():
|
|
308
|
+
toJson(): unknown {
|
|
309
309
|
return {
|
|
310
310
|
id: this.props.id,
|
|
311
311
|
title: this.props.title,
|
|
@@ -330,7 +330,7 @@ class RealFormField implements Serializable {
|
|
|
330
330
|
name: string;
|
|
331
331
|
label?: string;
|
|
332
332
|
type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | 'textarea' | 'select';
|
|
333
|
-
value?:
|
|
333
|
+
value?: unknown;
|
|
334
334
|
placeholder?: string;
|
|
335
335
|
required?: boolean;
|
|
336
336
|
disabled?: boolean;
|
|
@@ -349,7 +349,7 @@ class RealFormField implements Serializable {
|
|
|
349
349
|
className?: string;
|
|
350
350
|
}) {}
|
|
351
351
|
|
|
352
|
-
static fromJson(jsonData:
|
|
352
|
+
static fromJson(jsonData: unknown): ReactElement {
|
|
353
353
|
const fieldId = jsonData.id || `field-${jsonData.name}`;
|
|
354
354
|
const hasError = !!jsonData.error;
|
|
355
355
|
|
|
@@ -381,7 +381,7 @@ class RealFormField implements Serializable {
|
|
|
381
381
|
'aria-describedby': jsonData.helperText || jsonData.error ? `${fieldId}-help` : undefined
|
|
382
382
|
}, [
|
|
383
383
|
React.createElement('option', { key: 'empty', value: '' }, 'Select an option'),
|
|
384
|
-
...(jsonData.options || []).map((option:
|
|
384
|
+
...(jsonData.options || []).map((option: unknown, index: number) =>
|
|
385
385
|
React.createElement('option', {
|
|
386
386
|
key: index,
|
|
387
387
|
value: option.value
|
|
@@ -439,7 +439,7 @@ class RealFormField implements Serializable {
|
|
|
439
439
|
].filter(Boolean));
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
-
toJson():
|
|
442
|
+
toJson(): unknown {
|
|
443
443
|
return {
|
|
444
444
|
id: this.props.id,
|
|
445
445
|
name: this.props.name,
|
|
@@ -917,10 +917,10 @@ describe('Real-World Component Serialization Scenarios', () => {
|
|
|
917
917
|
}
|
|
918
918
|
};
|
|
919
919
|
|
|
920
|
-
Object.entries(variations).forEach(([
|
|
920
|
+
Object.entries(variations).forEach(([, variation]) => {
|
|
921
921
|
const result = ComponentTransformer.deserialize(variation);
|
|
922
922
|
expect(React.isValidElement(result)).toBe(true);
|
|
923
|
-
|
|
923
|
+
|
|
924
924
|
const button = result as ReactElement;
|
|
925
925
|
expect(button.type).toBe('button');
|
|
926
926
|
expect(button.props.className).toContain('btn');
|
|
@@ -16,14 +16,14 @@ import { Serializable, SerializableConstructor } from '../../types/Serializable'
|
|
|
16
16
|
class ErrorTestButton implements Serializable {
|
|
17
17
|
constructor(public props: { label?: string; throwOnFromJson?: boolean; throwOnToJson?: boolean }) {}
|
|
18
18
|
|
|
19
|
-
static fromJson(jsonData:
|
|
19
|
+
static fromJson(jsonData: Record<string, unknown>): ReactElement {
|
|
20
20
|
if (jsonData.throwOnFromJson) {
|
|
21
21
|
throw new Error('Intentional fromJson error for testing');
|
|
22
22
|
}
|
|
23
|
-
return React.createElement('button', {}, jsonData.label || 'Button');
|
|
23
|
+
return React.createElement('button', {}, (jsonData.label as string) || 'Button');
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
toJson():
|
|
26
|
+
toJson(): Record<string, unknown> {
|
|
27
27
|
if (this.props.throwOnToJson) {
|
|
28
28
|
throw new Error('Intentional toJson error for testing');
|
|
29
29
|
}
|
|
@@ -37,21 +37,21 @@ class ErrorTestButton implements Serializable {
|
|
|
37
37
|
|
|
38
38
|
class InvalidComponentClass {
|
|
39
39
|
// This class does not implement Serializable interface
|
|
40
|
-
static fromJson(
|
|
40
|
+
static fromJson(): ReactElement {
|
|
41
41
|
return React.createElement('div', {}, 'Invalid component');
|
|
42
42
|
}
|
|
43
43
|
// Missing toJson method
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
class MalformedFromJsonComponent implements Serializable {
|
|
47
|
-
constructor(public props:
|
|
47
|
+
constructor(public props: Record<string, unknown>) {}
|
|
48
48
|
|
|
49
|
-
static fromJson(
|
|
49
|
+
static fromJson(): unknown {
|
|
50
50
|
// Returns non-ReactElement (invalid)
|
|
51
51
|
return { invalid: 'return value' };
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
toJson():
|
|
54
|
+
toJson(): unknown {
|
|
55
55
|
return this.props;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -233,7 +233,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
233
233
|
'{"duplicate": "key", "duplicate": "key2"}', // Valid JSON but semantically questionable
|
|
234
234
|
];
|
|
235
235
|
|
|
236
|
-
malformedJsonInputs.forEach((input
|
|
236
|
+
malformedJsonInputs.forEach((input) => {
|
|
237
237
|
if (input !== '{"duplicate": "key", "duplicate": "key2"}') { // This is actually valid JSON
|
|
238
238
|
expect(() => {
|
|
239
239
|
ComponentTransformer.deserialize(input);
|
|
@@ -258,7 +258,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
258
258
|
});
|
|
259
259
|
|
|
260
260
|
it('should handle deeply nested JSON structures', () => {
|
|
261
|
-
let deepObject:
|
|
261
|
+
let deepObject: unknown = { tagName: 'ErrorTestButton', version: '1.0.0', data: {} };
|
|
262
262
|
|
|
263
263
|
// Create 1000 levels of nesting
|
|
264
264
|
for (let i = 0; i < 1000; i++) {
|
|
@@ -273,7 +273,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
273
273
|
|
|
274
274
|
it('should handle JSON with circular references (after JSON.stringify)', () => {
|
|
275
275
|
// Since JSON.stringify removes circular references, we test the behavior
|
|
276
|
-
const obj:
|
|
276
|
+
const obj: unknown = { tagName: 'ErrorTestButton', version: '1.0.0', data: {} };
|
|
277
277
|
obj.circular = obj;
|
|
278
278
|
|
|
279
279
|
expect(() => {
|
|
@@ -318,7 +318,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
318
318
|
it('should handle component class without proper static methods', () => {
|
|
319
319
|
// Try to register a class that doesn't properly implement the interface
|
|
320
320
|
expect(() => {
|
|
321
|
-
ComponentTransformer.registerComponent('InvalidClass', InvalidComponentClass as
|
|
321
|
+
ComponentTransformer.registerComponent('InvalidClass', InvalidComponentClass as unknown);
|
|
322
322
|
}).not.toThrow(); // Registration succeeds, but usage will fail
|
|
323
323
|
|
|
324
324
|
const invalidComponent = {
|
|
@@ -363,7 +363,7 @@ describe('Component Serialization Error Handling', () => {
|
|
|
363
363
|
|
|
364
364
|
nonObjectInputs.forEach((input, index) => {
|
|
365
365
|
expect(() => {
|
|
366
|
-
const result = ComponentTransformer.deserialize(input as
|
|
366
|
+
const result = ComponentTransformer.deserialize(input as unknown);
|
|
367
367
|
// Should return the input as-is for primitive values
|
|
368
368
|
if (input !== undefined && typeof input !== 'symbol' && typeof input !== 'function') {
|
|
369
369
|
expect(result).toBe(input);
|
|
@@ -402,11 +402,11 @@ describe('Component Serialization Error Handling', () => {
|
|
|
402
402
|
{ tagName: 123, version: '1.0.0', data: {} }, // Non-string tag
|
|
403
403
|
];
|
|
404
404
|
|
|
405
|
-
fakeComponentData.forEach((fake
|
|
405
|
+
fakeComponentData.forEach((fake) => {
|
|
406
406
|
expect(() => {
|
|
407
|
-
|
|
407
|
+
ComponentTransformer.deserialize(fake);
|
|
408
408
|
// Should handle gracefully - some might deserialize, others might throw
|
|
409
|
-
}).not.toThrow(
|
|
409
|
+
}).not.toThrow();
|
|
410
410
|
});
|
|
411
411
|
});
|
|
412
412
|
});
|
|
@@ -12,11 +12,12 @@ import { ComponentTransformer } from '../ComponentTransformer';
|
|
|
12
12
|
import { Serializable, SerializableConstructor } from '../../types/Serializable';
|
|
13
13
|
|
|
14
14
|
// Mock ErrorBoundary for testing unknown component handling
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
16
|
class MockErrorBoundary extends React.Component<
|
|
16
17
|
{ children: React.ReactNode; onError?: (error: Error) => void },
|
|
17
18
|
{ hasError: boolean; error?: Error }
|
|
18
19
|
> {
|
|
19
|
-
constructor(props:
|
|
20
|
+
constructor(props: { children: React.ReactNode; onError?: (error: Error) => void }) {
|
|
20
21
|
super(props);
|
|
21
22
|
this.state = { hasError: false };
|
|
22
23
|
}
|
|
@@ -42,15 +43,15 @@ class MockErrorBoundary extends React.Component<
|
|
|
42
43
|
|
|
43
44
|
// Complex Mock Components for Integration Testing
|
|
44
45
|
class MockButton implements Serializable {
|
|
45
|
-
constructor(public props: {
|
|
46
|
-
label?: string;
|
|
46
|
+
constructor(public props: {
|
|
47
|
+
label?: string;
|
|
47
48
|
variant?: 'primary' | 'secondary' | 'danger';
|
|
48
49
|
onClick?: () => void;
|
|
49
50
|
disabled?: boolean;
|
|
50
|
-
children?:
|
|
51
|
+
children?: React.ReactNode;
|
|
51
52
|
}) {}
|
|
52
53
|
|
|
53
|
-
static fromJson(jsonData:
|
|
54
|
+
static fromJson(jsonData: Record<string, unknown>): ReactElement {
|
|
54
55
|
return React.createElement('button', {
|
|
55
56
|
className: `btn btn-${jsonData.variant || 'primary'}`,
|
|
56
57
|
disabled: jsonData.disabled,
|
|
@@ -59,7 +60,7 @@ class MockButton implements Serializable {
|
|
|
59
60
|
}, jsonData.label || jsonData.children || 'Button');
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
toJson():
|
|
63
|
+
toJson(): unknown {
|
|
63
64
|
return {
|
|
64
65
|
label: this.props.label,
|
|
65
66
|
variant: this.props.variant,
|
|
@@ -74,11 +75,11 @@ class MockSection implements Serializable {
|
|
|
74
75
|
constructor(public props: {
|
|
75
76
|
title?: string;
|
|
76
77
|
className?: string;
|
|
77
|
-
children?:
|
|
78
|
+
children?: unknown;
|
|
78
79
|
background?: string;
|
|
79
80
|
}) {}
|
|
80
81
|
|
|
81
|
-
static fromJson(jsonData:
|
|
82
|
+
static fromJson(jsonData: unknown): ReactElement {
|
|
82
83
|
// Section components often need to deserialize their children
|
|
83
84
|
const children = jsonData.children ?
|
|
84
85
|
ComponentTransformer.deserialize(jsonData.children) : null;
|
|
@@ -93,7 +94,7 @@ class MockSection implements Serializable {
|
|
|
93
94
|
].filter(Boolean));
|
|
94
95
|
}
|
|
95
96
|
|
|
96
|
-
toJson():
|
|
97
|
+
toJson(): unknown {
|
|
97
98
|
return {
|
|
98
99
|
title: this.props.title,
|
|
99
100
|
className: this.props.className,
|
|
@@ -108,11 +109,11 @@ class MockCard implements Serializable {
|
|
|
108
109
|
title?: string;
|
|
109
110
|
content?: string;
|
|
110
111
|
image?: string;
|
|
111
|
-
actions?:
|
|
112
|
-
metadata?: Record<string,
|
|
112
|
+
actions?: unknown[];
|
|
113
|
+
metadata?: Record<string, unknown>;
|
|
113
114
|
}) {}
|
|
114
115
|
|
|
115
|
-
static fromJson(jsonData:
|
|
116
|
+
static fromJson(jsonData: unknown): ReactElement {
|
|
116
117
|
const actions = jsonData.actions ?
|
|
117
118
|
ComponentTransformer.deserialize(jsonData.actions) : null;
|
|
118
119
|
|
|
@@ -137,7 +138,7 @@ class MockCard implements Serializable {
|
|
|
137
138
|
].filter(Boolean));
|
|
138
139
|
}
|
|
139
140
|
|
|
140
|
-
toJson():
|
|
141
|
+
toJson(): unknown {
|
|
141
142
|
return {
|
|
142
143
|
title: this.props.title,
|
|
143
144
|
content: this.props.content,
|
|
@@ -156,7 +157,7 @@ class MockCode implements Serializable {
|
|
|
156
157
|
highlightLines?: number[];
|
|
157
158
|
}) {}
|
|
158
159
|
|
|
159
|
-
static fromJson(jsonData:
|
|
160
|
+
static fromJson(jsonData: unknown): ReactElement {
|
|
160
161
|
return React.createElement('pre', {
|
|
161
162
|
className: `code-block language-${jsonData.language || 'text'}`,
|
|
162
163
|
'data-testid': 'mock-code',
|
|
@@ -165,7 +166,7 @@ class MockCode implements Serializable {
|
|
|
165
166
|
}, React.createElement('code', {}, jsonData.code || ''));
|
|
166
167
|
}
|
|
167
168
|
|
|
168
|
-
toJson():
|
|
169
|
+
toJson(): unknown {
|
|
169
170
|
return {
|
|
170
171
|
code: this.props.code,
|
|
171
172
|
language: this.props.language,
|
|
@@ -256,7 +257,7 @@ describe('Component Serialization Integration Tests', () => {
|
|
|
256
257
|
const result = ComponentTransformer.deserialize(mixedContent);
|
|
257
258
|
expect(Array.isArray(result)).toBe(true);
|
|
258
259
|
|
|
259
|
-
const elements = result as
|
|
260
|
+
const elements = result as unknown[];
|
|
260
261
|
expect(elements).toHaveLength(6);
|
|
261
262
|
expect(elements[0]).toBe('Plain text content');
|
|
262
263
|
expect(React.isValidElement(elements[1])).toBe(true);
|
|
@@ -518,9 +519,6 @@ describe('Component Serialization Integration Tests', () => {
|
|
|
518
519
|
};
|
|
519
520
|
|
|
520
521
|
let capturedError: Error | null = null;
|
|
521
|
-
const onError = (error: Error) => {
|
|
522
|
-
capturedError = error;
|
|
523
|
-
};
|
|
524
522
|
|
|
525
523
|
// Wrap in error boundary and attempt deserialization
|
|
526
524
|
expect(() => {
|
|
@@ -542,7 +540,7 @@ describe('Component Serialization Integration Tests', () => {
|
|
|
542
540
|
{ tag: 'Button', version: '1.0.0', data: null }, // Null data
|
|
543
541
|
];
|
|
544
542
|
|
|
545
|
-
malformedComponents.forEach((malformed
|
|
543
|
+
malformedComponents.forEach((malformed) => {
|
|
546
544
|
expect(() => {
|
|
547
545
|
ComponentTransformer.deserialize(malformed);
|
|
548
546
|
}).toThrow(/Malformed component data/);
|
|
@@ -584,7 +582,7 @@ describe('Component Serialization Integration Tests', () => {
|
|
|
584
582
|
|
|
585
583
|
it('should handle deeply nested structures without stack overflow', () => {
|
|
586
584
|
// Create deeply nested structure (20 levels)
|
|
587
|
-
let nestedStructure:
|
|
585
|
+
let nestedStructure: unknown = {
|
|
588
586
|
tag: 'Button',
|
|
589
587
|
version: '1.0.0',
|
|
590
588
|
data: { label: 'Deep Button' }
|
|
@@ -15,10 +15,10 @@ import { Serializable, SerializableConstructor } from '../../types/Serializable'
|
|
|
15
15
|
class PerfMockButton implements Serializable {
|
|
16
16
|
static readonly tagName = 'Button';
|
|
17
17
|
static readonly version = '1.0.0';
|
|
18
|
-
|
|
19
|
-
constructor(public props: { id?: string; label?: string; metadata?: any }) {}
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
constructor(public props: { id?: string; label?: string; metadata?: Record<string, unknown> }) {}
|
|
20
|
+
|
|
21
|
+
static fromJson(jsonData: Record<string, unknown>): ReactElement {
|
|
22
22
|
return React.createElement('button', {
|
|
23
23
|
id: jsonData.id,
|
|
24
24
|
'data-label': jsonData.label,
|
|
@@ -26,7 +26,7 @@ class PerfMockButton implements Serializable {
|
|
|
26
26
|
}, jsonData.label || 'Button');
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
toJson():
|
|
29
|
+
toJson(): Record<string, unknown> {
|
|
30
30
|
return {
|
|
31
31
|
id: this.props.id,
|
|
32
32
|
label: this.props.label,
|
|
@@ -38,10 +38,10 @@ class PerfMockButton implements Serializable {
|
|
|
38
38
|
class PerfMockSection implements Serializable {
|
|
39
39
|
static readonly tagName = 'Section';
|
|
40
40
|
static readonly version = '1.0.0';
|
|
41
|
-
|
|
42
|
-
constructor(public props: { id?: string; children?: any }) {}
|
|
43
41
|
|
|
44
|
-
|
|
42
|
+
constructor(public props: { id?: string; children?: React.ReactNode }) {}
|
|
43
|
+
|
|
44
|
+
static fromJson(jsonData: Record<string, unknown>): ReactElement {
|
|
45
45
|
const children = jsonData.children ? ComponentTransformer.deserialize(jsonData.children) : null;
|
|
46
46
|
return React.createElement('section', {
|
|
47
47
|
id: jsonData.id,
|
|
@@ -49,7 +49,7 @@ class PerfMockSection implements Serializable {
|
|
|
49
49
|
}, children);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
toJson():
|
|
52
|
+
toJson(): unknown {
|
|
53
53
|
return {
|
|
54
54
|
id: this.props.id,
|
|
55
55
|
children: this.props.children ? ComponentTransformer.serialize(this.props.children) : null
|
|
@@ -70,8 +70,8 @@ function measurePerformance<T>(
|
|
|
70
70
|
operationCount: number = 1
|
|
71
71
|
): { result: T; metrics: PerformanceMetrics } {
|
|
72
72
|
// Force garbage collection if available (for more accurate memory measurements)
|
|
73
|
-
if ((global as
|
|
74
|
-
(global as
|
|
73
|
+
if ((global as unknown).gc) {
|
|
74
|
+
(global as unknown).gc();
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
const startMemory = process.memoryUsage().heapUsed;
|
|
@@ -245,8 +245,8 @@ describe('Component Serialization Performance Tests', () => {
|
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
// Force garbage collection
|
|
248
|
-
if ((global as
|
|
249
|
-
(global as
|
|
248
|
+
if ((global as unknown).gc) {
|
|
249
|
+
(global as unknown).gc();
|
|
250
250
|
await new Promise(resolve => setTimeout(resolve, 100));
|
|
251
251
|
}
|
|
252
252
|
|
|
@@ -303,7 +303,7 @@ describe('Component Serialization Performance Tests', () => {
|
|
|
303
303
|
|
|
304
304
|
for (const depth of depths) {
|
|
305
305
|
// Create nested structure
|
|
306
|
-
let nestedData:
|
|
306
|
+
let nestedData: unknown = {
|
|
307
307
|
tagName: 'Button',
|
|
308
308
|
version: '1.0.0',
|
|
309
309
|
data: { id: 'deep-button', label: `Button at depth ${depth}` }
|
|
@@ -408,9 +408,9 @@ describe('Component Serialization Performance Tests', () => {
|
|
|
408
408
|
const totalDuration = endTime - startTime;
|
|
409
409
|
|
|
410
410
|
// Verify all operations completed successfully
|
|
411
|
-
results.forEach((result
|
|
411
|
+
results.forEach((result) => {
|
|
412
412
|
expect(Array.isArray(result)).toBe(true);
|
|
413
|
-
expect((result as
|
|
413
|
+
expect((result as unknown[]).length).toBe(componentsPerOperation);
|
|
414
414
|
});
|
|
415
415
|
|
|
416
416
|
console.log(`${concurrentOperations} concurrent operations completed in ${totalDuration.toFixed(2)}ms`);
|
|
@@ -237,11 +237,11 @@ describe('QA Test Automation Integration', () => {
|
|
|
237
237
|
ComponentTransformer.clearRegistry();
|
|
238
238
|
|
|
239
239
|
const mockComponent = {
|
|
240
|
-
fromJson: (data:
|
|
240
|
+
fromJson: (data: Record<string, unknown>) => ({ type: 'div', props: { children: data.text } }),
|
|
241
241
|
prototype: { toJson: () => ({ text: 'test' }) }
|
|
242
242
|
};
|
|
243
|
-
|
|
244
|
-
ComponentTransformer.registerComponent('MockComponent', mockComponent as
|
|
243
|
+
|
|
244
|
+
ComponentTransformer.registerComponent('MockComponent', mockComponent as unknown as React.ComponentType);
|
|
245
245
|
|
|
246
246
|
const testData = {
|
|
247
247
|
tagName: 'MockComponent',
|
|
@@ -49,11 +49,11 @@ describe('Round-trip Component Serialization', () => {
|
|
|
49
49
|
|
|
50
50
|
it('should perform perfect round-trip with event handlers', () => {
|
|
51
51
|
const original = (
|
|
52
|
-
<Container
|
|
53
|
-
span={8}
|
|
52
|
+
<Container
|
|
53
|
+
span={8}
|
|
54
54
|
padding="large"
|
|
55
|
-
onClick={(
|
|
56
|
-
onMouseEnter={(
|
|
55
|
+
onClick={() => { console.log("Container clicked"); }}
|
|
56
|
+
onMouseEnter={() => { console.log("Mouse entered"); }}
|
|
57
57
|
>
|
|
58
58
|
Interactive container
|
|
59
59
|
</Container>
|
|
@@ -171,9 +171,9 @@ describe('Round-trip Component Serialization', () => {
|
|
|
171
171
|
|
|
172
172
|
it('should perform perfect round-trip with event handlers', () => {
|
|
173
173
|
const original = (
|
|
174
|
-
<Text
|
|
174
|
+
<Text
|
|
175
175
|
variant="button"
|
|
176
|
-
onClick={(
|
|
176
|
+
onClick={() => { alert("Text clicked"); }}
|
|
177
177
|
style={{ cursor: 'pointer' }}
|
|
178
178
|
>
|
|
179
179
|
Clickable text
|
|
@@ -385,11 +385,11 @@ describe('Round-trip Component Serialization', () => {
|
|
|
385
385
|
role="main"
|
|
386
386
|
aria-label="Comprehensive test container"
|
|
387
387
|
data-testid="round-trip-test"
|
|
388
|
-
|
|
388
|
+
|
|
389
389
|
// Event handlers
|
|
390
|
-
onClick={(
|
|
391
|
-
onMouseEnter={(
|
|
392
|
-
onFocus={(
|
|
390
|
+
onClick={() => console.log('clicked')}
|
|
391
|
+
onMouseEnter={() => console.log('mouse enter')}
|
|
392
|
+
onFocus={() => console.log('focused')}
|
|
393
393
|
>
|
|
394
394
|
Comprehensive test content
|
|
395
395
|
</Container>
|