@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
|
@@ -1,21 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Article - Transforms HTML content to use framework components with data binding support
|
|
3
|
-
*
|
|
5
|
+
*
|
|
4
6
|
* Automatically transforms:
|
|
5
7
|
* - <pre><code> blocks to Code components with syntax highlighting
|
|
6
8
|
* - Complex <code> elements to Code components
|
|
7
9
|
* - <section class="blog-section"> to Section components
|
|
8
10
|
* - Other framework-compatible elements
|
|
9
11
|
* - Preserves all other HTML structure and attributes
|
|
10
|
-
*
|
|
12
|
+
*
|
|
11
13
|
* Supports both traditional props and data binding through dataSource.
|
|
12
|
-
*
|
|
14
|
+
*
|
|
13
15
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
14
16
|
*/
|
|
15
17
|
|
|
16
18
|
import { Box, Typography } from '@mui/material';
|
|
17
19
|
import { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
18
|
-
import React
|
|
20
|
+
import React from 'react';
|
|
19
21
|
import { QWICKAPP_COMPONENT, useBaseProps, useDataBinding } from '../../hooks';
|
|
20
22
|
import ArticleModel from '../../schemas/ArticleSchema';
|
|
21
23
|
import { ModelView } from '../base/ModelView';
|
|
@@ -37,7 +39,7 @@ function ArticleView({
|
|
|
37
39
|
const { styleProps, htmlProps, restProps: otherProps } = useBaseProps(restProps);
|
|
38
40
|
|
|
39
41
|
// Mark as QwickApp component
|
|
40
|
-
(ArticleView as
|
|
42
|
+
(ArticleView as Record<string, unknown>)[QWICKAPP_COMPONENT] = true;
|
|
41
43
|
|
|
42
44
|
// Return empty state if no HTML content
|
|
43
45
|
if (!html.trim()) {
|
|
@@ -55,10 +57,10 @@ function ArticleView({
|
|
|
55
57
|
...styleProps.sx
|
|
56
58
|
}}
|
|
57
59
|
>
|
|
58
|
-
<Typography variant="h6" color="text
|
|
60
|
+
<Typography variant="h6" color="var(--theme-text)">
|
|
59
61
|
No Content Available
|
|
60
62
|
</Typography>
|
|
61
|
-
<Typography variant="body2" color="text
|
|
63
|
+
<Typography variant="body2" color="var(--theme-text)">
|
|
62
64
|
No HTML content provided for this article
|
|
63
65
|
</Typography>
|
|
64
66
|
</Box>
|
|
@@ -74,115 +76,257 @@ function ArticleView({
|
|
|
74
76
|
{...otherProps}
|
|
75
77
|
{...styleProps}
|
|
76
78
|
{...{
|
|
77
|
-
//
|
|
78
|
-
maxWidth: '
|
|
79
|
+
// Modern article layout
|
|
80
|
+
maxWidth: '900px',
|
|
79
81
|
mx: 'auto',
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
px: { xs: 2, sm: 3, md: 4 },
|
|
83
|
+
py: { xs: 3, md: 5 },
|
|
84
|
+
|
|
85
|
+
// Typography - Modern, readable hierarchy
|
|
82
86
|
'& h1, & h2, & h3, & h4, & h5, & h6': {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
color: 'var(--theme-text
|
|
87
|
+
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
88
|
+
fontWeight: 700,
|
|
89
|
+
letterSpacing: '-0.02em',
|
|
90
|
+
color: 'var(--theme-text)',
|
|
91
|
+
scrollMarginTop: '100px', // For anchor links
|
|
87
92
|
'&:first-of-type': {
|
|
88
93
|
mt: 0
|
|
89
94
|
}
|
|
90
95
|
},
|
|
91
96
|
'& h1': {
|
|
92
|
-
fontSize: '2.
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
fontSize: { xs: '2rem', md: '2.75rem' },
|
|
98
|
+
lineHeight: 1.15,
|
|
99
|
+
mb: 3,
|
|
100
|
+
mt: 5
|
|
95
101
|
},
|
|
96
102
|
'& h2': {
|
|
97
|
-
fontSize: '2rem',
|
|
98
|
-
|
|
99
|
-
|
|
103
|
+
fontSize: { xs: '1.5rem', md: '2rem' },
|
|
104
|
+
lineHeight: 1.25,
|
|
105
|
+
mb: 2.5,
|
|
106
|
+
mt: 5,
|
|
107
|
+
pb: 1.5,
|
|
108
|
+
borderBottom: '1px solid var(--theme-border-lighter)'
|
|
100
109
|
},
|
|
101
110
|
'& h3': {
|
|
102
|
-
fontSize: '1.5rem',
|
|
103
|
-
|
|
104
|
-
|
|
111
|
+
fontSize: { xs: '1.25rem', md: '1.5rem' },
|
|
112
|
+
lineHeight: 1.3,
|
|
113
|
+
mb: 2,
|
|
114
|
+
mt: 4
|
|
105
115
|
},
|
|
106
116
|
'& h4': {
|
|
107
|
-
fontSize: '1.25rem',
|
|
108
|
-
fontWeight: 600,
|
|
117
|
+
fontSize: { xs: '1.1rem', md: '1.25rem' },
|
|
109
118
|
lineHeight: 1.4,
|
|
110
|
-
|
|
111
|
-
|
|
119
|
+
mb: 1.5,
|
|
120
|
+
mt: 3,
|
|
121
|
+
color: 'var(--theme-text)',
|
|
122
|
+
fontWeight: 600
|
|
112
123
|
},
|
|
113
|
-
|
|
124
|
+
|
|
125
|
+
// Body text - Optimized for reading
|
|
114
126
|
'& p': {
|
|
127
|
+
fontSize: { xs: '1rem', md: '1.0625rem' },
|
|
128
|
+
lineHeight: 1.75,
|
|
115
129
|
mb: 2,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
130
|
+
color: 'var(--theme-text)',
|
|
131
|
+
fontFamily: 'Georgia, "Times New Roman", serif',
|
|
132
|
+
'&:last-child': {
|
|
133
|
+
mb: 0
|
|
134
|
+
}
|
|
119
135
|
},
|
|
120
|
-
|
|
136
|
+
|
|
137
|
+
// Lists - Better visual hierarchy
|
|
121
138
|
'& ul, & ol': {
|
|
122
|
-
mb:
|
|
123
|
-
pl: 4,
|
|
139
|
+
mb: 3,
|
|
140
|
+
pl: { xs: 3, md: 4 },
|
|
124
141
|
'& li': {
|
|
125
|
-
mb: 1,
|
|
126
|
-
lineHeight: 1.
|
|
127
|
-
fontSize: '1.
|
|
128
|
-
color: 'var(--theme-text
|
|
142
|
+
mb: 1.25,
|
|
143
|
+
lineHeight: 1.7,
|
|
144
|
+
fontSize: { xs: '1rem', md: '1.0625rem' },
|
|
145
|
+
color: 'var(--theme-text)',
|
|
146
|
+
fontFamily: 'Georgia, "Times New Roman", serif',
|
|
147
|
+
'&::marker': {
|
|
148
|
+
color: 'var(--theme-primary)',
|
|
149
|
+
fontWeight: 600
|
|
150
|
+
},
|
|
151
|
+
'& p': {
|
|
152
|
+
mb: 0.5
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
'& ul, & ol': {
|
|
156
|
+
mt: 1,
|
|
157
|
+
mb: 0
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
// Code blocks - Modern syntax highlighting style
|
|
162
|
+
'& pre': {
|
|
163
|
+
backgroundColor: 'var(--theme-surface-elevated)',
|
|
164
|
+
color: 'var(--theme-text)',
|
|
165
|
+
borderRadius: 'var(--theme-border-radius)',
|
|
166
|
+
p: { xs: 2, md: 3 },
|
|
167
|
+
mb: 3,
|
|
168
|
+
overflow: 'auto',
|
|
169
|
+
fontSize: '0.9rem',
|
|
170
|
+
lineHeight: 1.6,
|
|
171
|
+
fontFamily: '"Fira Code", "Cascadia Code", "SF Mono", Monaco, Consolas, monospace',
|
|
172
|
+
border: '1px solid var(--theme-border-light)',
|
|
173
|
+
boxShadow: 'var(--theme-elevation-2)',
|
|
174
|
+
'& code': {
|
|
175
|
+
backgroundColor: 'transparent',
|
|
176
|
+
color: 'inherit',
|
|
177
|
+
padding: 0,
|
|
178
|
+
fontSize: 'inherit',
|
|
179
|
+
fontFamily: 'inherit'
|
|
129
180
|
}
|
|
130
181
|
},
|
|
131
|
-
|
|
182
|
+
|
|
183
|
+
// Inline code - Subtle highlight
|
|
184
|
+
'& code': {
|
|
185
|
+
backgroundColor: 'var(--theme-code-bg)',
|
|
186
|
+
color: 'var(--theme-error)',
|
|
187
|
+
padding: '0.2em 0.4em',
|
|
188
|
+
borderRadius: 'var(--theme-border-radius-small)',
|
|
189
|
+
fontSize: '0.9em',
|
|
190
|
+
fontFamily: '"Fira Code", "Cascadia Code", "SF Mono", Monaco, Consolas, monospace',
|
|
191
|
+
fontWeight: 500
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
// Blockquotes - Elegant callouts
|
|
132
195
|
'& blockquote': {
|
|
133
196
|
borderLeft: '4px solid var(--theme-primary)',
|
|
197
|
+
backgroundColor: 'var(--theme-surface-variant)',
|
|
198
|
+
borderRadius: `0 var(--theme-border-radius-small) var(--theme-border-radius-small) 0`,
|
|
134
199
|
pl: 3,
|
|
135
|
-
pr:
|
|
136
|
-
py: 2,
|
|
137
|
-
my:
|
|
200
|
+
pr: 3,
|
|
201
|
+
py: 2.5,
|
|
202
|
+
my: 4,
|
|
138
203
|
ml: 0,
|
|
139
204
|
mr: 0,
|
|
140
|
-
background: 'var(--theme-surface)',
|
|
141
|
-
borderRadius: '8px',
|
|
142
205
|
'& p': {
|
|
143
|
-
fontSize: '1.
|
|
206
|
+
fontSize: { xs: '1.05rem', md: '1.125rem' },
|
|
144
207
|
fontStyle: 'italic',
|
|
145
|
-
lineHeight: 1.
|
|
146
|
-
mb: 1,
|
|
147
|
-
color: 'var(--theme-text
|
|
208
|
+
lineHeight: 1.6,
|
|
209
|
+
mb: 1.5,
|
|
210
|
+
color: 'var(--theme-text)',
|
|
211
|
+
'&:last-child': {
|
|
212
|
+
mb: 0
|
|
213
|
+
}
|
|
148
214
|
},
|
|
149
215
|
'& cite': {
|
|
150
216
|
display: 'block',
|
|
151
|
-
fontSize: '0.
|
|
217
|
+
fontSize: '0.9rem',
|
|
152
218
|
fontStyle: 'normal',
|
|
153
|
-
fontWeight:
|
|
154
|
-
color: 'var(--theme-text
|
|
155
|
-
mt: 1
|
|
219
|
+
fontWeight: 500,
|
|
220
|
+
color: 'var(--theme-text)',
|
|
221
|
+
mt: 1,
|
|
222
|
+
'&::before': {
|
|
223
|
+
content: '"— "',
|
|
224
|
+
color: 'var(--theme-primary)'
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
// Tables - Clean, modern design
|
|
230
|
+
'& table': {
|
|
231
|
+
width: '100%',
|
|
232
|
+
borderCollapse: 'separate',
|
|
233
|
+
borderSpacing: 0,
|
|
234
|
+
mb: 3,
|
|
235
|
+
fontSize: '0.95rem',
|
|
236
|
+
overflow: 'hidden',
|
|
237
|
+
borderRadius: 'var(--theme-border-radius-small)',
|
|
238
|
+
border: '1px solid var(--theme-border-light)',
|
|
239
|
+
'& thead': {
|
|
240
|
+
backgroundColor: 'var(--theme-surface-variant)',
|
|
241
|
+
'& th': {
|
|
242
|
+
padding: '12px 16px',
|
|
243
|
+
textAlign: 'left',
|
|
244
|
+
fontWeight: 600,
|
|
245
|
+
color: 'var(--theme-text)',
|
|
246
|
+
borderBottom: '2px solid var(--theme-border-main)',
|
|
247
|
+
fontSize: '0.875rem',
|
|
248
|
+
textTransform: 'uppercase',
|
|
249
|
+
letterSpacing: '0.05em'
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
'& tbody': {
|
|
253
|
+
'& tr': {
|
|
254
|
+
borderBottom: '1px solid var(--theme-border-lighter)',
|
|
255
|
+
transition: 'background-color 0.2s ease',
|
|
256
|
+
'&:hover': {
|
|
257
|
+
backgroundColor: 'var(--theme-surface-variant)'
|
|
258
|
+
},
|
|
259
|
+
'&:last-child': {
|
|
260
|
+
borderBottom: 'none'
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
'& td': {
|
|
264
|
+
padding: '12px 16px',
|
|
265
|
+
color: 'var(--theme-text)',
|
|
266
|
+
lineHeight: 1.6
|
|
267
|
+
}
|
|
156
268
|
}
|
|
157
269
|
},
|
|
158
|
-
|
|
270
|
+
|
|
271
|
+
// Text emphasis
|
|
159
272
|
'& strong': {
|
|
160
|
-
fontWeight:
|
|
161
|
-
color: 'var(--theme-text
|
|
273
|
+
fontWeight: 700,
|
|
274
|
+
color: 'var(--theme-text)'
|
|
162
275
|
},
|
|
163
|
-
// Emphasis/italic text
|
|
164
276
|
'& em': {
|
|
165
277
|
fontStyle: 'italic',
|
|
166
|
-
color: 'var(--theme-text
|
|
278
|
+
color: 'var(--theme-text)'
|
|
167
279
|
},
|
|
168
|
-
|
|
280
|
+
|
|
281
|
+
// Links - Modern, accessible
|
|
169
282
|
'& a': {
|
|
170
283
|
color: 'var(--theme-primary)',
|
|
171
284
|
textDecoration: 'none',
|
|
172
285
|
fontWeight: 500,
|
|
286
|
+
borderBottom: '1px solid transparent',
|
|
287
|
+
transition: 'border-color 0.2s ease',
|
|
173
288
|
'&:hover': {
|
|
174
|
-
|
|
289
|
+
borderBottomColor: 'var(--theme-primary)'
|
|
290
|
+
},
|
|
291
|
+
'&:focus-visible': {
|
|
292
|
+
outline: '2px solid var(--theme-primary)',
|
|
293
|
+
outlineOffset: '2px',
|
|
294
|
+
borderRadius: '2px'
|
|
175
295
|
}
|
|
176
296
|
},
|
|
297
|
+
|
|
177
298
|
// Images and figures
|
|
299
|
+
'& img': {
|
|
300
|
+
maxWidth: '100%',
|
|
301
|
+
height: 'auto',
|
|
302
|
+
borderRadius: 'var(--theme-border-radius-small)',
|
|
303
|
+
display: 'block',
|
|
304
|
+
my: 3
|
|
305
|
+
},
|
|
178
306
|
'& figure': {
|
|
179
|
-
margin: '
|
|
307
|
+
margin: '3rem 0',
|
|
180
308
|
'& img': {
|
|
181
309
|
maxWidth: '100%',
|
|
182
310
|
height: 'auto',
|
|
183
|
-
borderRadius: '
|
|
311
|
+
borderRadius: 'var(--theme-border-radius-small)',
|
|
312
|
+
boxShadow: 'var(--theme-elevation-2)'
|
|
313
|
+
},
|
|
314
|
+
'& figcaption': {
|
|
315
|
+
textAlign: 'center',
|
|
316
|
+
fontSize: '0.875rem',
|
|
317
|
+
color: 'var(--theme-text)',
|
|
318
|
+
mt: 1.5,
|
|
319
|
+
fontStyle: 'italic'
|
|
184
320
|
}
|
|
185
321
|
},
|
|
322
|
+
|
|
323
|
+
// Horizontal rules
|
|
324
|
+
'& hr': {
|
|
325
|
+
border: 'none',
|
|
326
|
+
borderTop: '1px solid var(--theme-border-light)',
|
|
327
|
+
my: 5
|
|
328
|
+
},
|
|
329
|
+
|
|
186
330
|
...styleProps.sx
|
|
187
331
|
}}
|
|
188
332
|
>
|
|
@@ -198,7 +342,7 @@ export class Article extends ModelView<ArticleProps, ArticleModel> {
|
|
|
198
342
|
static readonly version = '1.0.0';
|
|
199
343
|
|
|
200
344
|
// Component-specific serialization properties
|
|
201
|
-
protected getComponentSpecificProps():
|
|
345
|
+
protected getComponentSpecificProps(): unknown {
|
|
202
346
|
return {
|
|
203
347
|
html: this.props.html,
|
|
204
348
|
skipHeader: this.props.skipHeader
|
|
@@ -207,7 +351,7 @@ export class Article extends ModelView<ArticleProps, ArticleModel> {
|
|
|
207
351
|
|
|
208
352
|
// Article component renders traditional props view
|
|
209
353
|
protected renderView(): React.ReactElement {
|
|
210
|
-
const {
|
|
354
|
+
const { ...restProps } = this.props;
|
|
211
355
|
return <ArticleView {...restProps} />;
|
|
212
356
|
}
|
|
213
357
|
|
|
@@ -217,7 +361,7 @@ export class Article extends ModelView<ArticleProps, ArticleModel> {
|
|
|
217
361
|
}
|
|
218
362
|
|
|
219
363
|
// Register HTML patterns that Article component can handle
|
|
220
|
-
static registerPatternHandlers(registry:
|
|
364
|
+
static registerPatternHandlers(registry: unknown): void {
|
|
221
365
|
// Register article elements
|
|
222
366
|
if (!registry.hasPattern('article')) {
|
|
223
367
|
registry.registerPattern('article', Article.transformArticle);
|
|
@@ -225,7 +369,7 @@ export class Article extends ModelView<ArticleProps, ArticleModel> {
|
|
|
225
369
|
}
|
|
226
370
|
|
|
227
371
|
// Transform article elements to Article component
|
|
228
|
-
private static transformArticle(element: Element):
|
|
372
|
+
private static transformArticle(element: Element): unknown {
|
|
229
373
|
const skipHeader = element.getAttribute('data-skip-header') === 'true';
|
|
230
374
|
|
|
231
375
|
return {
|
|
@@ -243,7 +387,7 @@ function ArticleWithDataBinding(props: ArticleProps) {
|
|
|
243
387
|
const { dataSource, bindingOptions, ...restProps } = props;
|
|
244
388
|
|
|
245
389
|
// Use data binding
|
|
246
|
-
const {
|
|
390
|
+
const { loading, error, ...articleProps } = useDataBinding<ArticleModel>(
|
|
247
391
|
dataSource!,
|
|
248
392
|
restProps as Partial<ArticleModel>,
|
|
249
393
|
ArticleModel.getSchema(),
|
|
@@ -263,7 +407,7 @@ function ArticleWithDataBinding(props: ArticleProps) {
|
|
|
263
407
|
}}
|
|
264
408
|
>
|
|
265
409
|
<Typography variant="h6">Loading Article...</Typography>
|
|
266
|
-
<Typography variant="body2" color="text
|
|
410
|
+
<Typography variant="body2" color="var(--theme-text)">
|
|
267
411
|
Loading
|
|
268
412
|
</Typography>
|
|
269
413
|
</Box>
|
|
@@ -284,7 +428,7 @@ function ArticleWithDataBinding(props: ArticleProps) {
|
|
|
284
428
|
}}
|
|
285
429
|
>
|
|
286
430
|
<Typography variant="h6">Error Loading Article</Typography>
|
|
287
|
-
<Typography variant="body2" color="text
|
|
431
|
+
<Typography variant="body2" color="var(--theme-text)">
|
|
288
432
|
{error.message}
|
|
289
433
|
</Typography>
|
|
290
434
|
</Box>
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* CardListGrid - Generic grid layout for cards with data binding support
|
|
3
|
-
*
|
|
5
|
+
*
|
|
4
6
|
* A unified grid component that can display any type of card component
|
|
5
7
|
* with consistent spacing and layout. Works with ProductCard, FeatureCard,
|
|
6
|
-
* or any other card-like components. Supports both traditional props and
|
|
8
|
+
* or any other card-like components. Supports both traditional props and
|
|
7
9
|
* data binding through dataSource.
|
|
8
|
-
*
|
|
10
|
+
*
|
|
9
11
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
10
12
|
*/
|
|
11
13
|
|
|
@@ -19,15 +21,15 @@ import { ProductCard } from './ProductCard';
|
|
|
19
21
|
|
|
20
22
|
type CardListGridViewProps = SchemaProps<CardListGridModel> & {
|
|
21
23
|
/** Render function for each item (traditional usage) */
|
|
22
|
-
renderItem?: (item:
|
|
24
|
+
renderItem?: (item: unknown, index: number) => React.ReactNode;
|
|
23
25
|
};
|
|
24
26
|
|
|
25
27
|
export interface CardListGridProps extends CardListGridViewProps, WithDataBinding {
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
// Default render function based on component type
|
|
29
|
-
const getDefaultRenderItem = (renderComponent: string = 'ProductCard', itemProps: Record<string,
|
|
30
|
-
return (item:
|
|
31
|
+
const getDefaultRenderItem = (renderComponent: string = 'ProductCard', itemProps: Record<string, unknown> = {}) => {
|
|
32
|
+
return (item: unknown, index: number) => {
|
|
31
33
|
const key = item?.id || item?.key || index;
|
|
32
34
|
|
|
33
35
|
switch (renderComponent) {
|
|
@@ -82,19 +84,21 @@ function CardListGridView({
|
|
|
82
84
|
function CardListGrid(props: CardListGridProps) {
|
|
83
85
|
const { dataSource, bindingOptions, ...restProps } = props;
|
|
84
86
|
|
|
85
|
-
//
|
|
86
|
-
if (!dataSource) {
|
|
87
|
-
return <CardListGridView {...restProps} />;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Use data binding
|
|
87
|
+
// Always call hooks unconditionally
|
|
91
88
|
const result = useDataBinding<CardListGridModel>(
|
|
92
|
-
dataSource,
|
|
89
|
+
dataSource || '',
|
|
93
90
|
restProps as Partial<CardListGridModel>,
|
|
94
91
|
CardListGridModel.getSchema(),
|
|
95
92
|
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
96
93
|
);
|
|
97
|
-
|
|
94
|
+
|
|
95
|
+
// If no dataSource, use traditional props
|
|
96
|
+
if (!dataSource) {
|
|
97
|
+
return <CardListGridView {...restProps} />;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Use data binding result
|
|
101
|
+
const { loading, error, ...cardListGridProps } = result;
|
|
98
102
|
|
|
99
103
|
// Show loading state
|
|
100
104
|
if (loading) {
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Code - Content-prop leaf component for secure code display
|
|
3
|
-
*
|
|
5
|
+
*
|
|
4
6
|
* Uses content-prop strategy to prevent JSON deserialization vulnerabilities.
|
|
5
7
|
* Code content is serialized as data.content (string), not data.children,
|
|
6
8
|
* preventing recursive deserialization of example JSON that looks like components.
|
|
7
|
-
*
|
|
9
|
+
*
|
|
8
10
|
* Features preserved:
|
|
9
11
|
* - Syntax highlighting support
|
|
10
|
-
* - Copy to clipboard functionality
|
|
12
|
+
* - Copy to clipboard functionality
|
|
11
13
|
* - Light/dark theme support
|
|
12
14
|
* - Multiple language support
|
|
13
15
|
* - Responsive design
|
|
14
16
|
* - Line numbers support
|
|
15
17
|
* - Title display
|
|
16
18
|
* - Custom backgrounds
|
|
17
|
-
*
|
|
19
|
+
*
|
|
18
20
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
19
21
|
*/
|
|
20
22
|
|
|
21
23
|
import React, { useState } from 'react';
|
|
22
|
-
import { Box,
|
|
24
|
+
import { Box, Typography, Tooltip, IconButton, Snackbar, Alert, useTheme, Paper } from '@mui/material';
|
|
23
25
|
import { ContentCopy as CopyIcon, Check as CheckIcon } from '@mui/icons-material';
|
|
24
26
|
import CodeSchema from '../../schemas/CodeSchema';
|
|
25
27
|
import type { SchemaProps } from '@qwickapps/schema/src/types/ModelProps';
|
|
@@ -40,7 +42,7 @@ export type CodeProps = ViewProps & SchemaProps<typeof CodeSchema>;
|
|
|
40
42
|
*/
|
|
41
43
|
function CodeView({
|
|
42
44
|
content,
|
|
43
|
-
language = 'text',
|
|
45
|
+
language: _language = 'text',
|
|
44
46
|
showCopy = true,
|
|
45
47
|
showLineNumbers = false,
|
|
46
48
|
title,
|
|
@@ -54,7 +56,7 @@ function CodeView({
|
|
|
54
56
|
const [copied, setCopied] = useState(false);
|
|
55
57
|
const [showCopiedAlert, setShowCopiedAlert] = useState(false);
|
|
56
58
|
|
|
57
|
-
const codeMaxHeight = (restProps.sx as
|
|
59
|
+
const codeMaxHeight = (restProps.sx as Record<string, unknown>)?.maxHeight as number || 400;
|
|
58
60
|
|
|
59
61
|
// Use content prop directly (already a string from content-prop strategy)
|
|
60
62
|
const codeContent = content || '';
|
|
@@ -257,20 +259,23 @@ export const Code: SerializableComponent<CodeProps> = createSerializableView<Cod
|
|
|
257
259
|
});
|
|
258
260
|
|
|
259
261
|
// Register HTML patterns that Code component can handle
|
|
260
|
-
(Code as
|
|
262
|
+
(Code as Record<string, unknown>).registerPatternHandlers = (registry: Record<string, (...args: unknown[]) => unknown>): void => {
|
|
261
263
|
// Register pre + code pattern
|
|
264
|
+
if (!registry.hasPattern) {
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
262
267
|
if (!registry.hasPattern('pre code')) {
|
|
263
|
-
registry.registerPattern('pre code', (Code as
|
|
268
|
+
registry.registerPattern('pre code', (Code as Record<string, unknown>).transformPreCode as (...args: unknown[]) => unknown);
|
|
264
269
|
}
|
|
265
|
-
|
|
270
|
+
|
|
266
271
|
// Register standalone code pattern for complex code blocks
|
|
267
272
|
if (!registry.hasPattern('code.highlight')) {
|
|
268
|
-
registry.registerPattern('code.highlight', (Code as
|
|
273
|
+
registry.registerPattern('code.highlight', (Code as Record<string, unknown>).transformCodeHighlight as (...args: unknown[]) => unknown);
|
|
269
274
|
}
|
|
270
275
|
};
|
|
271
276
|
|
|
272
277
|
// Transform pre + code elements to Code component
|
|
273
|
-
(Code as
|
|
278
|
+
(Code as Record<string, unknown>).transformPreCode = (element: Element): unknown => {
|
|
274
279
|
const codeChild = element.querySelector('code');
|
|
275
280
|
if (!codeChild) return null;
|
|
276
281
|
|
|
@@ -290,7 +295,7 @@ export const Code: SerializableComponent<CodeProps> = createSerializableView<Cod
|
|
|
290
295
|
};
|
|
291
296
|
|
|
292
297
|
// Transform highlighted code elements to Code component
|
|
293
|
-
(Code as
|
|
298
|
+
(Code as Record<string, unknown>).transformCodeHighlight = (element: Element): unknown => {
|
|
294
299
|
const language = Array.from(element.classList)
|
|
295
300
|
.find(cls => cls.startsWith('language-'))
|
|
296
301
|
?.replace('language-', '') || 'text';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Content Component - General-purpose content container with data binding support
|
|
3
5
|
*
|
|
@@ -14,7 +16,7 @@
|
|
|
14
16
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
15
17
|
*/
|
|
16
18
|
|
|
17
|
-
import { Box,
|
|
19
|
+
import { Box, Stack, SxProps, Theme, Typography, useTheme, Paper } from '@mui/material';
|
|
18
20
|
import { WithDataBinding, SchemaProps } from '@qwickapps/schema';
|
|
19
21
|
import React from 'react';
|
|
20
22
|
import { QWICKAPP_COMPONENT, useBaseProps, useDataBinding } from '../../hooks';
|
|
@@ -43,7 +45,7 @@ function ContentView({
|
|
|
43
45
|
const theme = useTheme();
|
|
44
46
|
|
|
45
47
|
// Mark as QwickApp component
|
|
46
|
-
(ContentView as
|
|
48
|
+
(ContentView as Record<string, unknown>)[QWICKAPP_COMPONENT] = true;
|
|
47
49
|
|
|
48
50
|
// Map spacing to padding values
|
|
49
51
|
const getPadding = () => {
|
|
@@ -74,7 +76,7 @@ function ContentView({
|
|
|
74
76
|
};
|
|
75
77
|
|
|
76
78
|
let Wrapper: React.ElementType = Box;
|
|
77
|
-
let wrapperProps: Record<string,
|
|
79
|
+
let wrapperProps: Record<string, unknown> = { ...htmlProps, ...otherProps, sx: commonSx };
|
|
78
80
|
if (variant === 'elevated') {
|
|
79
81
|
Wrapper = Paper;
|
|
80
82
|
wrapperProps = { ...wrapperProps, elevation: 4, sx: { ...commonSx, backgroundColor: theme.palette.background.paper } };
|
|
@@ -165,18 +167,21 @@ function ContentView({
|
|
|
165
167
|
function Content(props: ContentProps) {
|
|
166
168
|
const { dataSource, bindingOptions, ...restProps } = props;
|
|
167
169
|
|
|
170
|
+
// Always call hooks unconditionally
|
|
171
|
+
const bindingResult = useDataBinding<ContentModel>(
|
|
172
|
+
dataSource || '',
|
|
173
|
+
restProps as Partial<ContentModel>,
|
|
174
|
+
ContentModel.getSchema(),
|
|
175
|
+
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
176
|
+
);
|
|
177
|
+
|
|
168
178
|
// If no dataSource, use traditional props
|
|
169
179
|
if (!dataSource) {
|
|
170
180
|
return <ContentView {...restProps} />;
|
|
171
181
|
}
|
|
172
182
|
|
|
173
|
-
// Use data binding
|
|
174
|
-
const {
|
|
175
|
-
dataSource,
|
|
176
|
-
restProps as Partial<ContentModel>,
|
|
177
|
-
ContentModel.getSchema(),
|
|
178
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
179
|
-
);
|
|
183
|
+
// Use data binding result
|
|
184
|
+
const { loading, error, ...contentProps } = bindingResult;
|
|
180
185
|
|
|
181
186
|
// Show loading state
|
|
182
187
|
if (loading) {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* CoverImageHeader - Flexible header with optional image, info section, and context menu
|
|
3
|
-
*
|
|
5
|
+
*
|
|
4
6
|
* Provides a clean header layout similar to modern app interfaces with:
|
|
5
7
|
* - Optional image/avatar on the left
|
|
6
8
|
* - Info section with overline, title, subtitle, and tags
|
|
7
9
|
* - Context menu with up to 3 visible actions + overflow menu
|
|
8
|
-
*
|
|
10
|
+
*
|
|
9
11
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
10
12
|
*/
|
|
11
13
|
|
|
@@ -396,18 +398,21 @@ function ErrorState() {
|
|
|
396
398
|
function CoverImageHeader(props: CoverImageHeaderProps) {
|
|
397
399
|
const { dataSource, bindingOptions, ...restProps } = props;
|
|
398
400
|
|
|
401
|
+
// Always call hooks unconditionally
|
|
402
|
+
const bindingResult = useDataBinding<CoverImageHeaderModel>(
|
|
403
|
+
dataSource || '',
|
|
404
|
+
restProps as Partial<CoverImageHeaderModel>,
|
|
405
|
+
CoverImageHeaderModel.getSchema(),
|
|
406
|
+
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
407
|
+
);
|
|
408
|
+
|
|
399
409
|
// If no dataSource, use traditional props
|
|
400
410
|
if (!dataSource) {
|
|
401
411
|
return <CoverImageHeaderView {...restProps} />;
|
|
402
412
|
}
|
|
403
413
|
|
|
404
|
-
// Use data binding
|
|
405
|
-
const {
|
|
406
|
-
dataSource,
|
|
407
|
-
restProps as Partial<CoverImageHeaderModel>,
|
|
408
|
-
CoverImageHeaderModel.getSchema(),
|
|
409
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
410
|
-
);
|
|
414
|
+
// Use data binding result
|
|
415
|
+
const { loading, error, ...coverImageHeaderProps } = bindingResult;
|
|
411
416
|
|
|
412
417
|
// Show loading state
|
|
413
418
|
if (loading) {
|