@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,570 @@
|
|
|
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
|
+
|
|
15
|
+
import { Editor, Field, FieldType, Model, Schema } from '@qwickapps/schema';
|
|
16
|
+
import { IsIn, IsInt, IsOptional, IsString, Min, ValidateIf } from 'class-validator';
|
|
17
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
18
|
+
import 'reflect-metadata';
|
|
19
|
+
import type { FocusEventHandler, MouseEventHandler } from 'react';
|
|
20
|
+
|
|
21
|
+
@Schema('ViewSchema', '1.0.0')
|
|
22
|
+
export class ViewSchema extends Model {
|
|
23
|
+
|
|
24
|
+
// ========================================
|
|
25
|
+
// GRID LAYOUT PROPS
|
|
26
|
+
// ========================================
|
|
27
|
+
|
|
28
|
+
@Field()
|
|
29
|
+
@Editor({
|
|
30
|
+
field_type: FieldType.TEXT,
|
|
31
|
+
label: 'Grid Span',
|
|
32
|
+
description: 'Column span for grid layouts (number, auto, or grow)'
|
|
33
|
+
})
|
|
34
|
+
@IsOptional()
|
|
35
|
+
@ValidateIf((_, v) => typeof v === 'string')
|
|
36
|
+
@IsIn(['auto', 'grow'])
|
|
37
|
+
@ValidateIf((_, v) => typeof v === 'number')
|
|
38
|
+
@IsInt()
|
|
39
|
+
@Min(1)
|
|
40
|
+
span?: number | 'auto' | 'grow';
|
|
41
|
+
|
|
42
|
+
@Field()
|
|
43
|
+
@Editor({
|
|
44
|
+
field_type: FieldType.TEXT,
|
|
45
|
+
label: 'Extra Small Breakpoint (xs)',
|
|
46
|
+
description: 'Column span for extra small screens'
|
|
47
|
+
})
|
|
48
|
+
@IsOptional()
|
|
49
|
+
@ValidateIf((_, v) => typeof v === 'string')
|
|
50
|
+
@IsIn(['auto'])
|
|
51
|
+
@ValidateIf((_, v) => typeof v === 'number')
|
|
52
|
+
@IsInt()
|
|
53
|
+
@Min(1)
|
|
54
|
+
xs?: number | 'auto';
|
|
55
|
+
|
|
56
|
+
@Field()
|
|
57
|
+
@Editor({
|
|
58
|
+
field_type: FieldType.SELECT,
|
|
59
|
+
label: 'Small Breakpoint (sm)',
|
|
60
|
+
description: 'Column span for small screens'
|
|
61
|
+
})
|
|
62
|
+
@IsOptional()
|
|
63
|
+
@ValidateIf((_, v) => typeof v === 'string')
|
|
64
|
+
@IsIn(['auto'])
|
|
65
|
+
@ValidateIf((_, v) => typeof v === 'number')
|
|
66
|
+
@IsInt()
|
|
67
|
+
@Min(1)
|
|
68
|
+
sm?: number | 'auto';
|
|
69
|
+
|
|
70
|
+
@Field()
|
|
71
|
+
@Editor({
|
|
72
|
+
field_type: FieldType.SELECT,
|
|
73
|
+
label: 'Medium Breakpoint (md)',
|
|
74
|
+
description: 'Column span for medium screens'
|
|
75
|
+
})
|
|
76
|
+
@IsOptional()
|
|
77
|
+
@ValidateIf((_, v) => typeof v === 'string')
|
|
78
|
+
@IsIn(['auto'])
|
|
79
|
+
@ValidateIf((_, v) => typeof v === 'number')
|
|
80
|
+
@IsInt()
|
|
81
|
+
@Min(1)
|
|
82
|
+
md?: number | 'auto';
|
|
83
|
+
|
|
84
|
+
@Field()
|
|
85
|
+
@Editor({
|
|
86
|
+
field_type: FieldType.SELECT,
|
|
87
|
+
label: 'Large Breakpoint (lg)',
|
|
88
|
+
description: 'Column span for large screens'
|
|
89
|
+
})
|
|
90
|
+
@IsOptional()
|
|
91
|
+
@ValidateIf((_, v) => typeof v === 'string')
|
|
92
|
+
@IsIn(['auto'])
|
|
93
|
+
@ValidateIf((_, v) => typeof v === 'number')
|
|
94
|
+
@IsInt()
|
|
95
|
+
@Min(1)
|
|
96
|
+
lg?: number | 'auto';
|
|
97
|
+
|
|
98
|
+
@Field()
|
|
99
|
+
@Editor({
|
|
100
|
+
field_type: FieldType.SELECT,
|
|
101
|
+
label: 'Extra Large Breakpoint (xl)',
|
|
102
|
+
description: 'Column span for extra large screens'
|
|
103
|
+
})
|
|
104
|
+
@IsOptional()
|
|
105
|
+
@ValidateIf((_, v) => typeof v === 'string')
|
|
106
|
+
@IsIn(['auto'])
|
|
107
|
+
@ValidateIf((_, v) => typeof v === 'number')
|
|
108
|
+
@IsInt()
|
|
109
|
+
@Min(1)
|
|
110
|
+
xl?: number | 'auto';
|
|
111
|
+
|
|
112
|
+
// ========================================
|
|
113
|
+
// STYLING PROPS
|
|
114
|
+
// ========================================
|
|
115
|
+
|
|
116
|
+
@Field()
|
|
117
|
+
@Editor({
|
|
118
|
+
field_type: FieldType.TEXT,
|
|
119
|
+
label: 'CSS Class Name',
|
|
120
|
+
description: 'Additional CSS class name for custom styling',
|
|
121
|
+
placeholder: 'custom-class-name'
|
|
122
|
+
})
|
|
123
|
+
@IsOptional()
|
|
124
|
+
@IsString()
|
|
125
|
+
className?: string;
|
|
126
|
+
|
|
127
|
+
@Field()
|
|
128
|
+
@Editor({
|
|
129
|
+
field_type: FieldType.TEXTAREA,
|
|
130
|
+
label: 'MUI SX Props',
|
|
131
|
+
description: 'MUI sx prop as JSON string for advanced styling',
|
|
132
|
+
placeholder: '{"color": "primary.main", "fontWeight": "bold"}'
|
|
133
|
+
})
|
|
134
|
+
@IsOptional()
|
|
135
|
+
@IsString()
|
|
136
|
+
sx?: SxProps<Theme>;
|
|
137
|
+
|
|
138
|
+
@Field()
|
|
139
|
+
@Editor({
|
|
140
|
+
field_type: FieldType.TEXTAREA,
|
|
141
|
+
label: 'Inline Styles',
|
|
142
|
+
description: 'Inline CSS styles as JSON string',
|
|
143
|
+
placeholder: '{"color": "red", "margin": "10px"}'
|
|
144
|
+
})
|
|
145
|
+
@IsOptional()
|
|
146
|
+
@IsString()
|
|
147
|
+
style?: React.CSSProperties;
|
|
148
|
+
|
|
149
|
+
// ========================================
|
|
150
|
+
// DIMENSION PROPS
|
|
151
|
+
// ========================================
|
|
152
|
+
|
|
153
|
+
@Field()
|
|
154
|
+
@Editor({
|
|
155
|
+
field_type: FieldType.TEXT,
|
|
156
|
+
label: 'Width',
|
|
157
|
+
description: 'Component width (t-shirt sizes, breakpoints, CSS values, or numbers)',
|
|
158
|
+
placeholder: 'medium, 300px, 50%, auto, grow'
|
|
159
|
+
})
|
|
160
|
+
@IsOptional()
|
|
161
|
+
@IsString()
|
|
162
|
+
width?: string | number;
|
|
163
|
+
|
|
164
|
+
@Field()
|
|
165
|
+
@Editor({
|
|
166
|
+
field_type: FieldType.TEXT,
|
|
167
|
+
label: 'Height',
|
|
168
|
+
description: 'Component height (t-shirt sizes, CSS values, or numbers)',
|
|
169
|
+
placeholder: 'medium, 200px, 50vh, auto'
|
|
170
|
+
})
|
|
171
|
+
@IsOptional()
|
|
172
|
+
@IsString()
|
|
173
|
+
height?: string | number;;
|
|
174
|
+
|
|
175
|
+
@Field()
|
|
176
|
+
@Editor({
|
|
177
|
+
field_type: FieldType.TEXT,
|
|
178
|
+
label: 'Minimum Width',
|
|
179
|
+
description: 'Minimum width constraint',
|
|
180
|
+
placeholder: 'small, 100px, auto'
|
|
181
|
+
})
|
|
182
|
+
@IsOptional()
|
|
183
|
+
@IsString()
|
|
184
|
+
minWidth?: string | number;
|
|
185
|
+
|
|
186
|
+
@Field()
|
|
187
|
+
@Editor({
|
|
188
|
+
field_type: FieldType.TEXT,
|
|
189
|
+
label: 'Minimum Height',
|
|
190
|
+
description: 'Minimum height constraint',
|
|
191
|
+
placeholder: 'small, 100px, auto'
|
|
192
|
+
})
|
|
193
|
+
@IsOptional()
|
|
194
|
+
@IsString()
|
|
195
|
+
minHeight?: string | number;
|
|
196
|
+
|
|
197
|
+
@Field()
|
|
198
|
+
@Editor({
|
|
199
|
+
field_type: FieldType.TEXT,
|
|
200
|
+
label: 'Maximum Width',
|
|
201
|
+
description: 'Maximum width constraint',
|
|
202
|
+
placeholder: 'large, lg, 1200px'
|
|
203
|
+
})
|
|
204
|
+
@IsOptional()
|
|
205
|
+
@IsString()
|
|
206
|
+
maxWidth?: string | number;
|
|
207
|
+
|
|
208
|
+
@Field()
|
|
209
|
+
@Editor({
|
|
210
|
+
field_type: FieldType.TEXT,
|
|
211
|
+
label: 'Maximum Height',
|
|
212
|
+
description: 'Maximum height constraint',
|
|
213
|
+
placeholder: 'large, 500px, 80vh'
|
|
214
|
+
})
|
|
215
|
+
@IsOptional()
|
|
216
|
+
@IsString()
|
|
217
|
+
maxHeight?: string | number;
|
|
218
|
+
|
|
219
|
+
// ========================================
|
|
220
|
+
// SPACING PROPS
|
|
221
|
+
// ========================================
|
|
222
|
+
|
|
223
|
+
@Field()
|
|
224
|
+
@Editor({
|
|
225
|
+
field_type: FieldType.SELECT,
|
|
226
|
+
label: 'Padding',
|
|
227
|
+
description: 'Internal spacing for all sides'
|
|
228
|
+
})
|
|
229
|
+
@IsOptional()
|
|
230
|
+
@IsString()
|
|
231
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
232
|
+
padding?: string | number;
|
|
233
|
+
|
|
234
|
+
@Field()
|
|
235
|
+
@Editor({
|
|
236
|
+
field_type: FieldType.SELECT,
|
|
237
|
+
label: 'Padding Top',
|
|
238
|
+
description: 'Internal spacing for top side'
|
|
239
|
+
})
|
|
240
|
+
@IsOptional()
|
|
241
|
+
@IsString()
|
|
242
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
243
|
+
paddingTop?: string | number;
|
|
244
|
+
|
|
245
|
+
@Field()
|
|
246
|
+
@Editor({
|
|
247
|
+
field_type: FieldType.SELECT,
|
|
248
|
+
label: 'Padding Right',
|
|
249
|
+
description: 'Internal spacing for right side'
|
|
250
|
+
})
|
|
251
|
+
@IsOptional()
|
|
252
|
+
@IsString()
|
|
253
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
254
|
+
paddingRight?: string | number;
|
|
255
|
+
|
|
256
|
+
@Field()
|
|
257
|
+
@Editor({
|
|
258
|
+
field_type: FieldType.SELECT,
|
|
259
|
+
label: 'Padding Bottom',
|
|
260
|
+
description: 'Internal spacing for bottom side'
|
|
261
|
+
})
|
|
262
|
+
@IsOptional()
|
|
263
|
+
@IsString()
|
|
264
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
265
|
+
paddingBottom?: string | number;
|
|
266
|
+
|
|
267
|
+
@Field()
|
|
268
|
+
@Editor({
|
|
269
|
+
field_type: FieldType.SELECT,
|
|
270
|
+
label: 'Padding Left',
|
|
271
|
+
description: 'Internal spacing for left side'
|
|
272
|
+
})
|
|
273
|
+
@IsOptional()
|
|
274
|
+
@IsString()
|
|
275
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
276
|
+
paddingLeft?: string | number;
|
|
277
|
+
|
|
278
|
+
@Field()
|
|
279
|
+
@Editor({
|
|
280
|
+
field_type: FieldType.SELECT,
|
|
281
|
+
label: 'Padding Horizontal (X)',
|
|
282
|
+
description: 'Internal spacing for left and right sides'
|
|
283
|
+
})
|
|
284
|
+
@IsOptional()
|
|
285
|
+
@IsString()
|
|
286
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
287
|
+
paddingX?: string | number;
|
|
288
|
+
|
|
289
|
+
@Field()
|
|
290
|
+
@Editor({
|
|
291
|
+
field_type: FieldType.SELECT,
|
|
292
|
+
label: 'Padding Vertical (Y)',
|
|
293
|
+
description: 'Internal spacing for top and bottom sides'
|
|
294
|
+
})
|
|
295
|
+
@IsOptional()
|
|
296
|
+
@IsString()
|
|
297
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
298
|
+
paddingY?: string | number;
|
|
299
|
+
|
|
300
|
+
@Field()
|
|
301
|
+
@Editor({
|
|
302
|
+
field_type: FieldType.SELECT,
|
|
303
|
+
label: 'Margin',
|
|
304
|
+
description: 'External spacing for all sides'
|
|
305
|
+
})
|
|
306
|
+
@IsOptional()
|
|
307
|
+
@IsString()
|
|
308
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
309
|
+
margin?: string | number;
|
|
310
|
+
|
|
311
|
+
@Field()
|
|
312
|
+
@Editor({
|
|
313
|
+
field_type: FieldType.SELECT,
|
|
314
|
+
label: 'Margin Top',
|
|
315
|
+
description: 'External spacing for top side'
|
|
316
|
+
})
|
|
317
|
+
@IsOptional()
|
|
318
|
+
@IsString()
|
|
319
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
320
|
+
marginTop?: string | number;
|
|
321
|
+
|
|
322
|
+
@Field()
|
|
323
|
+
@Editor({
|
|
324
|
+
field_type: FieldType.SELECT,
|
|
325
|
+
label: 'Margin Right',
|
|
326
|
+
description: 'External spacing for right side'
|
|
327
|
+
})
|
|
328
|
+
@IsOptional()
|
|
329
|
+
@IsString()
|
|
330
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
331
|
+
marginRight?: string | number;
|
|
332
|
+
|
|
333
|
+
@Field()
|
|
334
|
+
@Editor({
|
|
335
|
+
field_type: FieldType.SELECT,
|
|
336
|
+
label: 'Margin Bottom',
|
|
337
|
+
description: 'External spacing for bottom side'
|
|
338
|
+
})
|
|
339
|
+
@IsOptional()
|
|
340
|
+
@IsString()
|
|
341
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
342
|
+
marginBottom?: string | number;
|
|
343
|
+
|
|
344
|
+
@Field()
|
|
345
|
+
@Editor({
|
|
346
|
+
field_type: FieldType.SELECT,
|
|
347
|
+
label: 'Margin Left',
|
|
348
|
+
description: 'External spacing for left side'
|
|
349
|
+
})
|
|
350
|
+
@IsOptional()
|
|
351
|
+
@IsString()
|
|
352
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
353
|
+
marginLeft?: string | number;
|
|
354
|
+
|
|
355
|
+
@Field()
|
|
356
|
+
@Editor({
|
|
357
|
+
field_type: FieldType.SELECT,
|
|
358
|
+
label: 'Margin Horizontal (X)',
|
|
359
|
+
description: 'External spacing for left and right sides'
|
|
360
|
+
})
|
|
361
|
+
@IsOptional()
|
|
362
|
+
@IsString()
|
|
363
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
364
|
+
marginX?: string | number;
|
|
365
|
+
|
|
366
|
+
@Field()
|
|
367
|
+
@Editor({
|
|
368
|
+
field_type: FieldType.SELECT,
|
|
369
|
+
label: 'Margin Vertical (Y)',
|
|
370
|
+
description: 'External spacing for top and bottom sides'
|
|
371
|
+
})
|
|
372
|
+
@IsOptional()
|
|
373
|
+
@IsString()
|
|
374
|
+
@IsIn(['none', 'tiny', 'small', 'medium', 'large', 'huge'])
|
|
375
|
+
marginY?: string | number;
|
|
376
|
+
|
|
377
|
+
// ========================================
|
|
378
|
+
// BACKGROUND PROPS
|
|
379
|
+
// ========================================
|
|
380
|
+
|
|
381
|
+
@Field()
|
|
382
|
+
@Editor({
|
|
383
|
+
field_type: FieldType.TEXT,
|
|
384
|
+
label: 'Background',
|
|
385
|
+
description: 'Background fill (color, gradient, image CSS). Canonical name.',
|
|
386
|
+
placeholder: '#ffffff, primary.main, linear-gradient(...)'
|
|
387
|
+
})
|
|
388
|
+
@IsOptional()
|
|
389
|
+
@IsString()
|
|
390
|
+
background?: string;
|
|
391
|
+
|
|
392
|
+
@Field()
|
|
393
|
+
@Editor({
|
|
394
|
+
field_type: FieldType.TEXT,
|
|
395
|
+
label: 'Background Color (Deprecated)',
|
|
396
|
+
description: 'Use background instead. Kept for backward compatibility.',
|
|
397
|
+
placeholder: '#ffffff, primary.main'
|
|
398
|
+
})
|
|
399
|
+
@IsOptional()
|
|
400
|
+
@IsString()
|
|
401
|
+
backgroundColor?: string;
|
|
402
|
+
|
|
403
|
+
@Field()
|
|
404
|
+
@Editor({
|
|
405
|
+
field_type: FieldType.TEXT,
|
|
406
|
+
label: 'Background Image',
|
|
407
|
+
description: 'Background image URL',
|
|
408
|
+
placeholder: 'https://example.com/image.jpg'
|
|
409
|
+
})
|
|
410
|
+
@IsOptional()
|
|
411
|
+
@IsString()
|
|
412
|
+
backgroundImage?: string;
|
|
413
|
+
|
|
414
|
+
@Field()
|
|
415
|
+
@Editor({
|
|
416
|
+
field_type: FieldType.TEXT,
|
|
417
|
+
label: 'Background Gradient',
|
|
418
|
+
description: 'CSS gradient for background',
|
|
419
|
+
placeholder: 'linear-gradient(45deg, #ff6b6b, #4ecdc4)'
|
|
420
|
+
})
|
|
421
|
+
@IsOptional()
|
|
422
|
+
@IsString()
|
|
423
|
+
backgroundGradient?: string;
|
|
424
|
+
|
|
425
|
+
// ========================================
|
|
426
|
+
// TEXT ALIGNMENT
|
|
427
|
+
// ========================================
|
|
428
|
+
|
|
429
|
+
@Field()
|
|
430
|
+
@Editor({
|
|
431
|
+
field_type: FieldType.SELECT,
|
|
432
|
+
label: 'Text Alignment',
|
|
433
|
+
description: 'Text alignment within the component'
|
|
434
|
+
})
|
|
435
|
+
@IsOptional()
|
|
436
|
+
@IsString()
|
|
437
|
+
@IsIn(['left', 'center', 'right', 'justify'])
|
|
438
|
+
textAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
439
|
+
|
|
440
|
+
// ========================================
|
|
441
|
+
// HTML ATTRIBUTES & ACCESSIBILITY
|
|
442
|
+
// ========================================
|
|
443
|
+
|
|
444
|
+
@Field()
|
|
445
|
+
@Editor({
|
|
446
|
+
field_type: FieldType.TEXT,
|
|
447
|
+
label: 'Element ID',
|
|
448
|
+
description: 'Unique HTML element ID',
|
|
449
|
+
placeholder: 'unique-element-id'
|
|
450
|
+
})
|
|
451
|
+
@IsOptional()
|
|
452
|
+
@IsString()
|
|
453
|
+
id?: string;
|
|
454
|
+
|
|
455
|
+
@Field()
|
|
456
|
+
@Editor({
|
|
457
|
+
field_type: FieldType.TEXT,
|
|
458
|
+
label: 'Role',
|
|
459
|
+
description: 'ARIA role for accessibility',
|
|
460
|
+
placeholder: 'button, navigation, main, etc.'
|
|
461
|
+
})
|
|
462
|
+
@IsOptional()
|
|
463
|
+
@IsString()
|
|
464
|
+
role?: string;
|
|
465
|
+
|
|
466
|
+
@Field()
|
|
467
|
+
@Editor({
|
|
468
|
+
field_type: FieldType.TEXT,
|
|
469
|
+
label: 'ARIA Label',
|
|
470
|
+
description: 'Accessibility label for screen readers',
|
|
471
|
+
placeholder: 'Describe this element...'
|
|
472
|
+
})
|
|
473
|
+
@IsOptional()
|
|
474
|
+
@IsString()
|
|
475
|
+
'aria-label'?: string;
|
|
476
|
+
|
|
477
|
+
@Field()
|
|
478
|
+
@Editor({
|
|
479
|
+
field_type: FieldType.TEXT,
|
|
480
|
+
label: 'ARIA Labelled By',
|
|
481
|
+
description: 'IDs of elements that label this component',
|
|
482
|
+
placeholder: 'label-element-id'
|
|
483
|
+
})
|
|
484
|
+
@IsOptional()
|
|
485
|
+
@IsString()
|
|
486
|
+
'aria-labelledby'?: string;
|
|
487
|
+
|
|
488
|
+
@Field()
|
|
489
|
+
@Editor({
|
|
490
|
+
field_type: FieldType.TEXT,
|
|
491
|
+
label: 'ARIA Described By',
|
|
492
|
+
description: 'IDs of elements that describe this component',
|
|
493
|
+
placeholder: 'element-id-1 element-id-2'
|
|
494
|
+
})
|
|
495
|
+
@IsOptional()
|
|
496
|
+
@IsString()
|
|
497
|
+
'aria-describedby'?: string;
|
|
498
|
+
|
|
499
|
+
@Field()
|
|
500
|
+
@Editor({
|
|
501
|
+
field_type: FieldType.TEXT,
|
|
502
|
+
label: 'Data Test ID',
|
|
503
|
+
description: 'Test automation identifier',
|
|
504
|
+
placeholder: 'test-element-name'
|
|
505
|
+
})
|
|
506
|
+
@IsOptional()
|
|
507
|
+
@IsString()
|
|
508
|
+
'data-testid'?: string;
|
|
509
|
+
|
|
510
|
+
// ========================================
|
|
511
|
+
// EVENT HANDLERS (as strings for schema)
|
|
512
|
+
// ========================================
|
|
513
|
+
|
|
514
|
+
@Field()
|
|
515
|
+
@Editor({
|
|
516
|
+
field_type: FieldType.TEXTAREA,
|
|
517
|
+
label: 'Click Handler',
|
|
518
|
+
description: 'JavaScript function for click events',
|
|
519
|
+
placeholder: 'function(event) { console.log("clicked"); }'
|
|
520
|
+
})
|
|
521
|
+
@IsOptional()
|
|
522
|
+
@IsString()
|
|
523
|
+
onClick?: MouseEventHandler<any>;
|
|
524
|
+
|
|
525
|
+
@Field()
|
|
526
|
+
@Editor({
|
|
527
|
+
field_type: FieldType.TEXTAREA,
|
|
528
|
+
label: 'Mouse Enter Handler',
|
|
529
|
+
description: 'JavaScript function for mouse enter events',
|
|
530
|
+
placeholder: 'function(event) { /* hover start */ }'
|
|
531
|
+
})
|
|
532
|
+
@IsOptional()
|
|
533
|
+
@IsString()
|
|
534
|
+
onMouseEnter?: MouseEventHandler<any>;
|
|
535
|
+
|
|
536
|
+
@Field()
|
|
537
|
+
@Editor({
|
|
538
|
+
field_type: FieldType.TEXTAREA,
|
|
539
|
+
label: 'Mouse Leave Handler',
|
|
540
|
+
description: 'JavaScript function for mouse leave events',
|
|
541
|
+
placeholder: 'function(event) { /* hover end */ }'
|
|
542
|
+
})
|
|
543
|
+
@IsOptional()
|
|
544
|
+
@IsString()
|
|
545
|
+
onMouseLeave?: MouseEventHandler<any>;
|
|
546
|
+
|
|
547
|
+
@Field()
|
|
548
|
+
@Editor({
|
|
549
|
+
field_type: FieldType.TEXTAREA,
|
|
550
|
+
label: 'Focus Handler',
|
|
551
|
+
description: 'JavaScript function for focus events',
|
|
552
|
+
placeholder: 'function(event) { /* element focused */ }'
|
|
553
|
+
})
|
|
554
|
+
@IsOptional()
|
|
555
|
+
@IsString()
|
|
556
|
+
onFocus?: FocusEventHandler<any>;
|
|
557
|
+
|
|
558
|
+
@Field()
|
|
559
|
+
@Editor({
|
|
560
|
+
field_type: FieldType.TEXTAREA,
|
|
561
|
+
label: 'Blur Handler',
|
|
562
|
+
description: 'JavaScript function for blur events',
|
|
563
|
+
placeholder: 'function(event) { /* element blurred */ }'
|
|
564
|
+
})
|
|
565
|
+
@IsOptional()
|
|
566
|
+
@IsString()
|
|
567
|
+
onBlur?: FocusEventHandler<any>;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
export default ViewSchema;
|
package/src/schemas/index.ts
CHANGED