@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
|
@@ -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>
|
|
@@ -15,12 +15,12 @@ describe('Optional logging dependency', () => {
|
|
|
15
15
|
|
|
16
16
|
afterEach(() => {
|
|
17
17
|
// Restore original require
|
|
18
|
-
(global as
|
|
18
|
+
(global as unknown as { require: typeof require }).require = originalRequire;
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
it('should use console fallback when @qwickapps/logging is not available', () => {
|
|
22
22
|
// Mock require to throw an error (simulating missing package)
|
|
23
|
-
(global as
|
|
23
|
+
(global as unknown as { require: jest.Mock }).require = jest.fn().mockImplementation((module: string) => {
|
|
24
24
|
if (module === '@qwickapps/logging') {
|
|
25
25
|
throw new Error('Cannot find module');
|
|
26
26
|
}
|
|
@@ -63,7 +63,7 @@ describe('Optional logging dependency', () => {
|
|
|
63
63
|
process.env.NODE_ENV = 'production';
|
|
64
64
|
|
|
65
65
|
// Mock require to throw an error (use fallback)
|
|
66
|
-
(global as
|
|
66
|
+
(global as unknown as { require: jest.Mock }).require = jest.fn().mockImplementation((module: string) => {
|
|
67
67
|
if (module === '@qwickapps/logging') {
|
|
68
68
|
throw new Error('Cannot find module');
|
|
69
69
|
}
|
|
@@ -9,7 +9,7 @@ export interface AccessibilityState {
|
|
|
9
9
|
isKeyboardUser: boolean;
|
|
10
10
|
issues: AccessibilityIssue[];
|
|
11
11
|
lastAnnouncement: Announcement | null;
|
|
12
|
-
preferences: Record<string,
|
|
12
|
+
preferences: Record<string, unknown>;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface AccessibilityIssue {
|
|
@@ -415,10 +415,12 @@ export const AccessibilityProvider: React.FC<AccessibilityProviderProps> = ({
|
|
|
415
415
|
if (typeof document === 'undefined') return;
|
|
416
416
|
|
|
417
417
|
const { highContrast, reducedMotion, largeText } = state;
|
|
418
|
-
|
|
418
|
+
|
|
419
419
|
document.body.classList.toggle('high-contrast', highContrast);
|
|
420
420
|
document.body.classList.toggle('reduced-motion', reducedMotion);
|
|
421
421
|
document.body.classList.toggle('large-text', largeText);
|
|
422
|
+
// Using specific properties is more granular than using entire state object
|
|
423
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
422
424
|
}, [state.highContrast, state.reducedMotion, state.largeText]);
|
|
423
425
|
|
|
424
426
|
return (
|
|
@@ -68,7 +68,7 @@ export class ErrorBoundary extends Component<Props, State> {
|
|
|
68
68
|
|
|
69
69
|
// Send error to logging service if available
|
|
70
70
|
if (typeof window !== 'undefined') {
|
|
71
|
-
// @ts-
|
|
71
|
+
// @ts-expect-error - Global error logging service may not be defined
|
|
72
72
|
if (window.qwickapps?.logError) {
|
|
73
73
|
window.qwickapps.logError(error, errorInfo);
|
|
74
74
|
}
|
package/src/components/Html.tsx
CHANGED
|
@@ -26,16 +26,16 @@ import { Box } from '@mui/material';
|
|
|
26
26
|
import React, { ReactElement } from 'react';
|
|
27
27
|
import type { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
28
28
|
import { QWICKAPP_COMPONENT, useBaseProps, useDataBinding } from '../hooks';
|
|
29
|
-
import { ComponentTransformer } from '../schemas/transformers/ComponentTransformer';
|
|
30
29
|
import HtmlModel from '../schemas/HtmlSchema';
|
|
30
|
+
import { ComponentTransformer } from '../schemas/transformers/ComponentTransformer';
|
|
31
31
|
import { ModelView } from './base/ModelView';
|
|
32
32
|
import SafeSpan from './SafeSpan';
|
|
33
33
|
|
|
34
34
|
// Legacy types for backward compatibility (now unused internally but maintained for API)
|
|
35
35
|
export interface TransformConfig {
|
|
36
|
-
rules?:
|
|
36
|
+
rules?: unknown[];
|
|
37
37
|
sanitize?: boolean;
|
|
38
|
-
sanitizeOptions?:
|
|
38
|
+
sanitizeOptions?: Record<string, unknown>;
|
|
39
39
|
fallbackComponent?: (element: Element, key: string) => React.ReactNode;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -45,20 +45,17 @@ type HtmlViewProps = SchemaProps<HtmlModel> & {
|
|
|
45
45
|
/** Whether to sanitize HTML (legacy - now handled internally) */
|
|
46
46
|
sanitize?: boolean;
|
|
47
47
|
/** Custom sanitization options (legacy - now handled internally) */
|
|
48
|
-
sanitizeOptions?:
|
|
48
|
+
sanitizeOptions?: Record<string, unknown>;
|
|
49
49
|
/** Container element type (React.ElementType for internal use, string in model for serialization) */
|
|
50
50
|
component?: React.ElementType;
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
export interface HtmlProps extends HtmlViewProps, WithDataBinding {
|
|
53
|
+
export interface HtmlProps extends HtmlViewProps, WithDataBinding {}
|
|
54
54
|
|
|
55
55
|
// View component - handles the actual rendering
|
|
56
56
|
function HtmlView({
|
|
57
57
|
children = '',
|
|
58
|
-
transformConfig,
|
|
59
58
|
stripHeaders = false,
|
|
60
|
-
sanitize = true,
|
|
61
|
-
sanitizeOptions,
|
|
62
59
|
placeholder,
|
|
63
60
|
component = 'div',
|
|
64
61
|
...restProps
|
|
@@ -66,7 +63,7 @@ function HtmlView({
|
|
|
66
63
|
const { styleProps, htmlProps, restProps: otherProps } = useBaseProps(restProps);
|
|
67
64
|
|
|
68
65
|
// Mark as QwickApp component
|
|
69
|
-
(HtmlView as
|
|
66
|
+
(HtmlView as Record<string, unknown>)[QWICKAPP_COMPONENT] = true;
|
|
70
67
|
|
|
71
68
|
// Return placeholder if no HTML content
|
|
72
69
|
if (!children || !children.trim()) {
|
|
@@ -186,7 +183,7 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
186
183
|
static readonly version = '1.0.0';
|
|
187
184
|
|
|
188
185
|
// Deserialization: JSON data → React element
|
|
189
|
-
static fromJson(jsonData:
|
|
186
|
+
static fromJson(jsonData: Record<string, unknown>): ReactElement {
|
|
190
187
|
const { tagName, version, data } = jsonData;
|
|
191
188
|
if (tagName !== Html.tagName) {
|
|
192
189
|
throw new Error(`Cannot deserialize: Expected tagName 'Html' but got '${tagName}'`);
|
|
@@ -200,7 +197,7 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
200
197
|
}
|
|
201
198
|
|
|
202
199
|
// Component-specific serialization properties
|
|
203
|
-
protected getComponentSpecificProps():
|
|
200
|
+
protected getComponentSpecificProps(): Record<string, unknown> {
|
|
204
201
|
return {
|
|
205
202
|
children: this.props.children,
|
|
206
203
|
stripHeaders: this.props.stripHeaders,
|
|
@@ -210,7 +207,7 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
210
207
|
|
|
211
208
|
// Html component renders traditional props view
|
|
212
209
|
protected renderView(): React.ReactElement {
|
|
213
|
-
const {
|
|
210
|
+
const { ...restProps } = this.props;
|
|
214
211
|
return <HtmlView {...restProps} />;
|
|
215
212
|
}
|
|
216
213
|
|
|
@@ -220,7 +217,7 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
220
217
|
}
|
|
221
218
|
|
|
222
219
|
// Register HTML patterns that Html component can handle
|
|
223
|
-
static registerPatternHandlers(registry:
|
|
220
|
+
static registerPatternHandlers(registry: Record<string, unknown>): void {
|
|
224
221
|
// Register div elements with specific classes for Html transformation
|
|
225
222
|
if (!registry.hasPattern('div.html-content')) {
|
|
226
223
|
registry.registerPattern('div.html-content', Html.transformHtmlDiv);
|
|
@@ -233,7 +230,7 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
233
230
|
}
|
|
234
231
|
|
|
235
232
|
// Transform div with html-content class to Html component
|
|
236
|
-
private static transformHtmlDiv(element: Element):
|
|
233
|
+
private static transformHtmlDiv(element: Element): Record<string, unknown> {
|
|
237
234
|
const stripHeaders = element.getAttribute('data-strip-headers') === 'true';
|
|
238
235
|
const placeholder = element.getAttribute('data-placeholder');
|
|
239
236
|
|
|
@@ -248,7 +245,7 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
248
245
|
}
|
|
249
246
|
|
|
250
247
|
// Transform elements with data-html attribute to Html component
|
|
251
|
-
private static transformDataHtml(element: Element):
|
|
248
|
+
private static transformDataHtml(element: Element): Record<string, unknown> {
|
|
252
249
|
const htmlContent = element.getAttribute('data-html') || element.innerHTML;
|
|
253
250
|
const stripHeaders = element.getAttribute('data-strip-headers') === 'true';
|
|
254
251
|
const placeholder = element.getAttribute('data-placeholder');
|
|
@@ -269,7 +266,7 @@ function HtmlWithDataBinding(props: HtmlProps) {
|
|
|
269
266
|
const { dataSource, bindingOptions, ...restProps } = props;
|
|
270
267
|
|
|
271
268
|
// Use data binding
|
|
272
|
-
const {
|
|
269
|
+
const { loading, error, ...htmlProps } = useDataBinding<HtmlModel>(
|
|
273
270
|
dataSource!,
|
|
274
271
|
restProps as Partial<HtmlModel>,
|
|
275
272
|
HtmlModel.getSchema(),
|
package/src/components/Logo.tsx
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
|
-
import React, { useRef, useEffect, useState, useCallback } from 'react';
|
|
38
|
+
import React, { useRef, useEffect, useState, useCallback, useMemo } from 'react';
|
|
39
39
|
import type { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
40
40
|
import { QWICKAPP_COMPONENT, useBaseProps, useDataBinding } from '../hooks';
|
|
41
41
|
import LogoModel from '../schemas/LogoSchema';
|
|
@@ -73,13 +73,16 @@ function LogoView({
|
|
|
73
73
|
className,
|
|
74
74
|
...restProps
|
|
75
75
|
}: LogoViewProps) {
|
|
76
|
-
const { styleProps, htmlProps
|
|
77
|
-
|
|
78
|
-
// Convert separate offset values to BadgeOffset object
|
|
79
|
-
const badgeOffset: BadgeOffset | undefined = (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
const { styleProps, htmlProps } = useBaseProps(restProps);
|
|
77
|
+
|
|
78
|
+
// Convert separate offset values to BadgeOffset object - memoize to prevent unnecessary re-renders
|
|
79
|
+
const badgeOffset: BadgeOffset | undefined = useMemo(
|
|
80
|
+
() => (badgeOffsetX !== undefined || badgeOffsetY !== undefined)
|
|
81
|
+
? { x: badgeOffsetX, y: badgeOffsetY }
|
|
82
|
+
: undefined,
|
|
83
|
+
[badgeOffsetX, badgeOffsetY]
|
|
84
|
+
);
|
|
85
|
+
|
|
83
86
|
const textRef = useRef<SVGTextElement>(null);
|
|
84
87
|
const [calculatedBadgePosition, setCalculatedBadgePosition] = useState({ x: 155, y: 20 });
|
|
85
88
|
const [svgWidth, setSvgWidth] = useState(180);
|
|
@@ -156,7 +159,7 @@ function LogoView({
|
|
|
156
159
|
const { fontSize, height } = getSizeConfig(size, isNewLine);
|
|
157
160
|
|
|
158
161
|
// Calculate badge position based on semantic positioning system
|
|
159
|
-
const calculateBadgePosition = useCallback((textBBox: DOMRect
|
|
162
|
+
const calculateBadgePosition = useCallback((textBBox: DOMRect) => {
|
|
160
163
|
// Scale factor based on font size (medium/28px is the baseline)
|
|
161
164
|
const scale = fontSize / 28; // 28 is the medium/default font size
|
|
162
165
|
const scaledOffset = 8 * scale;
|
|
@@ -223,14 +226,14 @@ function LogoView({
|
|
|
223
226
|
if (textRef.current) {
|
|
224
227
|
const textBBox = textRef.current.getBBox();
|
|
225
228
|
// Calculate badge position using semantic positioning
|
|
226
|
-
const badgePos = calculateBadgePosition(textBBox
|
|
229
|
+
const badgePos = calculateBadgePosition(textBBox);
|
|
227
230
|
// Ensure SVG is wide enough to accommodate text and badge
|
|
228
231
|
const requiredWidth = Math.max(180, textBBox.x + textBBox.width + 20);
|
|
229
|
-
|
|
232
|
+
|
|
230
233
|
setCalculatedBadgePosition(badgePos);
|
|
231
234
|
setSvgWidth(requiredWidth);
|
|
232
235
|
}
|
|
233
|
-
}, [name, badge, badgeOffset, calculateBadgePosition, fontSize, height, parseNameParts]);
|
|
236
|
+
}, [name, badge, badgeOffset, calculateBadgePosition, fontSize, height, parseNameParts, svgWidth]);
|
|
234
237
|
|
|
235
238
|
// Determine CSS class for variant
|
|
236
239
|
let variantClass = '';
|
|
@@ -268,23 +271,24 @@ function LogoView({
|
|
|
268
271
|
<animate attributeName="r" values={`${badgeRadius};${badgeRadius + 1};${badgeRadius}`} dur="1.5s" repeatCount="indefinite" />
|
|
269
272
|
</circle>
|
|
270
273
|
);
|
|
271
|
-
case 'star':
|
|
274
|
+
case 'star': {
|
|
272
275
|
const starScale = scale;
|
|
273
276
|
return (
|
|
274
|
-
<polygon
|
|
277
|
+
<polygon
|
|
275
278
|
points={`${x},${y-5*starScale} ${x+2*starScale},${y} ${x+7*starScale},${y} ${x+3*starScale},${y+3*starScale} ${x+5*starScale},${y+8*starScale} ${x},${y+5*starScale} ${x-5*starScale},${y+8*starScale} ${x-3*starScale},${y+3*starScale} ${x-7*starScale},${y} ${x-2*starScale},${y}`}
|
|
276
279
|
{...baseProps}
|
|
277
280
|
>
|
|
278
281
|
<animate attributeName="opacity" values="0.8;1;0.8" dur="1.5s" repeatCount="indefinite" />
|
|
279
282
|
</polygon>
|
|
280
283
|
);
|
|
284
|
+
}
|
|
281
285
|
case 'square':
|
|
282
286
|
return (
|
|
283
287
|
<rect x={x-badgeRadius} y={y-badgeRadius} width={badgeSize} height={badgeSize} {...baseProps}>
|
|
284
288
|
<animate attributeName="opacity" values="0.8;1;0.8" dur="1.5s" repeatCount="indefinite" />
|
|
285
289
|
</rect>
|
|
286
290
|
);
|
|
287
|
-
case 'heart':
|
|
291
|
+
case 'heart': {
|
|
288
292
|
const heartScale = scale;
|
|
289
293
|
return (
|
|
290
294
|
<path
|
|
@@ -294,6 +298,7 @@ function LogoView({
|
|
|
294
298
|
<animate attributeName="fill-opacity" values="0.7;1;0.7" dur="1.5s" repeatCount="indefinite" />
|
|
295
299
|
</path>
|
|
296
300
|
);
|
|
301
|
+
}
|
|
297
302
|
default:
|
|
298
303
|
return (
|
|
299
304
|
<circle cx={x} cy={y} r={badgeRadius} {...baseProps}>
|
|
@@ -365,7 +370,7 @@ function LogoView({
|
|
|
365
370
|
}
|
|
366
371
|
|
|
367
372
|
// Create container with image positioned based on imagePosition
|
|
368
|
-
|
|
373
|
+
const containerStyle: React.CSSProperties = {
|
|
369
374
|
display: 'flex',
|
|
370
375
|
alignItems: 'center',
|
|
371
376
|
gap: '8px',
|
|
@@ -421,20 +426,28 @@ function LogoView({
|
|
|
421
426
|
// Main Logo component with data binding support
|
|
422
427
|
function Logo(props: LogoProps) {
|
|
423
428
|
const { dataSource, bindingOptions, ...restProps } = props;
|
|
424
|
-
|
|
429
|
+
|
|
430
|
+
// Always call hooks unconditionally
|
|
431
|
+
const bindingResult = useDataBinding<LogoModel>(
|
|
432
|
+
dataSource || '',
|
|
433
|
+
{
|
|
434
|
+
initialData: restProps,
|
|
435
|
+
schema: LogoModel.getSchema(),
|
|
436
|
+
cache: true,
|
|
437
|
+
cacheTTL: 300000,
|
|
438
|
+
strict: false,
|
|
439
|
+
...bindingOptions
|
|
440
|
+
}
|
|
441
|
+
);
|
|
442
|
+
|
|
425
443
|
// If no dataSource, use traditional props
|
|
426
444
|
if (!dataSource) {
|
|
427
445
|
return <LogoView {...restProps} />;
|
|
428
446
|
}
|
|
429
|
-
|
|
430
|
-
// Use data binding
|
|
431
|
-
const {
|
|
432
|
-
|
|
433
|
-
restProps as Partial<LogoModel>,
|
|
434
|
-
LogoModel.getSchema(),
|
|
435
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
436
|
-
);
|
|
437
|
-
|
|
447
|
+
|
|
448
|
+
// Use data binding result
|
|
449
|
+
const { loading, error, ...logoProps } = bindingResult;
|
|
450
|
+
|
|
438
451
|
// Show loading state
|
|
439
452
|
if (loading) {
|
|
440
453
|
return (
|
|
@@ -443,7 +456,7 @@ function Logo(props: LogoProps) {
|
|
|
443
456
|
</div>
|
|
444
457
|
);
|
|
445
458
|
}
|
|
446
|
-
|
|
459
|
+
|
|
447
460
|
// Show error state
|
|
448
461
|
if (error) {
|
|
449
462
|
return (
|
|
@@ -452,12 +465,12 @@ function Logo(props: LogoProps) {
|
|
|
452
465
|
</div>
|
|
453
466
|
);
|
|
454
467
|
}
|
|
455
|
-
|
|
468
|
+
|
|
456
469
|
return <LogoView {...logoProps} />;
|
|
457
470
|
}
|
|
458
471
|
|
|
459
472
|
// Mark as QwickApp component
|
|
460
|
-
(Logo
|
|
473
|
+
Object.defineProperty(Logo, QWICKAPP_COMPONENT, { value: true, enumerable: false, configurable: true });
|
|
461
474
|
|
|
462
475
|
// Export types for external use
|
|
463
476
|
export type { LogoVariant, LogoSize, LogoBadgeShape, PositionType, BadgeOffset };
|