@qwickapps/react-framework 1.4.1 → 1.4.2
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/QUICK_START_GUIDE.md +82 -0
- package/README.md +221 -21
- package/dist/components/Html.d.ts.map +1 -1
- package/dist/components/Markdown.d.ts +1 -2
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/SafeSpan.d.ts +1 -2
- package/dist/components/SafeSpan.d.ts.map +1 -1
- package/dist/components/base/Container.d.ts +32 -0
- package/dist/components/base/Container.d.ts.map +1 -0
- package/dist/components/base/ContainerView.d.ts +65 -0
- package/dist/components/base/ContainerView.d.ts.map +1 -0
- package/dist/components/base/ModelView.d.ts +37 -46
- package/dist/components/base/ModelView.d.ts.map +1 -1
- package/dist/components/base/index.d.ts +3 -2
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/blocks/Article.d.ts +1 -2
- package/dist/components/blocks/Article.d.ts.map +1 -1
- package/dist/components/blocks/Code-factory.d.ts +22 -0
- package/dist/components/blocks/Code-factory.d.ts.map +1 -0
- package/dist/components/blocks/Code-old.d.ts +31 -0
- package/dist/components/blocks/Code-old.d.ts.map +1 -0
- package/dist/components/blocks/Code.d.ts +30 -18
- package/dist/components/blocks/Code.d.ts.map +1 -1
- package/dist/components/blocks/HeroBlock.d.ts +1 -2
- package/dist/components/blocks/HeroBlock.d.ts.map +1 -1
- package/dist/components/blocks/Image.d.ts +1 -2
- package/dist/components/blocks/Image.d.ts.map +1 -1
- package/dist/components/blocks/Section.d.ts +1 -2
- package/dist/components/blocks/Section.d.ts.map +1 -1
- package/dist/components/blocks/Text.d.ts +35 -27
- package/dist/components/blocks/Text.d.ts.map +1 -1
- package/dist/components/buttons/Button.d.ts +1 -2
- package/dist/components/buttons/Button.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/ChoiceInputField.d.ts +1 -2
- package/dist/components/input/ChoiceInputField.d.ts.map +1 -1
- package/dist/components/input/HtmlInputField.d.ts +1 -2
- package/dist/components/input/HtmlInputField.d.ts.map +1 -1
- package/dist/components/input/SelectInputField.d.ts +1 -2
- package/dist/components/input/SelectInputField.d.ts.map +1 -1
- package/dist/components/pages/Page.d.ts +29 -47
- package/dist/components/pages/Page.d.ts.map +1 -1
- package/dist/components/pages/index.d.ts +2 -3
- package/dist/components/pages/index.d.ts.map +1 -1
- package/dist/components/shared/createSerializableView.d.ts +68 -0
- package/dist/components/shared/createSerializableView.d.ts.map +1 -0
- package/dist/components/shared/viewProps.d.ts +37 -0
- package/dist/components/shared/viewProps.d.ts.map +1 -0
- package/dist/index.esm.js +21782 -22580
- package/dist/index.js +21782 -22579
- package/dist/qa/ConsoleWarningTest.d.ts +5 -0
- package/dist/qa/ConsoleWarningTest.d.ts.map +1 -0
- package/dist/qa/StorageKeyTest.d.ts +6 -0
- package/dist/qa/StorageKeyTest.d.ts.map +1 -0
- package/dist/qa/ThemeStorageKeyTest.d.ts +6 -0
- package/dist/qa/ThemeStorageKeyTest.d.ts.map +1 -0
- package/dist/schemas/CodeSchema.d.ts +2 -2
- package/dist/schemas/CodeSchema.d.ts.map +1 -1
- package/dist/schemas/ContainerSchema.d.ts +12 -0
- package/dist/schemas/ContainerSchema.d.ts.map +1 -0
- package/dist/schemas/PageTemplateSchema.d.ts +3 -3
- package/dist/schemas/PageTemplateSchema.d.ts.map +1 -1
- package/dist/schemas/ViewModelSchema.d.ts +46 -6
- package/dist/schemas/ViewModelSchema.d.ts.map +1 -1
- package/dist/schemas/ViewSchema.d.ts +65 -0
- package/dist/schemas/ViewSchema.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/transformers/ComponentTransformer.d.ts +27 -15
- package/dist/schemas/transformers/ComponentTransformer.d.ts.map +1 -1
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -1
- package/dist/schemas/transformers/registry.d.ts +3 -0
- package/dist/schemas/transformers/registry.d.ts.map +1 -1
- package/dist/src/__tests__/schemas/transformers/MockSerializableComponent.d.ts +66 -0
- package/dist/src/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +1 -0
- package/dist/src/components/AccessibilityChecker.d.ts +12 -0
- package/dist/src/components/AccessibilityChecker.d.ts.map +1 -0
- package/dist/src/components/AccessibilityProvider.d.ts +64 -0
- package/dist/src/components/AccessibilityProvider.d.ts.map +1 -0
- package/dist/src/components/Breadcrumbs.d.ts +39 -0
- package/dist/src/components/Breadcrumbs.d.ts.map +1 -0
- package/dist/src/components/ErrorBoundary.d.ts +46 -0
- package/dist/src/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/components/Html.d.ts +58 -0
- package/dist/src/components/Html.d.ts.map +1 -0
- package/dist/src/components/Logo.d.ts +56 -0
- package/dist/src/components/Logo.d.ts.map +1 -0
- package/dist/src/components/Markdown.d.ts +51 -0
- package/dist/src/components/Markdown.d.ts.map +1 -0
- package/dist/src/components/QwickApp.d.ts +69 -0
- package/dist/src/components/QwickApp.d.ts.map +1 -0
- package/dist/src/components/QwickAppsLogo.d.ts +25 -0
- package/dist/src/components/QwickAppsLogo.d.ts.map +1 -0
- package/dist/src/components/QwickIcon.d.ts +23 -0
- package/dist/src/components/QwickIcon.d.ts.map +1 -0
- package/dist/src/components/ResponsiveMenu.d.ts +38 -0
- package/dist/src/components/ResponsiveMenu.d.ts.map +1 -0
- package/dist/src/components/SafeSpan.d.ts +29 -0
- package/dist/src/components/SafeSpan.d.ts.map +1 -0
- package/dist/src/components/Scaffold.d.ts +57 -0
- package/dist/src/components/Scaffold.d.ts.map +1 -0
- package/dist/src/components/base/Container.d.ts +33 -0
- package/dist/src/components/base/Container.d.ts.map +1 -0
- package/dist/src/components/base/ModelView.d.ts +92 -0
- package/dist/src/components/base/ModelView.d.ts.map +1 -0
- package/dist/src/components/base/index.d.ts +12 -0
- package/dist/src/components/base/index.d.ts.map +1 -0
- package/dist/src/components/blocks/Article.d.ts +32 -0
- package/dist/src/components/blocks/Article.d.ts.map +1 -0
- package/dist/src/components/blocks/CardListGrid.d.ts +23 -0
- package/dist/src/components/blocks/CardListGrid.d.ts.map +1 -0
- package/dist/src/components/blocks/Code.d.ts +37 -0
- package/dist/src/components/blocks/Code.d.ts.map +1 -0
- package/dist/src/components/blocks/Content.d.ts +24 -0
- package/dist/src/components/blocks/Content.d.ts.map +1 -0
- package/dist/src/components/blocks/CoverImageHeader.d.ts +44 -0
- package/dist/src/components/blocks/CoverImageHeader.d.ts.map +1 -0
- package/dist/src/components/blocks/FeatureCard.d.ts +66 -0
- package/dist/src/components/blocks/FeatureCard.d.ts.map +1 -0
- package/dist/src/components/blocks/FeatureGrid.d.ts +48 -0
- package/dist/src/components/blocks/FeatureGrid.d.ts.map +1 -0
- package/dist/src/components/blocks/Footer.d.ts +56 -0
- package/dist/src/components/blocks/Footer.d.ts.map +1 -0
- package/dist/src/components/blocks/HeroBlock.d.ts +55 -0
- package/dist/src/components/blocks/HeroBlock.d.ts.map +1 -0
- package/dist/src/components/blocks/Image.d.ts +40 -0
- package/dist/src/components/blocks/Image.d.ts.map +1 -0
- package/dist/src/components/blocks/PageBannerHeader.d.ts +30 -0
- package/dist/src/components/blocks/PageBannerHeader.d.ts.map +1 -0
- package/dist/src/components/blocks/ProductCard.d.ts +57 -0
- package/dist/src/components/blocks/ProductCard.d.ts.map +1 -0
- package/dist/src/components/blocks/Section.d.ts +45 -0
- package/dist/src/components/blocks/Section.d.ts.map +1 -0
- package/dist/src/components/blocks/Text.d.ts +34 -0
- package/dist/src/components/blocks/Text.d.ts.map +1 -0
- package/dist/src/components/blocks/index.d.ts +41 -0
- package/dist/src/components/blocks/index.d.ts.map +1 -0
- package/dist/src/components/buttons/Button.d.ts +41 -0
- package/dist/src/components/buttons/Button.d.ts.map +1 -0
- package/dist/src/components/buttons/PaletteSwitcher.d.ts +24 -0
- package/dist/src/components/buttons/PaletteSwitcher.d.ts.map +1 -0
- package/dist/src/components/buttons/ThemeSwitcher.d.ts +24 -0
- package/dist/src/components/buttons/ThemeSwitcher.d.ts.map +1 -0
- package/dist/src/components/buttons/index.d.ts +11 -0
- package/dist/src/components/buttons/index.d.ts.map +1 -0
- package/dist/src/components/forms/FormBlock.d.ts +51 -0
- package/dist/src/components/forms/FormBlock.d.ts.map +1 -0
- package/dist/src/components/forms/index.d.ts +8 -0
- package/dist/src/components/forms/index.d.ts.map +1 -0
- package/dist/src/components/index.d.ts +41 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/components/input/ChoiceInputField.d.ts +29 -0
- package/dist/src/components/input/ChoiceInputField.d.ts.map +1 -0
- package/dist/src/components/input/HtmlInputField.d.ts +33 -0
- package/dist/src/components/input/HtmlInputField.d.ts.map +1 -0
- package/dist/src/components/input/SelectInputField.d.ts +31 -0
- package/dist/src/components/input/SelectInputField.d.ts.map +1 -0
- package/dist/src/components/input/SwitchInputField.d.ts +27 -0
- package/dist/src/components/input/SwitchInputField.d.ts.map +1 -0
- package/dist/src/components/input/TextField.d.ts +18 -0
- package/dist/src/components/input/TextField.d.ts.map +1 -0
- package/dist/src/components/input/TextInputField.d.ts +34 -0
- package/dist/src/components/input/TextInputField.d.ts.map +1 -0
- package/dist/src/components/input/index.d.ts +19 -0
- package/dist/src/components/input/index.d.ts.map +1 -0
- package/dist/src/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts +34 -0
- package/dist/src/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts.map +1 -0
- package/dist/src/components/layout/CollapsibleLayout/index.d.ts +9 -0
- package/dist/src/components/layout/CollapsibleLayout/index.d.ts.map +1 -0
- package/dist/src/components/layout/GridCell.d.ts +32 -0
- package/dist/src/components/layout/GridCell.d.ts.map +1 -0
- package/dist/src/components/layout/GridCellWrapper.d.ts +46 -0
- package/dist/src/components/layout/GridCellWrapper.d.ts.map +1 -0
- package/dist/src/components/layout/GridLayout.d.ts +50 -0
- package/dist/src/components/layout/GridLayout.d.ts.map +1 -0
- package/dist/src/components/layout/index.d.ts +14 -0
- package/dist/src/components/layout/index.d.ts.map +1 -0
- package/dist/src/components/menu/Menu.d.ts +1 -0
- package/dist/src/components/menu/Menu.d.ts.map +1 -0
- package/dist/src/components/menu/MenuItem.d.ts +31 -0
- package/dist/src/components/menu/MenuItem.d.ts.map +1 -0
- package/dist/src/components/menu/index.d.ts +7 -0
- package/dist/src/components/menu/index.d.ts.map +1 -0
- package/dist/src/components/pages/FormPage.d.ts +66 -0
- package/dist/src/components/pages/FormPage.d.ts.map +1 -0
- package/dist/src/components/pages/Page.d.ts +68 -0
- package/dist/src/components/pages/Page.d.ts.map +1 -0
- package/dist/src/components/pages/index.d.ts +10 -0
- package/dist/src/components/pages/index.d.ts.map +1 -0
- package/dist/src/components/shared/createSerializableView.d.ts +81 -0
- package/dist/src/components/shared/createSerializableView.d.ts.map +1 -0
- package/dist/src/components/shared/viewProps.d.ts +37 -0
- package/dist/src/components/shared/viewProps.d.ts.map +1 -0
- package/dist/src/config/AppConfig.d.ts +49 -0
- package/dist/src/config/AppConfig.d.ts.map +1 -0
- package/dist/src/config/AppConfigBuilder.d.ts +75 -0
- package/dist/src/config/AppConfigBuilder.d.ts.map +1 -0
- package/dist/src/config/index.d.ts +13 -0
- package/dist/src/config/index.d.ts.map +1 -0
- package/dist/src/config/types.d.ts +130 -0
- package/dist/src/config/types.d.ts.map +1 -0
- package/dist/src/config.d.ts +15 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/contexts/DataContext.d.ts +139 -0
- package/dist/src/contexts/DataContext.d.ts.map +1 -0
- package/dist/src/contexts/DimensionsContext.d.ts +42 -0
- package/dist/src/contexts/DimensionsContext.d.ts.map +1 -0
- package/dist/src/contexts/PaletteContext.d.ts +53 -0
- package/dist/src/contexts/PaletteContext.d.ts.map +1 -0
- package/dist/src/contexts/PrintModeContext.d.ts +27 -0
- package/dist/src/contexts/PrintModeContext.d.ts.map +1 -0
- package/dist/src/contexts/QwickAppContext.d.ts +71 -0
- package/dist/src/contexts/QwickAppContext.d.ts.map +1 -0
- package/dist/src/contexts/ThemeContext.d.ts +65 -0
- package/dist/src/contexts/ThemeContext.d.ts.map +1 -0
- package/dist/src/contexts/index.d.ts +11 -0
- package/dist/src/contexts/index.d.ts.map +1 -0
- package/dist/src/hooks/index.d.ts +12 -0
- package/dist/src/hooks/index.d.ts.map +1 -0
- package/dist/src/hooks/useBaseProps.d.ts +101 -0
- package/dist/src/hooks/useBaseProps.d.ts.map +1 -0
- package/dist/src/hooks/useDataBinding.d.ts +22 -0
- package/dist/src/hooks/useDataBinding.d.ts.map +1 -0
- package/dist/src/hooks/usePrintMode.d.ts +39 -0
- package/dist/src/hooks/usePrintMode.d.ts.map +1 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/palettes/PaletteAutumn.d.ts +10 -0
- package/dist/src/palettes/PaletteAutumn.d.ts.map +1 -0
- package/dist/src/palettes/PaletteCosmic.d.ts +10 -0
- package/dist/src/palettes/PaletteCosmic.d.ts.map +1 -0
- package/dist/src/palettes/PaletteDefault.d.ts +10 -0
- package/dist/src/palettes/PaletteDefault.d.ts.map +1 -0
- package/dist/src/palettes/PaletteOcean.d.ts +10 -0
- package/dist/src/palettes/PaletteOcean.d.ts.map +1 -0
- package/dist/src/palettes/PaletteSpring.d.ts +10 -0
- package/dist/src/palettes/PaletteSpring.d.ts.map +1 -0
- package/dist/src/palettes/PaletteWinter.d.ts +10 -0
- package/dist/src/palettes/PaletteWinter.d.ts.map +1 -0
- package/dist/src/palettes/index.d.ts +13 -0
- package/dist/src/palettes/index.d.ts.map +1 -0
- package/dist/src/schemas/ActionSchema.d.ts +21 -0
- package/dist/src/schemas/ActionSchema.d.ts.map +1 -0
- package/dist/src/schemas/ArticleSchema.d.ts +13 -0
- package/dist/src/schemas/ArticleSchema.d.ts.map +1 -0
- package/dist/src/schemas/ButtonSchema.d.ts +19 -0
- package/dist/src/schemas/ButtonSchema.d.ts.map +1 -0
- package/dist/src/schemas/CardListGridSchema.d.ts +17 -0
- package/dist/src/schemas/CardListGridSchema.d.ts.map +1 -0
- package/dist/src/schemas/ChoiceInputFieldSchema.d.ts +18 -0
- package/dist/src/schemas/ChoiceInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/CodeSchema.d.ts +18 -0
- package/dist/src/schemas/CodeSchema.d.ts.map +1 -0
- package/dist/src/schemas/CollapsibleLayoutSchema.d.ts +32 -0
- package/dist/src/schemas/CollapsibleLayoutSchema.d.ts.map +1 -0
- package/dist/src/schemas/ContainerSchema.d.ts +12 -0
- package/dist/src/schemas/ContainerSchema.d.ts.map +1 -0
- package/dist/src/schemas/ContentSchema.d.ts +21 -0
- package/dist/src/schemas/ContentSchema.d.ts.map +1 -0
- package/dist/src/schemas/CoverImageHeaderSchema.d.ts +28 -0
- package/dist/src/schemas/CoverImageHeaderSchema.d.ts.map +1 -0
- package/dist/src/schemas/FeatureCardSchema.d.ts +28 -0
- package/dist/src/schemas/FeatureCardSchema.d.ts.map +1 -0
- package/dist/src/schemas/FeatureGridSchema.d.ts +17 -0
- package/dist/src/schemas/FeatureGridSchema.d.ts.map +1 -0
- package/dist/src/schemas/FeatureItemSchema.d.ts +16 -0
- package/dist/src/schemas/FeatureItemSchema.d.ts.map +1 -0
- package/dist/src/schemas/FooterItemSchema.d.ts +15 -0
- package/dist/src/schemas/FooterItemSchema.d.ts.map +1 -0
- package/dist/src/schemas/FooterSchema.d.ts +20 -0
- package/dist/src/schemas/FooterSchema.d.ts.map +1 -0
- package/dist/src/schemas/FooterSectionSchema.d.ts +15 -0
- package/dist/src/schemas/FooterSectionSchema.d.ts.map +1 -0
- package/dist/src/schemas/FormBlockSchema.d.ts +19 -0
- package/dist/src/schemas/FormBlockSchema.d.ts.map +1 -0
- package/dist/src/schemas/GridCellSchema.d.ts +23 -0
- package/dist/src/schemas/GridCellSchema.d.ts.map +1 -0
- package/dist/src/schemas/GridLayoutSchema.d.ts +21 -0
- package/dist/src/schemas/GridLayoutSchema.d.ts.map +1 -0
- package/dist/src/schemas/HeaderActionSchema.d.ts +17 -0
- package/dist/src/schemas/HeaderActionSchema.d.ts.map +1 -0
- package/dist/src/schemas/HeroBlockSchema.d.ts +22 -0
- package/dist/src/schemas/HeroBlockSchema.d.ts.map +1 -0
- package/dist/src/schemas/HtmlInputFieldSchema.d.ts +18 -0
- package/dist/src/schemas/HtmlInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/HtmlSchema.d.ts +14 -0
- package/dist/src/schemas/HtmlSchema.d.ts.map +1 -0
- package/dist/src/schemas/ImageSchema.d.ts +32 -0
- package/dist/src/schemas/ImageSchema.d.ts.map +1 -0
- package/dist/src/schemas/LogoSchema.d.ts +35 -0
- package/dist/src/schemas/LogoSchema.d.ts.map +1 -0
- package/dist/src/schemas/MarkdownSchema.d.ts +14 -0
- package/dist/src/schemas/MarkdownSchema.d.ts.map +1 -0
- package/dist/src/schemas/MetadataItemSchema.d.ts +13 -0
- package/dist/src/schemas/MetadataItemSchema.d.ts.map +1 -0
- package/dist/src/schemas/PageBannerHeaderSchema.d.ts +28 -0
- package/dist/src/schemas/PageBannerHeaderSchema.d.ts.map +1 -0
- package/dist/src/schemas/PageTemplateSchema.d.ts +31 -0
- package/dist/src/schemas/PageTemplateSchema.d.ts.map +1 -0
- package/dist/src/schemas/PaletteSwitcherSchema.d.ts +16 -0
- package/dist/src/schemas/PaletteSwitcherSchema.d.ts.map +1 -0
- package/dist/src/schemas/PrintConfigSchema.d.ts +31 -0
- package/dist/src/schemas/PrintConfigSchema.d.ts.map +1 -0
- package/dist/src/schemas/ProductCardSchema.d.ts +39 -0
- package/dist/src/schemas/ProductCardSchema.d.ts.map +1 -0
- package/dist/src/schemas/SafeSpanSchema.d.ts +13 -0
- package/dist/src/schemas/SafeSpanSchema.d.ts.map +1 -0
- package/dist/src/schemas/SectionSchema.d.ts +16 -0
- package/dist/src/schemas/SectionSchema.d.ts.map +1 -0
- package/dist/src/schemas/SelectInputFieldSchema.d.ts +27 -0
- package/dist/src/schemas/SelectInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/SwitchInputFieldSchema.d.ts +18 -0
- package/dist/src/schemas/SwitchInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/TextInputFieldSchema.d.ts +22 -0
- package/dist/src/schemas/TextInputFieldSchema.d.ts.map +1 -0
- package/dist/src/schemas/TextSchema.d.ts +37 -0
- package/dist/src/schemas/TextSchema.d.ts.map +1 -0
- package/dist/src/schemas/ThemeSwitcherSchema.d.ts +19 -0
- package/dist/src/schemas/ThemeSwitcherSchema.d.ts.map +1 -0
- package/dist/src/schemas/ViewSchema.d.ts +66 -0
- package/dist/src/schemas/ViewSchema.d.ts.map +1 -0
- package/dist/src/schemas/index.d.ts +47 -0
- package/dist/src/schemas/index.d.ts.map +1 -0
- package/dist/src/schemas/transformers/ComponentTransformer.d.ts +128 -0
- package/dist/src/schemas/transformers/ComponentTransformer.d.ts.map +1 -0
- package/dist/src/schemas/transformers/ReactNodeTransformer.d.ts +53 -0
- package/dist/src/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -0
- package/dist/src/schemas/transformers/registry.d.ts +18 -0
- package/dist/src/schemas/transformers/registry.d.ts.map +1 -0
- package/dist/src/schemas/types/Serializable.d.ts +46 -0
- package/dist/src/schemas/types/Serializable.d.ts.map +1 -0
- package/dist/src/stories/_templates/SerializationTemplate.d.ts +44 -0
- package/dist/src/stories/_templates/SerializationTemplate.d.ts.map +1 -0
- package/dist/src/templates/TemplateResolver.d.ts +52 -0
- package/dist/src/templates/TemplateResolver.d.ts.map +1 -0
- package/dist/src/templates/index.d.ts +7 -0
- package/dist/src/templates/index.d.ts.map +1 -0
- package/dist/src/types/CacheProvider.d.ts +18 -0
- package/dist/src/types/CacheProvider.d.ts.map +1 -0
- package/dist/src/types/CollapsibleLayout.d.ts +142 -0
- package/dist/src/types/CollapsibleLayout.d.ts.map +1 -0
- package/dist/src/types/ContentProxy.d.ts +47 -0
- package/dist/src/types/ContentProxy.d.ts.map +1 -0
- package/dist/src/types/DataTypes.d.ts +185 -0
- package/dist/src/types/DataTypes.d.ts.map +1 -0
- package/dist/src/types/TemplateProvider.d.ts +10 -0
- package/dist/src/types/TemplateProvider.d.ts.map +1 -0
- package/dist/src/types/TemplateResolver.d.ts +23 -0
- package/dist/src/types/TemplateResolver.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +82 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/utils/breakpoints.d.ts +35 -0
- package/dist/src/utils/breakpoints.d.ts.map +1 -0
- package/dist/src/utils/cssUtils.d.ts +17 -0
- package/dist/src/utils/cssUtils.d.ts.map +1 -0
- package/dist/src/utils/customPaletteManager.d.ts +8 -0
- package/dist/src/utils/customPaletteManager.d.ts.map +1 -0
- package/dist/src/utils/dimensions.d.ts +34 -0
- package/dist/src/utils/dimensions.d.ts.map +1 -0
- package/dist/src/utils/htmlTransform.d.ts +44 -0
- package/dist/src/utils/htmlTransform.d.ts.map +1 -0
- package/dist/src/utils/index.d.ts +16 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/logger.d.ts +26 -0
- package/dist/src/utils/logger.d.ts.map +1 -0
- package/dist/src/utils/paletteUtils.d.ts +38 -0
- package/dist/src/utils/paletteUtils.d.ts.map +1 -0
- package/dist/src/utils/persistenceUtils.d.ts +31 -0
- package/dist/src/utils/persistenceUtils.d.ts.map +1 -0
- package/dist/src/utils/reactUtils.d.ts +33 -0
- package/dist/src/utils/reactUtils.d.ts.map +1 -0
- package/dist/src/utils/spacing.d.ts +34 -0
- package/dist/src/utils/spacing.d.ts.map +1 -0
- package/dist/src/utils/themePerformanceMonitor.d.ts +32 -0
- package/dist/src/utils/themePerformanceMonitor.d.ts.map +1 -0
- package/dist/src/utils/themeUtils.d.ts +27 -0
- package/dist/src/utils/themeUtils.d.ts.map +1 -0
- package/dist/utils/cssUtils.d.ts +17 -0
- package/dist/utils/cssUtils.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +5 -2
- package/scripts/bundle-css.cjs +27 -0
- package/scripts/create-project.sh +28 -0
- package/scripts/create-qwickapps-project.js +284 -0
- package/src/__tests__/components/base/Container.test.tsx +966 -0
- package/src/__tests__/schemas/PageTemplateSchema.test.ts +1 -1
- package/src/__tests__/schemas/ViewSchema.test.ts +805 -0
- package/src/__tests__/schemas/builders.test.ts +2 -2
- package/src/__tests__/schemas/transformers/ComponentTransformer.test.ts +19 -19
- package/src/__tests__/schemas/transformers/CrossBrowserCompatibility.test.ts +13 -13
- package/src/__tests__/schemas/transformers/SerializationErrorHandling.test.ts +39 -39
- package/src/__tests__/schemas/transformers/SerializationPerformance.test.ts +14 -14
- package/src/__tests__/schemas/transformers/TestAutomation.test.ts +8 -8
- package/src/__tests__/schemas/transformers/nested-serialization.test.tsx +181 -0
- package/src/__tests__/schemas/transformers/round-trip-component-serialization.test.tsx +458 -0
- package/src/__tests__/test_image_accessibility.test.tsx +226 -0
- package/src/__tests__/utils/optional-logging.test.ts +3 -3
- package/src/components/Html.tsx +24 -15
- package/src/components/Logo.tsx +2 -2
- package/src/components/Markdown.tsx +2 -7
- package/src/components/SafeSpan.tsx +2 -7
- package/src/components/base/Container.tsx +61 -0
- package/src/components/base/ModelView.tsx +225 -91
- package/src/components/base/index.ts +3 -2
- package/src/components/blocks/Article.tsx +2 -7
- package/src/components/blocks/CardListGrid.tsx +2 -2
- package/src/components/blocks/Code.tsx +91 -179
- package/src/components/blocks/Content.tsx +2 -2
- package/src/components/blocks/CoverImageHeader.tsx +2 -2
- package/src/components/blocks/HeroBlock.tsx +54 -146
- package/src/components/blocks/Image.tsx +82 -196
- package/src/components/blocks/PageBannerHeader.tsx +2 -2
- package/src/components/blocks/Section.tsx +79 -181
- package/src/components/blocks/Text.tsx +100 -198
- package/src/components/buttons/Button.tsx +85 -183
- package/src/components/buttons/PaletteSwitcher.tsx +2 -2
- package/src/components/buttons/ThemeSwitcher.tsx +2 -2
- package/src/components/forms/FormBlock.tsx +2 -2
- package/src/components/index.ts +5 -0
- package/src/components/input/ChoiceInputField.tsx +76 -160
- package/src/components/input/HtmlInputField.tsx +141 -264
- package/src/components/input/SelectInputField.tsx +48 -153
- package/src/components/input/SwitchInputField.tsx +41 -139
- package/src/components/input/TextInputField.tsx +39 -116
- package/src/components/layout/GridCell.tsx +36 -122
- package/src/components/layout/GridLayout.tsx +55 -127
- package/src/components/pages/Page.tsx +268 -276
- package/src/components/pages/index.ts +2 -3
- package/src/components/shared/createSerializableView.tsx +280 -0
- package/src/components/shared/viewProps.ts +207 -0
- package/src/config/__tests__/AppConfigBuilder.test.ts +2 -2
- package/src/contexts/DataContext.tsx +1 -1
- package/src/schemas/ButtonSchema.ts +3 -2
- package/src/schemas/CardListGridSchema.ts +3 -2
- package/src/schemas/ChoiceInputFieldSchema.ts +3 -2
- package/src/schemas/CodeSchema.ts +8 -6
- package/src/schemas/ContainerSchema.ts +25 -0
- package/src/schemas/FeatureCardSchema.ts +1 -1
- package/src/schemas/FormBlockSchema.ts +3 -2
- package/src/schemas/GridCellSchema.ts +4 -10
- package/src/schemas/GridLayoutSchema.ts +8 -14
- package/src/schemas/HeroBlockSchema.ts +3 -2
- package/src/schemas/HtmlInputFieldSchema.ts +3 -2
- package/src/schemas/ImageSchema.ts +3 -2
- package/src/schemas/PageTemplateSchema.ts +5 -5
- package/src/schemas/SectionSchema.ts +4 -12
- package/src/schemas/SelectInputFieldSchema.ts +3 -2
- package/src/schemas/SwitchInputFieldSchema.ts +2 -2
- package/src/schemas/TextInputFieldSchema.ts +3 -2
- package/src/schemas/ViewSchema.ts +570 -0
- package/src/schemas/index.ts +1 -1
- package/src/schemas/transformers/ComponentTransformer.ts +185 -163
- package/src/schemas/transformers/ReactNodeTransformer.ts +31 -28
- package/src/schemas/transformers/registry.ts +17 -10
- package/src/stories/Button.stories.tsx +24 -0
- package/src/stories/ChoiceInputField.stories.tsx +28 -1
- package/src/stories/Code.stories.tsx +61 -1
- package/src/stories/Container.stories.tsx +954 -0
- package/src/stories/FormBlock.stories.tsx +54 -0
- package/src/stories/FormComponents.stories.tsx +8 -13
- package/src/stories/GridCell.stories.tsx +23 -64
- package/src/stories/GridLayout.stories.tsx +22 -47
- package/src/stories/HeroBlock.stories.tsx +28 -0
- package/src/stories/HtmlInputField.stories.tsx +23 -1
- package/src/stories/Image.stories.tsx +45 -233
- package/src/stories/Markdown.stories.tsx +1 -1
- package/src/stories/Section.stories.tsx +38 -4
- package/src/stories/SelectInputField.stories.tsx +26 -1
- package/src/stories/Text.stories.tsx +22 -54
- package/src/stories/TextInputField.stories.tsx +24 -1
- package/src/stories/_templates/SerializationTemplate.tsx +165 -0
- package/src/templates/TemplateResolver.ts +2 -2
- package/src/types/CollapsibleLayout.ts +2 -2
- package/src/utils/cssUtils.ts +49 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/logger.ts +13 -13
- package/src/__tests__/components/base/ModelView.test.tsx +0 -220
- package/src/__tests__/schemas/ViewModelSchema.test.ts +0 -80
- package/src/components/blocks/Code.md +0 -529
- package/src/schemas/README.md +0 -661
- package/src/schemas/ViewModelSchema.ts +0 -115
- package/src/tests/ConsoleWarningTest.tsx +0 -30
- package/src/tests/StorageKeyTest.tsx +0 -110
- package/src/tests/ThemeStorageKeyTest.tsx +0 -114
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SwitchInputField Schema - Data model for switch input field component
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
import { ViewSchema } from './ViewSchema';
|
|
7
|
+
export declare class SwitchInputFieldModel extends ViewSchema {
|
|
8
|
+
label?: string;
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
error?: string;
|
|
13
|
+
helperText?: string;
|
|
14
|
+
size?: 'small' | 'medium';
|
|
15
|
+
color?: 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
16
|
+
}
|
|
17
|
+
export default SwitchInputFieldModel;
|
|
18
|
+
//# sourceMappingURL=SwitchInputFieldSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwitchInputFieldSchema.d.ts","sourceRoot":"","sources":["../../../src/schemas/SwitchInputFieldSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,qBACa,qBAAsB,SAAQ,UAAU;IASnD,KAAK,CAAC,EAAE,MAAM,CAAC;IAUf,OAAO,CAAC,EAAE,OAAO,CAAC;IAUlB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAUnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAUnB,KAAK,CAAC,EAAE,MAAM,CAAC;IAUf,UAAU,CAAC,EAAE,MAAM,CAAC;IAUpB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAU1B,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CACxF;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema for TextInputField component - Reusable text input with consistent styling
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
import 'reflect-metadata';
|
|
7
|
+
import { ViewSchema } from './ViewSchema';
|
|
8
|
+
export declare class TextInputFieldModel extends ViewSchema {
|
|
9
|
+
label?: string;
|
|
10
|
+
value?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
error?: string;
|
|
14
|
+
helperText?: string;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
type?: string;
|
|
17
|
+
multiline?: boolean;
|
|
18
|
+
rows?: number;
|
|
19
|
+
maxRows?: number;
|
|
20
|
+
}
|
|
21
|
+
export default TextInputFieldModel;
|
|
22
|
+
//# sourceMappingURL=TextInputFieldSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInputFieldSchema.d.ts","sourceRoot":"","sources":["../../../src/schemas/TextInputFieldSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,qBACa,mBAAoB,SAAQ,UAAU;IASjD,KAAK,CAAC,EAAE,MAAM,CAAC;IAWf,KAAK,CAAC,EAAE,MAAM,CAAC;IAUf,QAAQ,CAAC,EAAE,OAAO,CAAC;IAUnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAWnB,KAAK,CAAC,EAAE,MAAM,CAAC;IAWf,UAAU,CAAC,EAAE,MAAM,CAAC;IAWpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAWrB,IAAI,CAAC,EAAE,MAAM,CAAC;IAUd,SAAS,CAAC,EAAE,OAAO,CAAC;IAUpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAUd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema for Text component - Comprehensive typography component
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
import type { ReactNode } from 'react';
|
|
7
|
+
import 'reflect-metadata';
|
|
8
|
+
import { Model } from '@qwickapps/schema';
|
|
9
|
+
export type TextVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'button' | 'caption' | 'overline';
|
|
10
|
+
export type TextAlign = 'left' | 'center' | 'right' | 'justify' | 'inherit';
|
|
11
|
+
export type TextColor = 'primary' | 'secondary' | 'textPrimary' | 'textSecondary' | 'error' | 'warning' | 'info' | 'success' | 'inherit';
|
|
12
|
+
export type TextElement = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'legend';
|
|
13
|
+
export type TextDecoration = 'none' | 'underline' | 'overline' | 'line-through';
|
|
14
|
+
export type FontWeight = 'inherit' | 'lighter' | 'normal' | 'bold' | 'bolder' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
15
|
+
export type TextTransform = 'none' | 'capitalize' | 'uppercase' | 'lowercase' | 'inherit';
|
|
16
|
+
export declare class TextModel extends Model {
|
|
17
|
+
content?: string;
|
|
18
|
+
variant?: TextVariant;
|
|
19
|
+
color?: TextColor;
|
|
20
|
+
align?: TextAlign;
|
|
21
|
+
component?: TextElement;
|
|
22
|
+
fontWeight?: FontWeight;
|
|
23
|
+
textDecoration?: TextDecoration;
|
|
24
|
+
textTransform?: TextTransform;
|
|
25
|
+
noWrap?: boolean;
|
|
26
|
+
paragraph?: boolean;
|
|
27
|
+
gutterBottom?: boolean;
|
|
28
|
+
fontSize?: string;
|
|
29
|
+
lineHeight?: string;
|
|
30
|
+
letterSpacing?: string;
|
|
31
|
+
fontFamily?: string;
|
|
32
|
+
customColor?: string;
|
|
33
|
+
maxWidth?: string;
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
export default TextModel;
|
|
37
|
+
//# sourceMappingURL=TextSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextSchema.d.ts","sourceRoot":"","sources":["../../../src/schemas/TextSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAy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AC,EAAE,UAAU,CAAC;IAmBxB,cAAc,CAAC,EAAE,cAAc,CAAC;IAoBhC,aAAa,CAAC,EAAE,aAAa,CAAC;IAU9B,MAAM,CAAC,EAAE,OAAO,CAAC;IAUjB,SAAS,CAAC,EAAE,OAAO,CAAC;IAUpB,YAAY,CAAC,EAAE,OAAO,CAAC;IAWvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAWlB,UAAU,CAAC,EAAE,MAAM,CAAC;IAWpB,aAAa,CAAC,EAAE,MAAM,CAAC;IAWvB,UAAU,CAAC,EAAE,MAAM,CAAC;IAWpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAWrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAWlB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema for ThemeSwitcher component - Theme selection control
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
import 'reflect-metadata';
|
|
7
|
+
import { Model } from '@qwickapps/schema';
|
|
8
|
+
export declare class ThemeSwitcherModel extends Model {
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
size?: 'small' | 'medium' | 'large';
|
|
11
|
+
tooltipText?: string;
|
|
12
|
+
showTooltip?: boolean;
|
|
13
|
+
menuPosition?: 'bottom' | 'top' | 'left' | 'right';
|
|
14
|
+
showLightTheme?: boolean;
|
|
15
|
+
showDarkTheme?: boolean;
|
|
16
|
+
showSystemTheme?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export default ThemeSwitcherModel;
|
|
19
|
+
//# sourceMappingURL=ThemeSwitcherSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeSwitcherSchema.d.ts","sourceRoot":"","sources":["../../../src/schemas/ThemeSwitcherSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAyB,KAAK,EAAa,MAAM,mBAAmB,CAAC;AAE5E,qBACa,kBAAmB,SAAQ,KAAK;IAS3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IAWnB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAWpC,WAAW,CAAC,EAAE,MAAM,CAAC;IAUrB,WAAW,CAAC,EAAE,OAAO,CAAC;IAWtB,YAAY,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;IAUnD,cAAc,CAAC,EAAE,OAAO,CAAC;IAUzB,aAAa,CAAC,EAAE,OAAO,CAAC;IAUxB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ViewSchema - Comprehensive base class for all view components
|
|
3
|
+
*
|
|
4
|
+
* Provides ALL props from BaseComponentProps as schema fields including:
|
|
5
|
+
* - Grid layout props (span, breakpoints)
|
|
6
|
+
* - Dimension props (width, height with t-shirt sizing)
|
|
7
|
+
* - Spacing props (padding, margin with t-shirt sizing)
|
|
8
|
+
* - Background and styling props
|
|
9
|
+
* - Accessibility and HTML attributes
|
|
10
|
+
* - Event handlers
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
13
|
+
*/
|
|
14
|
+
import { Model } from '@qwickapps/schema';
|
|
15
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
16
|
+
import 'reflect-metadata';
|
|
17
|
+
import type { FocusEventHandler, MouseEventHandler } from 'react';
|
|
18
|
+
export declare class ViewSchema extends Model {
|
|
19
|
+
span?: number | 'auto' | 'grow';
|
|
20
|
+
xs?: number | 'auto';
|
|
21
|
+
sm?: number | 'auto';
|
|
22
|
+
md?: number | 'auto';
|
|
23
|
+
lg?: number | 'auto';
|
|
24
|
+
xl?: number | 'auto';
|
|
25
|
+
className?: string;
|
|
26
|
+
sx?: SxProps<Theme>;
|
|
27
|
+
style?: React.CSSProperties;
|
|
28
|
+
width?: string | number;
|
|
29
|
+
height?: string | number;
|
|
30
|
+
minWidth?: string | number;
|
|
31
|
+
minHeight?: string | number;
|
|
32
|
+
maxWidth?: string | number;
|
|
33
|
+
maxHeight?: string | number;
|
|
34
|
+
padding?: string | number;
|
|
35
|
+
paddingTop?: string | number;
|
|
36
|
+
paddingRight?: string | number;
|
|
37
|
+
paddingBottom?: string | number;
|
|
38
|
+
paddingLeft?: string | number;
|
|
39
|
+
paddingX?: string | number;
|
|
40
|
+
paddingY?: string | number;
|
|
41
|
+
margin?: string | number;
|
|
42
|
+
marginTop?: string | number;
|
|
43
|
+
marginRight?: string | number;
|
|
44
|
+
marginBottom?: string | number;
|
|
45
|
+
marginLeft?: string | number;
|
|
46
|
+
marginX?: string | number;
|
|
47
|
+
marginY?: string | number;
|
|
48
|
+
background?: string;
|
|
49
|
+
backgroundColor?: string;
|
|
50
|
+
backgroundImage?: string;
|
|
51
|
+
backgroundGradient?: string;
|
|
52
|
+
textAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
53
|
+
id?: string;
|
|
54
|
+
role?: string;
|
|
55
|
+
'aria-label'?: string;
|
|
56
|
+
'aria-labelledby'?: string;
|
|
57
|
+
'aria-describedby'?: string;
|
|
58
|
+
'data-testid'?: string;
|
|
59
|
+
onClick?: MouseEventHandler<any>;
|
|
60
|
+
onMouseEnter?: MouseEventHandler<any>;
|
|
61
|
+
onMouseLeave?: MouseEventHandler<any>;
|
|
62
|
+
onFocus?: FocusEventHandler<any>;
|
|
63
|
+
onBlur?: FocusEventHandler<any>;
|
|
64
|
+
}
|
|
65
|
+
export default ViewSchema;
|
|
66
|
+
//# sourceMappingURL=ViewSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewSchema.d.ts","sourceRoot":"","s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E,iBAAiB,CAAC,GAAG,CAAC,CAAC;CACjC;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schemas Module - Declarative Model schema definitions and Component Serialization System
|
|
3
|
+
*
|
|
4
|
+
* Exports all Model classes and their type-safe props using the new
|
|
5
|
+
* declarative pattern with @Schema, @Field, and @Editor decorators.
|
|
6
|
+
*
|
|
7
|
+
* Also exports the new Component Serialization System for "WebView for React" functionality.
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
export type { Serializable, SerializableConstructor } from './types/Serializable';
|
|
12
|
+
export { ComponentTransformer } from './transformers/ComponentTransformer';
|
|
13
|
+
import './transformers/registry';
|
|
14
|
+
export * from './ActionSchema';
|
|
15
|
+
export * from './ArticleSchema';
|
|
16
|
+
export * from './CardListGridSchema';
|
|
17
|
+
export * from './ChoiceInputFieldSchema';
|
|
18
|
+
export * from './CodeSchema';
|
|
19
|
+
export * from './ContentSchema';
|
|
20
|
+
export * from './CoverImageHeaderSchema';
|
|
21
|
+
export * from './FeatureCardSchema';
|
|
22
|
+
export * from './FeatureGridSchema';
|
|
23
|
+
export * from './FeatureItemSchema';
|
|
24
|
+
export * from './FooterItemSchema';
|
|
25
|
+
export * from './FormBlockSchema';
|
|
26
|
+
export * from './FooterSchema';
|
|
27
|
+
export * from './FooterSectionSchema';
|
|
28
|
+
export * from './GridCellSchema';
|
|
29
|
+
export * from './GridLayoutSchema';
|
|
30
|
+
export * from './HeaderActionSchema';
|
|
31
|
+
export * from './HeroBlockSchema';
|
|
32
|
+
export * from './HtmlSchema';
|
|
33
|
+
export * from './ImageSchema';
|
|
34
|
+
export * from './MarkdownSchema';
|
|
35
|
+
export * from './MetadataItemSchema';
|
|
36
|
+
export * from './PageBannerHeaderSchema';
|
|
37
|
+
export * from './PaletteSwitcherSchema';
|
|
38
|
+
export * from './ProductCardSchema';
|
|
39
|
+
export * from './SafeSpanSchema';
|
|
40
|
+
export * from './SectionSchema';
|
|
41
|
+
export * from './TextInputFieldSchema';
|
|
42
|
+
export * from './TextSchema';
|
|
43
|
+
export * from './ThemeSwitcherSchema';
|
|
44
|
+
export * from './ViewSchema';
|
|
45
|
+
export * from './PrintConfigSchema';
|
|
46
|
+
export * from './PageTemplateSchema';
|
|
47
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,YAAY,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,OAAO,yBAAyB,CAAC;AAGjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AAGtC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ComponentTransformer - Core component serialization and HTML pattern transformation system
|
|
3
|
+
*
|
|
4
|
+
* Enables "WebView for React" functionality by providing serialization
|
|
5
|
+
* and deserialization of React components to/from JSON structures.
|
|
6
|
+
* Also supports HTML pattern-based transformations where components can
|
|
7
|
+
* register HTML patterns they can handle.
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
import { ReactNode } from 'react';
|
|
12
|
+
import { SerializableConstructor } from '../types/Serializable';
|
|
13
|
+
/**
|
|
14
|
+
* Type for HTML pattern transformation handlers
|
|
15
|
+
*/
|
|
16
|
+
export type PatternHandler = (element: Element) => any;
|
|
17
|
+
/**
|
|
18
|
+
* Core transformer for React component serialization
|
|
19
|
+
* Provides static methods for component registration and transformation
|
|
20
|
+
*/
|
|
21
|
+
export declare class ComponentTransformer {
|
|
22
|
+
/**
|
|
23
|
+
* Enable or disable strict mode
|
|
24
|
+
* @param enabled - Whether to enable strict mode (throws on unregistered components)
|
|
25
|
+
*/
|
|
26
|
+
static setStrictMode(enabled: boolean): void;
|
|
27
|
+
/**
|
|
28
|
+
* Check if strict mode is enabled
|
|
29
|
+
* @returns True if strict mode is enabled
|
|
30
|
+
*/
|
|
31
|
+
static isStrictMode(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Register a component class for serialization
|
|
34
|
+
* Component must declare its own tagName and version via static properties
|
|
35
|
+
* @param componentClass - Component class that implements Serializable interface
|
|
36
|
+
*/
|
|
37
|
+
static registerComponent(componentClass: SerializableConstructor): void;
|
|
38
|
+
/**
|
|
39
|
+
* Serialize React node(s) to JSON string
|
|
40
|
+
* In strict mode: throws on unregistered components
|
|
41
|
+
* In legacy mode: uses fallback tag for unregistered components/html/text
|
|
42
|
+
*/
|
|
43
|
+
static serialize(node: ReactNode | ReactNode[]): string;
|
|
44
|
+
/**
|
|
45
|
+
* Deserialize JSON input to React node(s)
|
|
46
|
+
* In strict mode: throws on unregistered components
|
|
47
|
+
* In legacy mode: never throws; always returns a valid ReactNode (or array) or null
|
|
48
|
+
* - Strings: try JSON.parse; if fails, return the string as a text node
|
|
49
|
+
* - Objects/arrays: only schema objects are transformed; non-schema become text via JSON.stringify
|
|
50
|
+
*/
|
|
51
|
+
static deserialize(input: string | object | object[]): ReactNode | ReactNode[];
|
|
52
|
+
/**
|
|
53
|
+
* Type guard for serialized component schema objects
|
|
54
|
+
* Requires: { tagName: string; version: string; data: any }
|
|
55
|
+
* Optional: key?: string
|
|
56
|
+
*/
|
|
57
|
+
private static isSerializedComponent;
|
|
58
|
+
/**
|
|
59
|
+
* Internal method to deserialize data back to React nodes
|
|
60
|
+
* @param data - Data to deserialize
|
|
61
|
+
* @returns React node(s)
|
|
62
|
+
*/
|
|
63
|
+
private static deserializeData;
|
|
64
|
+
/**
|
|
65
|
+
* Internal method to serialize a single React node
|
|
66
|
+
* @param node - React node to serialize
|
|
67
|
+
* @returns Serializable data structure { tagName, version, data }
|
|
68
|
+
*/
|
|
69
|
+
private static serializeNode;
|
|
70
|
+
/**
|
|
71
|
+
* Deserialize unregistered nodes using ReactNodeTransformer
|
|
72
|
+
* @param data - Serialized data from ReactNodeTransformer
|
|
73
|
+
* @returns React node
|
|
74
|
+
*/
|
|
75
|
+
private static deserializeUnregisteredComponent;
|
|
76
|
+
/**
|
|
77
|
+
* Find the tag name for a given component constructor
|
|
78
|
+
* @param componentType - Component constructor function
|
|
79
|
+
* @returns Tag name or null if not found
|
|
80
|
+
*/
|
|
81
|
+
private static findTagNameForComponent;
|
|
82
|
+
/**
|
|
83
|
+
* Get list of registered component tags (for debugging/testing)
|
|
84
|
+
* @returns Array of registered tag names
|
|
85
|
+
*/
|
|
86
|
+
static getRegisteredComponents(): string[];
|
|
87
|
+
/**
|
|
88
|
+
* Clear all registered components (for testing)
|
|
89
|
+
*/
|
|
90
|
+
static clearRegistry(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Register an HTML pattern handler
|
|
93
|
+
* @param pattern - CSS selector pattern (e.g., 'pre code', 'section.blog-section')
|
|
94
|
+
* @param handler - Function to transform matching elements to component data
|
|
95
|
+
*/
|
|
96
|
+
static registerPattern(pattern: string, handler: PatternHandler): void;
|
|
97
|
+
/**
|
|
98
|
+
* Check if a pattern is registered
|
|
99
|
+
* @param pattern - CSS selector pattern to check
|
|
100
|
+
* @returns True if pattern is registered
|
|
101
|
+
*/
|
|
102
|
+
static hasPattern(pattern: string): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Transform an HTML element to React component if a matching pattern exists
|
|
105
|
+
* @param element - DOM Element to transform
|
|
106
|
+
* @returns React node if pattern matches, null otherwise
|
|
107
|
+
*/
|
|
108
|
+
static transformHTMLElement(element: Element): ReactNode | null;
|
|
109
|
+
/**
|
|
110
|
+
* Transform HTML string to React nodes using registered patterns
|
|
111
|
+
* @param html - HTML string to transform
|
|
112
|
+
* @returns Array of React nodes
|
|
113
|
+
*/
|
|
114
|
+
static transformHTML(html: string): ReactNode[];
|
|
115
|
+
/**
|
|
116
|
+
* Recursively transform an element and its children
|
|
117
|
+
* @param element - DOM Element to transform
|
|
118
|
+
* @param key - React key for the element
|
|
119
|
+
* @returns React node
|
|
120
|
+
*/
|
|
121
|
+
private static transformElement;
|
|
122
|
+
/**
|
|
123
|
+
* Get list of registered patterns (for debugging/testing)
|
|
124
|
+
* @returns Array of registered patterns
|
|
125
|
+
*/
|
|
126
|
+
static getRegisteredPatterns(): string[];
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=ComponentTransformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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AOtE;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAI3C;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI;IAe/D;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE;IAS/C;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAsC/B;;;OAGG;IACH,MAAM,CAAC,qBAAqB,IAAI,MAAM,EAAE;CAGzC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ReactNodeTransformer - Fallback transformer for standard React content
|
|
3
|
+
*
|
|
4
|
+
* Provides serialization/deserialization for unregistered React components,
|
|
5
|
+
* HTML elements, and other React content that doesn't implement the
|
|
6
|
+
* Serializable interface.
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
9
|
+
*/
|
|
10
|
+
import { ReactNode } from 'react';
|
|
11
|
+
/**
|
|
12
|
+
* Transformer for standard React content and HTML elements
|
|
13
|
+
* Used as fallback when components are not registered in ComponentTransformer
|
|
14
|
+
*/
|
|
15
|
+
export declare class ReactNodeTransformer {
|
|
16
|
+
/**
|
|
17
|
+
* Serialize a React node to JSON-compatible structure
|
|
18
|
+
* @param node - React node to serialize
|
|
19
|
+
* @returns Serializable data structure
|
|
20
|
+
*/
|
|
21
|
+
static serialize(node: ReactNode): any;
|
|
22
|
+
/**
|
|
23
|
+
* Deserialize data back to React node
|
|
24
|
+
* @param data - Data to deserialize
|
|
25
|
+
* @returns React node
|
|
26
|
+
*/
|
|
27
|
+
static deserialize(data: any): ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Serialize props object, handling nested React nodes
|
|
30
|
+
* @param props - Props object to serialize
|
|
31
|
+
* @returns Serialized props
|
|
32
|
+
*/
|
|
33
|
+
private static serializeProps;
|
|
34
|
+
/**
|
|
35
|
+
* Deserialize React element data back to React element
|
|
36
|
+
* @param data - Serialized React element data
|
|
37
|
+
* @returns React element or fallback content
|
|
38
|
+
*/
|
|
39
|
+
private static deserializeReactElement;
|
|
40
|
+
/**
|
|
41
|
+
* Deserialize props object, handling nested React nodes
|
|
42
|
+
* @param props - Serialized props object
|
|
43
|
+
* @returns Deserialized props
|
|
44
|
+
*/
|
|
45
|
+
private static deserializeProps;
|
|
46
|
+
/**
|
|
47
|
+
* Extract text content from props for fallback rendering
|
|
48
|
+
* @param props - Props object
|
|
49
|
+
* @returns Text content or null
|
|
50
|
+
*/
|
|
51
|
+
private static extractTextContent;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=ReactNodeTransformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactNodeTransformer.d.ts","sourceRoot":"","sources":["../../../../src/schemas/transformers/ReactNodeTransformer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAgB,SAAS,EAAiC,MAAM,OAAO,CAAC;AAG/E;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,GAAG;IAqEtC;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,SAAS;IA2CxC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAqB7B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAkBtC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAkB/B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAqBlC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component Registration - Central registry for serializable components
|
|
3
|
+
*
|
|
4
|
+
* This file registers all components that implement the Serializable interface
|
|
5
|
+
* with the ComponentTransformer system. Components must be registered here
|
|
6
|
+
* to support JSON serialization/deserialization functionality.
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Register all serializable components with the ComponentTransformer
|
|
12
|
+
* This function should be called once during application initialization
|
|
13
|
+
*
|
|
14
|
+
* Phase 0: Foundation in place - ready for component migration
|
|
15
|
+
* Phase 1+: Components will be migrated to createSerializableView factory
|
|
16
|
+
*/
|
|
17
|
+
export declare function registerSerializableComponents(): void;
|
|
18
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/schemas/transformers/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmBH;;;;;;GAMG;AACH,wBAAgB,8BAA8B,IAAI,IAAI,CAsCrD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serializable Interface - Component Serialization System Foundation
|
|
3
|
+
*
|
|
4
|
+
* Defines the contract for components that can be serialized to/from JSON
|
|
5
|
+
* for "WebView for React" functionality.
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
8
|
+
*/
|
|
9
|
+
import { ReactElement } from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* Interface for components that support JSON serialization
|
|
12
|
+
* Components implementing this interface can be transformed between
|
|
13
|
+
* React elements and serializable JSON data structures
|
|
14
|
+
*/
|
|
15
|
+
export interface Serializable {
|
|
16
|
+
/**
|
|
17
|
+
* Convert component instance to JSON data
|
|
18
|
+
* @returns Serializable data structure
|
|
19
|
+
*/
|
|
20
|
+
toJson(): any;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Interface for serializable component constructor
|
|
24
|
+
* Defines static methods and properties required for component classes
|
|
25
|
+
* Components implementing this interface must declare their own identity
|
|
26
|
+
*/
|
|
27
|
+
export interface SerializableConstructor {
|
|
28
|
+
/**
|
|
29
|
+
* Component's unique tag name for serialization
|
|
30
|
+
* Must be unique across all registered components
|
|
31
|
+
*/
|
|
32
|
+
readonly tagName: string;
|
|
33
|
+
/**
|
|
34
|
+
* Component's version for serialization format compatibility
|
|
35
|
+
* Should follow semantic versioning (e.g., "1.0.0")
|
|
36
|
+
*/
|
|
37
|
+
readonly version: string;
|
|
38
|
+
/**
|
|
39
|
+
* Convert JSON data to a React element
|
|
40
|
+
* @param jsonData - Serialized component data
|
|
41
|
+
* @returns React element representing the component
|
|
42
|
+
*/
|
|
43
|
+
fromJson(jsonData: any): ReactElement;
|
|
44
|
+
new (...args: any[]): Serializable;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=Serializable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Serializable.d.ts","sourceRoot":"","sources":["../../../../src/schemas/types/Serializable.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,MAAM,IAAI,GAAG,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,GAAG,GAAG,YAAY,CAAC;IAEtC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,YAAY,CAAC;CACpC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SerializationTemplate - Reusable template for component serialization demos
|
|
3
|
+
*
|
|
4
|
+
* Creates standardized serialization stories that demonstrate:
|
|
5
|
+
* - Component serialization to JSON
|
|
6
|
+
* - JSON deserialization back to component
|
|
7
|
+
* - Round-trip validation
|
|
8
|
+
* - JSON structure visualization
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { makeSerializationStory } from '../_templates/SerializationTemplate';
|
|
13
|
+
*
|
|
14
|
+
* export const SerializationDemo = makeSerializationStory(() => (
|
|
15
|
+
* <Button variant="primary" label="Click Me" />
|
|
16
|
+
* ));
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
20
|
+
*/
|
|
21
|
+
import React from 'react';
|
|
22
|
+
/**
|
|
23
|
+
* Creates a serialization demo story for any React element
|
|
24
|
+
*
|
|
25
|
+
* @param makeElement - Function that returns the React element to serialize
|
|
26
|
+
* @returns Story component that demonstrates serialization round-trip
|
|
27
|
+
*/
|
|
28
|
+
export declare const makeSerializationStory: (makeElement: () => React.ReactElement) => () => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* Creates a batch serialization demo for multiple elements
|
|
31
|
+
*
|
|
32
|
+
* @param makeElements - Function that returns array of React elements to serialize
|
|
33
|
+
* @returns Story component that demonstrates batch serialization
|
|
34
|
+
*/
|
|
35
|
+
export declare const makeBatchSerializationStory: (makeElements: () => React.ReactElement[]) => () => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* Creates a complex serialization demo with nested components
|
|
38
|
+
*
|
|
39
|
+
* @param makeComplexElement - Function that returns a complex nested React element
|
|
40
|
+
* @returns Story component that demonstrates nested component serialization
|
|
41
|
+
*/
|
|
42
|
+
export declare const makeComplexSerializationStory: (makeComplexElement: () => React.ReactElement) => () => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export default makeSerializationStory;
|
|
44
|
+
//# sourceMappingURL=SerializationTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SerializationTemplate.d.ts","sourceRoot":"","sources":["../../../../src/stories/_templates/SerializationTemplate.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,aAAa,MAAM,KAAK,CAAC,YAAY,kDAyE3E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GAAI,cAAc,MAAM,KAAK,CAAC,YAAY,EAAE,kDAsBnF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GAAI,oBAAoB,MAAM,KAAK,CAAC,YAAY,kDAezF,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DataResponse, Model, SelectOptions } from '@qwickapps/schema';
|
|
2
|
+
import { ITemplateResolver, TemplateResolverConfig } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* ContentResolver - Combines data, template, and cache providers
|
|
5
|
+
*
|
|
6
|
+
* This class follows the orchestrator pattern:
|
|
7
|
+
* - Delegates data fetching to IDataProvider
|
|
8
|
+
* - Delegates template resolution to ITemplateResolver
|
|
9
|
+
* - Optionally wraps data provider with ICacheProvider
|
|
10
|
+
* - Creates ContentProxy objects for framework compatibility
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const resolver = new ContentResolver({
|
|
15
|
+
* dataProvider: new JsonDataProvider({ data: {...} }),
|
|
16
|
+
* templateResolver: new MustacheTemplateResolver(),
|
|
17
|
+
* cacheProvider: new MemoryCacheProvider({ maxSize: 50, defaultTtl: 60000 })
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* // Or with boolean cacheProvider (uses default MemoryCacheProvider)
|
|
21
|
+
* const resolver = new ContentResolver({
|
|
22
|
+
* dataProvider: new JsonDataProvider({ data: {...} }),
|
|
23
|
+
* cacheProvider: true
|
|
24
|
+
* });
|
|
25
|
+
*
|
|
26
|
+
* // Or no caching
|
|
27
|
+
* const resolver = new ContentResolver({
|
|
28
|
+
* dataProvider: new JsonDataProvider({ data: {...} }),
|
|
29
|
+
* cacheProvider: false // or omit entirely
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare class TemplateResolver implements ITemplateResolver {
|
|
34
|
+
private dataProvider;
|
|
35
|
+
private templateResolver;
|
|
36
|
+
private cacheProvider?;
|
|
37
|
+
private enableLogging;
|
|
38
|
+
private log;
|
|
39
|
+
constructor(config: TemplateResolverConfig);
|
|
40
|
+
get<T extends Model>(slug: string): Promise<DataResponse<T>>;
|
|
41
|
+
select<T extends Model>(schema: string, options?: SelectOptions): Promise<DataResponse<T[]>>;
|
|
42
|
+
/**
|
|
43
|
+
* Resolve template with lazy context loading
|
|
44
|
+
*/
|
|
45
|
+
resolveTemplate(template: string): Promise<string>;
|
|
46
|
+
/**
|
|
47
|
+
* Create lazy loading context for template resolution
|
|
48
|
+
* Only fetches data when accessed by mustache template
|
|
49
|
+
*/
|
|
50
|
+
private createLazyContext;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=TemplateResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TemplateResolver.d.ts","sourceRoot":"","sources":["../../../src/templates/TemplateResolver.ts"],"names":[],"mappings":"AAOA,OAAO,EAAsB,YAAY,EAAsD,KAAK,EAA4B,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACzK,OAAO,EAEL,iBAAiB,EAEjB,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,gBAAiB,YAAW,iBAAiB;IACxD,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,aAAa,CAAC,CAAwB;IAC9C,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,GAAG,CAAS;gBAER,MAAM,EAAE,sBAAsB;IAwBpC,GAAG,CAAC,CAAC,SAAS,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAI5D,MAAM,CAAC,CAAC,SAAS,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC;IAIlG;;OAEG;IACG,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAG,MAAM,CAAE;IAsB3D;;;OAGG;YACW,iBAAiB;CAsChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure cache provider interface - Single Responsibility: Caching only
|
|
3
|
+
*/
|
|
4
|
+
export interface ICacheProvider<T> {
|
|
5
|
+
/** Get cached value by key */
|
|
6
|
+
get(key: string): T | null;
|
|
7
|
+
/** Set cached value with optional TTL */
|
|
8
|
+
set(key: string, value: T, ttl?: number): void;
|
|
9
|
+
/** Clear cache entry or all entries */
|
|
10
|
+
clear(key?: string): void;
|
|
11
|
+
/** Get cache statistics */
|
|
12
|
+
getStats?(): {
|
|
13
|
+
size: number;
|
|
14
|
+
maxSize: number;
|
|
15
|
+
keys: string[];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=CacheProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CacheProvider.d.ts","sourceRoot":"","sources":["../../../src/types/CacheProvider.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,8BAA8B;IAC9B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC;IAC3B,yCAAyC;IACzC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/C,uCAAuC;IACvC,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,2BAA2B;IAC3B,QAAQ,CAAC,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAC;KAAE,CAAC;CACjE"}
|