@qwickapps/react-framework 1.3.5 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1691 -2
- package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts +66 -0
- package/dist/__tests__/schemas/transformers/MockSerializableComponent.d.ts.map +1 -0
- package/dist/components/ErrorBoundary.d.ts +7 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -1
- package/dist/components/Html.d.ts +28 -18
- package/dist/components/Html.d.ts.map +1 -1
- package/dist/components/Logo.d.ts +12 -35
- package/dist/components/Logo.d.ts.map +1 -1
- package/dist/components/Markdown.d.ts +18 -13
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/QwickApp.d.ts +16 -3
- package/dist/components/QwickApp.d.ts.map +1 -1
- package/dist/components/QwickIcon.d.ts +23 -0
- package/dist/components/QwickIcon.d.ts.map +1 -0
- package/dist/components/SafeSpan.d.ts +12 -5
- package/dist/components/SafeSpan.d.ts.map +1 -1
- package/dist/components/Scaffold.d.ts.map +1 -1
- package/dist/components/base/ModelView.d.ts +101 -0
- package/dist/components/base/ModelView.d.ts.map +1 -0
- package/dist/components/base/index.d.ts +11 -0
- package/dist/components/base/index.d.ts.map +1 -0
- package/dist/components/blocks/Article.d.ts +12 -2
- package/dist/components/blocks/Article.d.ts.map +1 -1
- package/dist/components/blocks/Code.d.ts +13 -2
- package/dist/components/blocks/Code.d.ts.map +1 -1
- package/dist/components/blocks/CoverImageHeader.d.ts.map +1 -1
- package/dist/components/blocks/FeatureCard.d.ts.map +1 -1
- package/dist/components/blocks/FeatureGrid.d.ts.map +1 -1
- package/dist/components/blocks/Footer.d.ts.map +1 -1
- package/dist/components/blocks/HeroBlock.d.ts +27 -13
- package/dist/components/blocks/HeroBlock.d.ts.map +1 -1
- package/dist/components/blocks/Image.d.ts +41 -0
- package/dist/components/blocks/Image.d.ts.map +1 -0
- package/dist/components/blocks/PageBannerHeader.d.ts.map +1 -1
- package/dist/components/blocks/Section.d.ts +16 -2
- package/dist/components/blocks/Section.d.ts.map +1 -1
- package/dist/components/blocks/Text.d.ts +41 -0
- package/dist/components/blocks/Text.d.ts.map +1 -0
- package/dist/components/blocks/index.d.ts +4 -0
- package/dist/components/blocks/index.d.ts.map +1 -1
- package/dist/components/buttons/Button.d.ts +23 -7
- package/dist/components/buttons/Button.d.ts.map +1 -1
- package/dist/components/forms/FormBlock.d.ts +19 -13
- package/dist/components/forms/FormBlock.d.ts.map +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/ChoiceInputField.d.ts +17 -11
- package/dist/components/input/ChoiceInputField.d.ts.map +1 -1
- package/dist/components/input/HtmlInputField.d.ts +17 -11
- package/dist/components/input/HtmlInputField.d.ts.map +1 -1
- package/dist/components/input/SelectInputField.d.ts +16 -10
- package/dist/components/input/SelectInputField.d.ts.map +1 -1
- package/dist/components/input/SwitchInputField.d.ts +16 -10
- package/dist/components/input/SwitchInputField.d.ts.map +1 -1
- package/dist/components/input/TextField.d.ts.map +1 -1
- package/dist/components/input/TextInputField.d.ts +16 -11
- package/dist/components/input/TextInputField.d.ts.map +1 -1
- package/dist/components/layout/GridCell.d.ts +23 -6
- package/dist/components/layout/GridCell.d.ts.map +1 -1
- package/dist/components/layout/GridLayout.d.ts +24 -23
- package/dist/components/layout/GridLayout.d.ts.map +1 -1
- package/dist/components/pages/FormPage.d.ts.map +1 -1
- package/dist/components/pages/Page.d.ts +49 -87
- package/dist/components/pages/Page.d.ts.map +1 -1
- package/dist/components/pages/index.d.ts +2 -2
- package/dist/components/pages/index.d.ts.map +1 -1
- package/dist/config/AppConfig.d.ts +49 -0
- package/dist/config/AppConfig.d.ts.map +1 -0
- package/dist/config/AppConfigBuilder.d.ts +75 -0
- package/dist/config/AppConfigBuilder.d.ts.map +1 -0
- package/dist/config/index.d.ts +13 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/types.d.ts +130 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config.d.ts +15 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.esm.js +451 -0
- package/dist/config.js +455 -0
- package/dist/contexts/PrintModeContext.d.ts +27 -0
- package/dist/contexts/PrintModeContext.d.ts.map +1 -0
- package/dist/contexts/QwickAppContext.d.ts +2 -2
- package/dist/contexts/QwickAppContext.d.ts.map +1 -1
- package/dist/contexts/index.d.ts +2 -0
- package/dist/contexts/index.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/usePrintMode.d.ts +39 -0
- package/dist/hooks/usePrintMode.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +10951 -6238
- package/dist/index.js +11014 -6287
- package/dist/schemas/CodeSchema.d.ts +2 -1
- package/dist/schemas/CodeSchema.d.ts.map +1 -1
- package/dist/schemas/CollapsibleLayoutSchema.d.ts +2 -1
- package/dist/schemas/CollapsibleLayoutSchema.d.ts.map +1 -1
- package/dist/schemas/ContentSchema.d.ts +2 -1
- package/dist/schemas/ContentSchema.d.ts.map +1 -1
- package/dist/schemas/GridCellSchema.d.ts +25 -0
- package/dist/schemas/GridCellSchema.d.ts.map +1 -0
- package/dist/schemas/GridLayoutSchema.d.ts +23 -0
- package/dist/schemas/GridLayoutSchema.d.ts.map +1 -0
- package/dist/schemas/HtmlSchema.d.ts +14 -0
- package/dist/schemas/HtmlSchema.d.ts.map +1 -0
- package/dist/schemas/ImageSchema.d.ts +32 -0
- package/dist/schemas/ImageSchema.d.ts.map +1 -0
- package/dist/schemas/LogoSchema.d.ts +35 -0
- package/dist/schemas/LogoSchema.d.ts.map +1 -0
- package/dist/schemas/MarkdownSchema.d.ts +14 -0
- package/dist/schemas/MarkdownSchema.d.ts.map +1 -0
- package/dist/schemas/PageTemplateSchema.d.ts +31 -0
- package/dist/schemas/PageTemplateSchema.d.ts.map +1 -0
- package/dist/schemas/PrintConfigSchema.d.ts +31 -0
- package/dist/schemas/PrintConfigSchema.d.ts.map +1 -0
- package/dist/schemas/SectionSchema.d.ts +2 -1
- package/dist/schemas/SectionSchema.d.ts.map +1 -1
- package/dist/schemas/TextSchema.d.ts +37 -0
- package/dist/schemas/TextSchema.d.ts.map +1 -0
- package/dist/schemas/ViewModelSchema.d.ts +23 -0
- package/dist/schemas/ViewModelSchema.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +15 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/transformers/ComponentTransformer.d.ts +116 -0
- package/dist/schemas/transformers/ComponentTransformer.d.ts.map +1 -0
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts +53 -0
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -0
- package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts +66 -0
- package/dist/schemas/transformers/__tests__/MockSerializableComponent.d.ts.map +1 -0
- package/dist/schemas/transformers/registry.d.ts +15 -0
- package/dist/schemas/transformers/registry.d.ts.map +1 -0
- package/dist/schemas/types/Serializable.d.ts +46 -0
- package/dist/schemas/types/Serializable.d.ts.map +1 -0
- package/dist/utils/htmlTransform.d.ts.map +1 -1
- package/dist/utils/reactUtils.d.ts +12 -3
- package/dist/utils/reactUtils.d.ts.map +1 -1
- package/package.json +17 -3
- package/src/{components/__tests__ → __tests__/components}/AccessibilityProvider.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Article.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Breadcrumbs.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Button.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/CardListGrid.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/ChoiceInputField.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Code.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Content.integration.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Content.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/CoverImageHeader.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/ErrorBoundary.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/FeatureCard.integration.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/FeatureGrid.integration.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/FeatureGrid.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/Footer.test.tsx +4 -4
- package/src/{components/__tests__ → __tests__/components}/FormBlock.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/HeroBlock.integration.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/HeroBlock.test.tsx +233 -7
- package/src/{components/__tests__ → __tests__/components}/Html.test.tsx +11 -2
- package/src/{components/__tests__ → __tests__/components}/HtmlInputField.test.tsx +3 -3
- package/src/__tests__/components/Logo.test.js +3 -3
- package/src/{components/__tests__ → __tests__/components}/Markdown.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/PageBannerHeader.test.tsx +3 -3
- package/src/{components/__tests__ → __tests__/components}/PaletteSwitcher.test.tsx +3 -3
- package/src/{components/__tests__ → __tests__/components}/ProductCard.test.tsx +4 -4
- package/src/{components/__tests__ → __tests__/components}/SafeSpan.integration.test.tsx +2 -2
- package/src/{components/__tests__ → __tests__/components}/SafeSpan.simple.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/SafeSpan.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Section.integration.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/Section.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/SelectInputField.test.tsx +1 -1
- package/src/{components/__tests__ → __tests__/components}/TextInputField.test.tsx +3 -3
- package/src/{components/__tests__ → __tests__/components}/ThemeSwitcher.test.tsx +3 -3
- package/src/__tests__/components/base/ModelView.test.tsx +220 -0
- package/src/__tests__/components/blocks/Code.performance.test.tsx +625 -0
- package/src/__tests__/components/blocks/Code.serialization.test.tsx +507 -0
- package/src/__tests__/components/blocks/HeroBlock.serialization.test.tsx +414 -0
- package/src/__tests__/components/blocks/Image.serialization.test.tsx +257 -0
- package/src/__tests__/components/blocks/Section.serialization.test.tsx +553 -0
- package/src/__tests__/components/blocks/Text.performance.test.tsx +442 -0
- package/src/__tests__/components/blocks/Text.serialization.test.tsx +491 -0
- package/src/__tests__/components/buttons/Button.serialization.test.tsx +443 -0
- package/src/__tests__/components/input/FormComponents.serialization.test.tsx +482 -0
- package/src/__tests__/components/input/SelectInputField.serialization.test.tsx +439 -0
- package/src/__tests__/components/input/TextInputField.serialization.test.tsx +359 -0
- package/src/{components/layout/CollapsibleLayout/__tests__ → __tests__/components/layout}/CollapsibleLayout.test.tsx +4 -4
- package/src/__tests__/components/layout/GridCell.serialization.test.tsx +403 -0
- package/src/__tests__/components/layout/GridLayout.serialization.test.tsx +311 -0
- package/src/__tests__/hooks/usePrintMode.test.ts +89 -0
- package/src/__tests__/schemas/PageTemplateSchema.test.ts +161 -0
- package/src/__tests__/schemas/PrintConfigSchema.test.ts +127 -0
- package/src/__tests__/schemas/ViewModelSchema.test.ts +80 -0
- package/src/__tests__/schemas/transformers/ComponentSerializationPatterns.test.tsx +602 -0
- package/src/__tests__/schemas/transformers/ComponentTransformer.htmlPatterns.test.ts +301 -0
- package/src/__tests__/schemas/transformers/ComponentTransformer.test.ts +521 -0
- package/src/__tests__/schemas/transformers/CrossBrowserCompatibility.test.ts +586 -0
- package/src/__tests__/schemas/transformers/MockSerializableComponent.ts +103 -0
- package/src/__tests__/schemas/transformers/RealWorldScenarios.test.tsx +1165 -0
- package/src/__tests__/schemas/transformers/SerializationErrorHandling.test.ts +602 -0
- package/src/__tests__/schemas/transformers/SerializationIntegration.test.tsx +691 -0
- package/src/__tests__/schemas/transformers/SerializationPerformance.test.ts +460 -0
- package/src/__tests__/schemas/transformers/TestAutomation.test.ts +597 -0
- package/src/{utils/__tests__ → __tests__/utils}/nested-dom-fix.test.tsx +1 -1
- package/src/components/ErrorBoundary.tsx +8 -8
- package/src/components/Html.tsx +147 -44
- package/src/components/Logo.tsx +198 -100
- package/src/components/Markdown.tsx +125 -16
- package/src/components/QwickApp.tsx +64 -31
- package/src/components/QwickIcon.tsx +59 -0
- package/src/components/SafeSpan.tsx +65 -10
- package/src/components/Scaffold.tsx +2 -8
- package/src/components/base/ModelView.tsx +199 -0
- package/src/components/base/index.ts +11 -0
- package/src/components/blocks/Article.tsx +57 -18
- package/src/components/blocks/Code.md +529 -0
- package/src/components/blocks/Code.tsx +102 -15
- package/src/components/blocks/CoverImageHeader.tsx +9 -4
- package/src/components/blocks/FeatureCard.tsx +1 -2
- package/src/components/blocks/FeatureGrid.tsx +19 -1
- package/src/components/blocks/Footer.tsx +13 -1
- package/src/components/blocks/HeroBlock.tsx +87 -20
- package/src/components/blocks/Image.tsx +395 -0
- package/src/components/blocks/PageBannerHeader.tsx +14 -12
- package/src/components/blocks/ProductCard.tsx +1 -1
- package/src/components/blocks/Section.tsx +113 -8
- package/src/components/blocks/Text.tsx +285 -0
- package/src/components/blocks/index.ts +4 -0
- package/src/components/buttons/Button.tsx +184 -15
- package/src/components/forms/FormBlock.tsx +70 -17
- package/src/components/index.ts +5 -0
- package/src/components/input/ChoiceInputField.tsx +48 -18
- package/src/components/input/HtmlInputField.tsx +48 -18
- package/src/components/input/SelectInputField.tsx +48 -16
- package/src/components/input/SwitchInputField.tsx +48 -17
- package/src/components/input/TextField.tsx +41 -1
- package/src/components/input/TextInputField.tsx +52 -18
- package/src/components/layout/GridCell.tsx +118 -9
- package/src/components/layout/GridLayout.tsx +125 -24
- package/src/components/pages/FormPage.tsx +0 -1
- package/src/components/pages/Page.css +304 -332
- package/src/components/pages/Page.tsx +307 -255
- package/src/components/pages/index.ts +2 -2
- package/src/config/AppConfig.ts +133 -0
- package/src/config/AppConfigBuilder.ts +421 -0
- package/src/config/__tests__/AppConfig.test.ts +385 -0
- package/src/config/__tests__/AppConfigBuilder.test.ts +432 -0
- package/src/config/index.ts +24 -0
- package/src/config/types.ts +170 -0
- package/src/config.ts +25 -0
- package/src/contexts/PrintModeContext.tsx +332 -0
- package/src/contexts/QwickAppContext.tsx +2 -2
- package/src/contexts/index.ts +2 -0
- package/src/hooks/index.ts +5 -1
- package/src/hooks/usePrintMode.ts +73 -0
- package/src/index.ts +3 -0
- package/src/schemas/CodeSchema.ts +3 -3
- package/src/schemas/CollapsibleLayoutSchema.ts +2 -1
- package/src/schemas/ContentSchema.ts +2 -1
- package/src/schemas/GridCellSchema.ts +164 -0
- package/src/schemas/GridLayoutSchema.ts +133 -0
- package/src/schemas/HtmlSchema.ts +47 -0
- package/src/schemas/ImageSchema.ts +235 -0
- package/src/schemas/LogoSchema.ts +241 -0
- package/src/schemas/MarkdownSchema.ts +47 -0
- package/src/schemas/PageTemplateSchema.ts +186 -0
- package/src/schemas/PrintConfigSchema.ts +207 -0
- package/src/schemas/README.md +661 -0
- package/src/schemas/SectionSchema.ts +2 -1
- package/src/schemas/TextSchema.ts +329 -0
- package/src/schemas/ViewModelSchema.ts +115 -0
- package/src/schemas/index.ts +21 -2
- package/src/schemas/transformers/ComponentTransformer.ts +403 -0
- package/src/schemas/transformers/ReactNodeTransformer.ts +236 -0
- package/src/schemas/transformers/registry.ts +72 -0
- package/src/schemas/types/Serializable.ts +51 -0
- package/src/stories/AccessibilityProvider.stories.tsx +253 -253
- package/src/stories/Article.stories.tsx +433 -433
- package/src/stories/Button.stories.tsx +1 -1
- package/src/stories/CardListGrid.stories.tsx +451 -451
- package/src/stories/ChoiceInputField.stories.tsx +503 -503
- package/src/stories/Code.stories.tsx +1 -1
- package/src/stories/CollapsibleLayout.stories.tsx +1414 -1414
- package/src/stories/Content.stories.tsx +393 -393
- package/src/stories/CoverImageHeader.stories.tsx +701 -701
- package/src/stories/DataBinding.advanced.stories.tsx +432 -432
- package/src/stories/DataProvider.stories.tsx +1192 -1192
- package/src/stories/FeatureCard.stories.tsx +557 -557
- package/src/stories/FeatureGrid.stories.tsx +594 -594
- package/src/stories/Footer.stories.tsx +640 -640
- package/src/stories/FormBlock.stories.tsx +760 -760
- package/src/stories/FormComponents.stories.tsx +349 -541
- package/src/stories/GridCell.stories.tsx +417 -0
- package/src/stories/GridLayout.stories.tsx +353 -0
- package/src/stories/HeroBlock.stories.tsx +862 -373
- package/src/stories/HtmlInputField.stories.tsx +474 -474
- package/src/stories/Image.stories.tsx +819 -0
- package/src/stories/Introduction.stories.tsx +667 -667
- package/src/stories/LayoutBlocks.stories.tsx +324 -324
- package/src/stories/Logo.stories.tsx +165 -6
- package/src/stories/Markdown.stories.tsx +137 -137
- package/src/stories/ModelView.stories.tsx +477 -0
- package/src/stories/Page.stories.tsx +688 -688
- package/src/stories/PageBannerHeader.stories.tsx +864 -864
- package/src/stories/PaletteSwitcher.stories.tsx +119 -119
- package/src/stories/ProductCard.stories.tsx +424 -424
- package/src/stories/QwickApp.stories.tsx +368 -368
- package/src/stories/ResponsiveMenu.stories.tsx +249 -249
- package/src/stories/SafeSpan.stories.tsx +531 -531
- package/src/stories/Section.stories.tsx +90 -2
- package/src/stories/SelectInputField.stories.tsx +524 -524
- package/src/stories/Text.stories.tsx +560 -0
- package/src/stories/TextInputField.stories.tsx +443 -443
- package/src/stories/ThemeSwitcher.stories.tsx +123 -123
- package/src/utils/htmlTransform.tsx +74 -53
- package/src/utils/reactUtils.tsx +57 -6
- package/dist/index.bundled.css +0 -12
- /package/src/{hooks/__tests__ → __tests__/hooks}/useDataBinding.test.tsx.disabled +0 -0
- /package/src/{schemas/__tests__ → __tests__/schemas}/builders.test.ts +0 -0
- /package/src/{utils/__tests__ → __tests__/utils}/createDataDrivenComponent.test.tsx.disabled +0 -0
- /package/src/{utils/__tests__ → __tests__/utils}/htmlTransform.test.tsx +0 -0
- /package/src/{utils/__tests__ → __tests__/utils}/optional-logging.test.ts +0 -0
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
5
|
*/
|
|
6
|
+
import type { ReactNode } from 'react';
|
|
6
7
|
import 'reflect-metadata';
|
|
7
8
|
import { Model } from '@qwickapps/schema';
|
|
8
9
|
export declare class CodeModel extends Model {
|
|
9
|
-
children?:
|
|
10
|
+
children?: ReactNode;
|
|
10
11
|
language?: string;
|
|
11
12
|
showCopy?: boolean;
|
|
12
13
|
showLineNumbers?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/CodeSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"CodeSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/CodeSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAyB,KAAK,EAAa,MAAM,mBAAmB,CAAC;AAE5E,qBACa,SAAU,SAAQ,KAAK;IASlC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAWrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAUlB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAUnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAW1B,KAAK,CAAC,EAAE,MAAM,CAAC;IAUf,SAAS,CAAC,EAAE,OAAO,CAAC;IAWpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
8
8
|
*/
|
|
9
9
|
import { Model } from '@qwickapps/schema';
|
|
10
|
+
import { ReactNode } from 'react';
|
|
10
11
|
export declare class CollapsibleLayoutModel extends Model {
|
|
11
12
|
collapsed?: boolean;
|
|
12
13
|
defaultCollapsed?: boolean;
|
|
@@ -15,7 +16,7 @@ export declare class CollapsibleLayoutModel extends Model {
|
|
|
15
16
|
leadIcon?: string;
|
|
16
17
|
headerActions?: string;
|
|
17
18
|
collapsedView?: string;
|
|
18
|
-
children?: string;
|
|
19
|
+
children?: ReactNode | string;
|
|
19
20
|
footerView?: string;
|
|
20
21
|
triggerArea?: 'button' | 'header' | 'both';
|
|
21
22
|
animationStyle?: 'fade' | 'slide' | 'scale';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleLayoutSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/CollapsibleLayoutSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAIL,KAAK,EAEN,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"CollapsibleLayoutSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/CollapsibleLayoutSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAIL,KAAK,EAEN,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,qBACa,sBAAuB,SAAQ,KAAK;IAc/C,SAAS,CAAC,EAAE,OAAO,CAAC;IAUpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAe3B,KAAK,CAAC,EAAE,MAAM,CAAC;IAWf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAWlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAWlB,aAAa,CAAC,EAAE,MAAM,CAAC;IAevB,aAAa,CAAC,EAAE,MAAM,CAAC;IAWvB,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAW9B,UAAU,CAAC,EAAE,MAAM,CAAC;IAqBpB,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IAiB3C,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IAU5C,YAAY,CAAC,EAAE,OAAO,CAAC;IAevB,aAAa,CAAC,EAAE,MAAM,CAAC;IAWvB,YAAY,CAAC,EAAE,MAAM,CAAC;IActB,WAAW,CAAC,EAAE,OAAO,CAAC;IAsBtB,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;IAiBzD,aAAa,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;IAiBvD,cAAc,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;CACzD;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
import 'reflect-metadata';
|
|
7
7
|
import { Model } from '@qwickapps/schema';
|
|
8
8
|
import { ActionModel } from './ActionSchema';
|
|
9
|
+
import { ReactNode } from 'react';
|
|
9
10
|
export declare class ContentModel extends Model {
|
|
10
11
|
title?: string;
|
|
11
12
|
subtitle?: string;
|
|
12
|
-
children?: string;
|
|
13
|
+
children?: ReactNode | string;
|
|
13
14
|
actions?: ActionModel[];
|
|
14
15
|
variant?: 'default' | 'elevated' | 'outlined' | 'filled';
|
|
15
16
|
blockSpacing?: 'none' | 'compact' | 'comfortable' | 'spacious';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/ContentSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAyB,KAAK,EAAa,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/ContentSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAyB,KAAK,EAAa,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,qBACa,YAAa,SAAQ,KAAK;IAUrC,KAAK,CAAC,EAAE,MAAM,CAAC;IAWf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAWlB,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAY9B,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IAkBxB,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;IAkBzD,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;IAoB/D,eAAe,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC;IAU7D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAGD,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema for GridCell component - Grid layout cell wrapper
|
|
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 declare class GridCellModel extends Model {
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
span?: number;
|
|
12
|
+
xs?: number;
|
|
13
|
+
sm?: number;
|
|
14
|
+
md?: number;
|
|
15
|
+
lg?: number;
|
|
16
|
+
xl?: number;
|
|
17
|
+
background?: string;
|
|
18
|
+
padding?: string;
|
|
19
|
+
margin?: string;
|
|
20
|
+
height?: string;
|
|
21
|
+
width?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export default GridCellModel;
|
|
25
|
+
//# sourceMappingURL=GridCellSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridCellSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/GridCellSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAyB,KAAK,EAAa,MAAM,mBAAmB,CAAC;AAE5E,qBACa,aAAc,SAAQ,KAAK;IAQtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAarB,IAAI,CAAC,EAAE,MAAM,CAAC;IAYd,EAAE,CAAC,EAAE,MAAM,CAAC;IAYZ,EAAE,CAAC,EAAE,MAAM,CAAC;IAYZ,EAAE,CAAC,EAAE,MAAM,CAAC;IAYZ,EAAE,CAAC,EAAE,MAAM,CAAC;IAYZ,EAAE,CAAC,EAAE,MAAM,CAAC;IAYZ,UAAU,CAAC,EAAE,MAAM,CAAC;IAWpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAWjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAWhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAWhB,KAAK,CAAC,EAAE,MAAM,CAAC;IAWf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema for GridLayout component - Flexible grid layout
|
|
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 declare class GridLayoutModel extends Model {
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
columns?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
12
|
+
spacing?: string;
|
|
13
|
+
equalHeight?: boolean;
|
|
14
|
+
height?: string;
|
|
15
|
+
width?: string;
|
|
16
|
+
minHeight?: string;
|
|
17
|
+
minWidth?: string;
|
|
18
|
+
maxHeight?: string;
|
|
19
|
+
maxWidth?: string;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export default GridLayoutModel;
|
|
23
|
+
//# sourceMappingURL=GridLayoutSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridLayoutSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/GridLayoutSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAyB,KAAK,EAAa,MAAM,mBAAmB,CAAC;AAE5E,qBACa,eAAgB,SAAQ,KAAK;IAQxC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAWrB,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAWhC,OAAO,CAAC,EAAE,MAAM,CAAC;IAUjB,WAAW,CAAC,EAAE,OAAO,CAAC;IAWtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAWhB,KAAK,CAAC,EAAE,MAAM,CAAC;IAWf,SAAS,CAAC,EAAE,MAAM,CAAC;IAWnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAWlB,SAAS,CAAC,EAAE,MAAM,CAAC;IAWnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAWlB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema for Html component - Transforms HTML strings into Framework components
|
|
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 HtmlModel extends Model {
|
|
9
|
+
children?: string;
|
|
10
|
+
stripHeaders?: boolean;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
}
|
|
13
|
+
export default HtmlModel;
|
|
14
|
+
//# sourceMappingURL=HtmlSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HtmlSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/HtmlSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAyB,KAAK,EAAa,MAAM,mBAAmB,CAAC;AAE5E,qBACa,SAAU,SAAQ,KAAK;IAUlC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAUlB,YAAY,CAAC,EAAE,OAAO,CAAC;IAWvB,WAAW,CAAC,EAAE,MAAM,CAAC;CAEtB;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema for Image component - Comprehensive image display 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 ImageFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
|
|
10
|
+
export type ImageLoading = 'lazy' | 'eager';
|
|
11
|
+
export type ImagePosition = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
12
|
+
export declare class ImageModel extends Model {
|
|
13
|
+
src?: string;
|
|
14
|
+
alt?: string;
|
|
15
|
+
width?: number;
|
|
16
|
+
height?: number;
|
|
17
|
+
objectFit?: ImageFit;
|
|
18
|
+
objectPosition?: ImagePosition;
|
|
19
|
+
loading?: ImageLoading;
|
|
20
|
+
title?: string;
|
|
21
|
+
draggable?: boolean;
|
|
22
|
+
borderRadius?: string;
|
|
23
|
+
showLoading?: boolean;
|
|
24
|
+
showError?: boolean;
|
|
25
|
+
fallbackSrc?: string;
|
|
26
|
+
sizes?: string;
|
|
27
|
+
srcSet?: string;
|
|
28
|
+
loadingPlaceholder?: ReactNode;
|
|
29
|
+
errorPlaceholder?: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export default ImageModel;
|
|
32
|
+
//# sourceMappingURL=ImageSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/ImageSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAyB,KAAK,EAAuB,MAAM,mBAAmB,CAAC;AAGtF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;AAG5E,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAG5C,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAEvI,qBACa,UAAW,SAAQ,KAAK;IAUnC,GAAG,CAAC,EAAE,MAAM,CAAC;IAWb,GAAG,CAAC,EAAE,MAAM,CAAC;IAWb,KAAK,CAAC,EAAE,MAAM,CAAC;IAWf,MAAM,CAAC,EAAE,MAAM,CAAC;IAoBhB,SAAS,CAAC,EAAE,QAAQ,CAAC;IAwBrB,cAAc,CAAC,EAAE,aAAa,CAAC;IAiB/B,OAAO,CAAC,EAAE,YAAY,CAAC;IAWvB,KAAK,CAAC,EAAE,MAAM,CAAC;IAUf,SAAS,CAAC,EAAE,OAAO,CAAC;IAWpB,YAAY,CAAC,EAAE,MAAM,CAAC;IAUtB,WAAW,CAAC,EAAE,OAAO,CAAC;IAUtB,SAAS,CAAC,EAAE,OAAO,CAAC;IAWpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAWrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAWf,MAAM,CAAC,EAAE,MAAM,CAAC;IAWhB,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAU/B,gBAAgB,CAAC,EAAE,SAAS,CAAC;CAC9B;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema for Logo component - Dynamic theme-aware logo
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
import { Model } from '@qwickapps/schema';
|
|
7
|
+
import { ReactNode } from 'react';
|
|
8
|
+
import 'reflect-metadata';
|
|
9
|
+
export type LogoVariant = 'default' | 'high-contrast' | 'monochrome' | 'on-primary';
|
|
10
|
+
export type LogoSize = 'tiny' | 'small' | 'medium' | 'large' | 'extra-large';
|
|
11
|
+
export type LogoBadgeShape = 'circle' | 'star' | 'square' | 'heart';
|
|
12
|
+
export type PositionType = 'none' | 'top-left' | 'top-center' | 'top-right' | 'start' | 'center' | 'end' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
13
|
+
export interface BadgeOffset {
|
|
14
|
+
/** Horizontal offset from the calculated position (positive = right, negative = left) */
|
|
15
|
+
x?: number;
|
|
16
|
+
/** Vertical offset from the calculated position (positive = down, negative = up) */
|
|
17
|
+
y?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare class LogoModel extends Model {
|
|
20
|
+
name?: string;
|
|
21
|
+
variant?: LogoVariant;
|
|
22
|
+
size?: LogoSize;
|
|
23
|
+
badge?: PositionType;
|
|
24
|
+
badgeShape?: LogoBadgeShape;
|
|
25
|
+
badgeOffsetX?: number;
|
|
26
|
+
badgeOffsetY?: number;
|
|
27
|
+
fontFamily?: string;
|
|
28
|
+
fontWeight?: string;
|
|
29
|
+
firstPartClass?: string;
|
|
30
|
+
secondPartClass?: string;
|
|
31
|
+
image?: ReactNode | string;
|
|
32
|
+
imagePosition?: PositionType;
|
|
33
|
+
}
|
|
34
|
+
export default LogoModel;
|
|
35
|
+
//# sourceMappingURL=LogoSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogoSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/LogoSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAsC,KAAK,EAAU,MAAM,mBAAmB,CAAC;AAEtF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,kBAAkB,CAAC;AAG1B,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,GAAG,YAAY,GAAG,YAAY,CAAC;AAGpF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,CAAC;AAG7E,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAGpE,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,UAAU,GACV,YAAY,GACZ,WAAW,GACX,OAAO,GACP,QAAQ,GACR,KAAK,GACL,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAGnB,MAAM,WAAW,WAAW;IAC1B,yFAAyF;IACzF,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,oFAAoF;IACpF,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED,qBACa,SAAU,SAAQ,KAAK;IAUlC,IAAI,CAAC,EAAE,MAAM,CAAC;IAmBd,OAAO,CAAC,EAAE,WAAW,CAAC;IAoBtB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAyBhB,KAAK,CAAC,EAAE,YAAY,CAAC;IAmBrB,UAAU,CAAC,EAAE,cAAc,CAAC;IAW5B,YAAY,CAAC,EAAE,MAAM,CAAC;IAWtB,YAAY,CAAC,EAAE,MAAM,CAAC;IAWtB,UAAU,CAAC,EAAE,MAAM,CAAC;IAWpB,UAAU,CAAC,EAAE,MAAM,CAAC;IAWpB,cAAc,CAAC,EAAE,MAAM,CAAC;IAWxB,eAAe,CAAC,EAAE,MAAM,CAAC;IAWzB,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAyB3B,aAAa,CAAC,EAAE,YAAY,CAAC;CAC9B;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema for Markdown component - Transforms Markdown strings into Framework components
|
|
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 MarkdownModel extends Model {
|
|
9
|
+
children?: string;
|
|
10
|
+
sanitize?: boolean;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
}
|
|
13
|
+
export default MarkdownModel;
|
|
14
|
+
//# sourceMappingURL=MarkdownSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/MarkdownSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAyB,KAAK,EAAa,MAAM,mBAAmB,CAAC;AAE5E,qBACa,aAAc,SAAQ,KAAK;IAUtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAUlB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAWnB,WAAW,CAAC,EAAE,MAAM,CAAC;CAEtB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PageTemplate Schema - Complete page template configuration
|
|
3
|
+
*
|
|
4
|
+
* Extends ViewModel to provide comprehensive page-level configuration
|
|
5
|
+
* including metadata, print settings, and content structure.
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
8
|
+
*/
|
|
9
|
+
import 'reflect-metadata';
|
|
10
|
+
import { ViewModelSchema } from './ViewModelSchema';
|
|
11
|
+
import { PrintConfigSchema } from './PrintConfigSchema';
|
|
12
|
+
export declare class PageTemplateSchema extends ViewModelSchema {
|
|
13
|
+
slug?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
metaKeywords?: string;
|
|
18
|
+
metaAuthor?: string;
|
|
19
|
+
canonicalUrl?: string;
|
|
20
|
+
children?: React.ReactNode | string;
|
|
21
|
+
printConfig?: PrintConfigSchema;
|
|
22
|
+
layout?: string;
|
|
23
|
+
icon?: string;
|
|
24
|
+
requiresAuth?: boolean;
|
|
25
|
+
requiredRoles?: string;
|
|
26
|
+
showInNavigation?: boolean;
|
|
27
|
+
navigationPriority?: number;
|
|
28
|
+
indexable?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export default PageTemplateSchema;
|
|
31
|
+
//# sourceMappingURL=PageTemplateSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageTemplateSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/PageTemplateSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,qBACa,kBAAmB,SAAQ,eAAe;IAUrD,IAAI,CAAC,EAAE,MAAM,CAAC;IAWd,IAAI,CAAC,EAAE,MAAM,CAAC;IAWd,WAAW,CAAC,EAAE,MAAM,CAAC;IAWrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAWf,YAAY,CAAC,EAAE,MAAM,CAAC;IAWtB,UAAU,CAAC,EAAE,MAAM,CAAC;IAWpB,YAAY,CAAC,EAAE,MAAM,CAAC;IAStB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IAWpC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAWhC,MAAM,CAAC,EAAE,MAAM,CAAC;IAWhB,IAAI,CAAC,EAAE,MAAM,CAAC;IASd,YAAY,CAAC,EAAE,OAAO,CAAC;IAWvB,aAAa,CAAC,EAAE,MAAM,CAAC;IASvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAS3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAS5B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PrintConfig Schema - Configuration for print mode rendering
|
|
3
|
+
*
|
|
4
|
+
* Defines how components should behave and appear when printed,
|
|
5
|
+
* including theme settings and layout modifications for print media.
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
8
|
+
*/
|
|
9
|
+
import 'reflect-metadata';
|
|
10
|
+
import { Model } from '@qwickapps/schema';
|
|
11
|
+
import { ReactNode } from 'react';
|
|
12
|
+
export declare class PrintConfigSchema extends Model {
|
|
13
|
+
theme?: 'light' | 'dark';
|
|
14
|
+
palette?: string;
|
|
15
|
+
hideScaffolding?: boolean;
|
|
16
|
+
hideInteractiveElements?: boolean;
|
|
17
|
+
optimizeForMonochrome?: boolean;
|
|
18
|
+
printTitle?: string;
|
|
19
|
+
showPrintDate?: boolean;
|
|
20
|
+
printHeader?: string | ReactNode;
|
|
21
|
+
printHeaderFirstPage?: string | ReactNode;
|
|
22
|
+
printFooter?: string | ReactNode;
|
|
23
|
+
printFooterFirstPage?: string | ReactNode;
|
|
24
|
+
pageMargins?: string;
|
|
25
|
+
printHeaderHeight?: string;
|
|
26
|
+
printFooterHeight?: string;
|
|
27
|
+
printBackground?: string;
|
|
28
|
+
printBackgroundFirstPage?: string;
|
|
29
|
+
}
|
|
30
|
+
export default PrintConfigSchema;
|
|
31
|
+
//# sourceMappingURL=PrintConfigSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrintConfigSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/PrintConfigSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAA4B,KAAK,EAAU,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,qBACa,iBAAkB,SAAQ,KAAK;IAe1C,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAoBzB,OAAO,CAAC,EAAE,MAAM,CAAC;IAUjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAU1B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAUlC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAWhC,UAAU,CAAC,EAAE,MAAM,CAAC;IAUpB,aAAa,CAAC,EAAE,OAAO,CAAC;IAUxB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAUjC,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAU1C,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAUjC,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAkB1C,WAAW,CAAC,EAAE,MAAM,CAAC;IAWrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAW3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAW3B,eAAe,CAAC,EAAE,MAAM,CAAC;IAWzB,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import 'reflect-metadata';
|
|
7
7
|
import { Model } from '@qwickapps/schema';
|
|
8
|
+
import { ReactNode } from 'react';
|
|
8
9
|
export declare class SectionModel extends Model {
|
|
9
|
-
children?: string;
|
|
10
|
+
children?: ReactNode | string;
|
|
10
11
|
background?: string;
|
|
11
12
|
color?: string;
|
|
12
13
|
padding?: 'none' | 'tiny' | 'small' | 'medium' | 'large' | 'extra-large';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/SectionSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAyB,KAAK,EAAa,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SectionSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/SectionSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAyB,KAAK,EAAa,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,qBACa,YAAa,SAAQ,KAAK;IAUrC,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAW9B,UAAU,CAAC,EAAE,MAAM,CAAC;IAWpB,KAAK,CAAC,EAAE,MAAM,CAAC;IAoBf,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,CAAC;IAoBzE,eAAe,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC;IAkB7D,SAAS,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;CACpD;AAGD,eAAe,YAAY,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,EAAyB,KAAK,EAAuB,MAAM,mBAAmB,CAAC;AAGtF,MAAM,MAAM,WAAW,GACnB,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GACvC,WAAW,GAAG,WAAW,GACzB,OAAO,GAAG,OAAO,GACjB,QAAQ,GACR,SAAS,GACT,UAAU,CAAC;AAGf,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAG5E,MAAM,MAAM,SAAS,GACjB,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,eAAe,GACzD,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GACxC,SAAS,CAAC;AAGd,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,QAAQ,CAAC;AAG9G,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,cAAc,CAAC;AAGhF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAGtJ,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,CAAC;AAE1F,qBACa,SAAU,SAAQ,KAAK;IAUlC,OAAO,CAAC,EAAE,MAAM,CAAC;IA4BjB,OAAO,CAAC,EAAE,WAAW,CAAC;IAwBtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAoBlB,KAAK,CAAC,EAAE,SAAS,CAAC;IA0BlB,SAAS,CAAC,EAAE,WAAW,CAAC;IA6BxB,UAAU,CAAC,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,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ViewModel Schema - Base class for all view components that can be serialized
|
|
3
|
+
*
|
|
4
|
+
* Provides common attributes shared across UI components including
|
|
5
|
+
* styling, accessibility, and layout properties.
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
8
|
+
*/
|
|
9
|
+
import 'reflect-metadata';
|
|
10
|
+
import { Model } from '@qwickapps/schema';
|
|
11
|
+
export declare class ViewModelSchema extends Model {
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
hidden?: boolean;
|
|
16
|
+
'aria-label'?: string;
|
|
17
|
+
'aria-describedby'?: string;
|
|
18
|
+
'aria-labelledby'?: string;
|
|
19
|
+
'data-testid'?: string;
|
|
20
|
+
role?: string;
|
|
21
|
+
}
|
|
22
|
+
export default ViewModelSchema;
|
|
23
|
+
//# sourceMappingURL=ViewModelSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewModelSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/ViewModelSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAA4B,KAAK,EAAU,MAAM,mBAAmB,CAAC;AAE5E,qBACa,eAAgB,SAAQ,KAAK;IAUxC,SAAS,CAAC,EAAE,MAAM,CAAC;IAWnB,KAAK,CAAC,EAAE,MAAM,CAAC;IAWf,EAAE,CAAC,EAAE,MAAM,CAAC;IAUZ,MAAM,CAAC,EAAE,OAAO,CAAC;IAWjB,YAAY,CAAC,EAAE,MAAM,CAAC;IAWtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAW5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAW3B,aAAa,CAAC,EAAE,MAAM,CAAC;IAWvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAe,eAAe,CAAC"}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Schemas Module - Declarative Model schema definitions
|
|
2
|
+
* Schemas Module - Declarative Model schema definitions and Component Serialization System
|
|
3
3
|
*
|
|
4
4
|
* Exports all Model classes and their type-safe props using the new
|
|
5
5
|
* declarative pattern with @Schema, @Field, and @Editor decorators.
|
|
6
6
|
*
|
|
7
|
+
* Also exports the new Component Serialization System for "WebView for React" functionality.
|
|
8
|
+
*
|
|
7
9
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
8
10
|
*/
|
|
11
|
+
export type { Serializable, SerializableConstructor } from './types/Serializable';
|
|
12
|
+
export { ComponentTransformer } from './transformers/ComponentTransformer';
|
|
13
|
+
import './transformers/registry';
|
|
9
14
|
export * from './ActionSchema';
|
|
10
15
|
export * from './ArticleSchema';
|
|
11
16
|
export * from './CardListGridSchema';
|
|
@@ -20,8 +25,13 @@ export * from './FooterItemSchema';
|
|
|
20
25
|
export * from './FormBlockSchema';
|
|
21
26
|
export * from './FooterSchema';
|
|
22
27
|
export * from './FooterSectionSchema';
|
|
28
|
+
export * from './GridCellSchema';
|
|
29
|
+
export * from './GridLayoutSchema';
|
|
23
30
|
export * from './HeaderActionSchema';
|
|
24
31
|
export * from './HeroBlockSchema';
|
|
32
|
+
export * from './HtmlSchema';
|
|
33
|
+
export * from './ImageSchema';
|
|
34
|
+
export * from './MarkdownSchema';
|
|
25
35
|
export * from './MetadataItemSchema';
|
|
26
36
|
export * from './PageBannerHeaderSchema';
|
|
27
37
|
export * from './PaletteSwitcherSchema';
|
|
@@ -29,5 +39,9 @@ export * from './ProductCardSchema';
|
|
|
29
39
|
export * from './SafeSpanSchema';
|
|
30
40
|
export * from './SectionSchema';
|
|
31
41
|
export * from './TextInputFieldSchema';
|
|
42
|
+
export * from './TextSchema';
|
|
32
43
|
export * from './ThemeSwitcherSchema';
|
|
44
|
+
export * from './ViewModelSchema';
|
|
45
|
+
export * from './PrintConfigSchema';
|
|
46
|
+
export * from './PageTemplateSchema';
|
|
33
47
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA
|
|
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,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
* Register a component class for serialization
|
|
24
|
+
* Component must declare its own tagName and version via static properties
|
|
25
|
+
* @param componentClass - Component class that implements Serializable interface
|
|
26
|
+
*/
|
|
27
|
+
static registerComponent(componentClass: SerializableConstructor): void;
|
|
28
|
+
/**
|
|
29
|
+
* Serialize React node(s) to JSON string
|
|
30
|
+
* @param node - React node or array of nodes to serialize
|
|
31
|
+
* @returns JSON string representation
|
|
32
|
+
*/
|
|
33
|
+
static serialize(node: ReactNode | ReactNode[]): string;
|
|
34
|
+
/**
|
|
35
|
+
* Deserialize JSON input to React node(s)
|
|
36
|
+
* @param input - JSON string or parsed object/array to deserialize
|
|
37
|
+
* @returns React node or array of nodes
|
|
38
|
+
*/
|
|
39
|
+
static deserialize(input: string | object | object[]): ReactNode | ReactNode[];
|
|
40
|
+
/**
|
|
41
|
+
* Internal method to serialize a single React node
|
|
42
|
+
* @param node - React node to serialize
|
|
43
|
+
* @returns Serializable data structure
|
|
44
|
+
*/
|
|
45
|
+
private static serializeNode;
|
|
46
|
+
/**
|
|
47
|
+
* Internal method to deserialize data back to React nodes
|
|
48
|
+
* @param data - Data to deserialize
|
|
49
|
+
* @returns React node(s)
|
|
50
|
+
*/
|
|
51
|
+
private static deserializeData;
|
|
52
|
+
/**
|
|
53
|
+
* Serialize unregistered React components using ReactNodeTransformer
|
|
54
|
+
* @param element - React element to serialize
|
|
55
|
+
* @returns Serializable data structure
|
|
56
|
+
*/
|
|
57
|
+
private static serializeUnregisteredComponent;
|
|
58
|
+
/**
|
|
59
|
+
* Deserialize unregistered components using ReactNodeTransformer
|
|
60
|
+
* @param data - Serialized data
|
|
61
|
+
* @returns React node
|
|
62
|
+
*/
|
|
63
|
+
private static deserializeUnregisteredComponent;
|
|
64
|
+
/**
|
|
65
|
+
* Find the tag name for a given component constructor
|
|
66
|
+
* @param componentType - Component constructor function
|
|
67
|
+
* @returns Tag name or null if not found
|
|
68
|
+
*/
|
|
69
|
+
private static findTagNameForComponent;
|
|
70
|
+
/**
|
|
71
|
+
* Get list of registered component tags (for debugging/testing)
|
|
72
|
+
* @returns Array of registered tag names
|
|
73
|
+
*/
|
|
74
|
+
static getRegisteredComponents(): string[];
|
|
75
|
+
/**
|
|
76
|
+
* Clear all registered components (for testing)
|
|
77
|
+
*/
|
|
78
|
+
static clearRegistry(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Register an HTML pattern handler
|
|
81
|
+
* @param pattern - CSS selector pattern (e.g., 'pre code', 'section.blog-section')
|
|
82
|
+
* @param handler - Function to transform matching elements to component data
|
|
83
|
+
*/
|
|
84
|
+
static registerPattern(pattern: string, handler: PatternHandler): void;
|
|
85
|
+
/**
|
|
86
|
+
* Check if a pattern is registered
|
|
87
|
+
* @param pattern - CSS selector pattern to check
|
|
88
|
+
* @returns True if pattern is registered
|
|
89
|
+
*/
|
|
90
|
+
static hasPattern(pattern: string): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Transform an HTML element to React component if a matching pattern exists
|
|
93
|
+
* @param element - DOM Element to transform
|
|
94
|
+
* @returns React node if pattern matches, null otherwise
|
|
95
|
+
*/
|
|
96
|
+
static transformHTMLElement(element: Element): ReactNode | null;
|
|
97
|
+
/**
|
|
98
|
+
* Transform HTML string to React nodes using registered patterns
|
|
99
|
+
* @param html - HTML string to transform
|
|
100
|
+
* @returns Array of React nodes
|
|
101
|
+
*/
|
|
102
|
+
static transformHTML(html: string): ReactNode[];
|
|
103
|
+
/**
|
|
104
|
+
* Recursively transform an element and its children
|
|
105
|
+
* @param element - DOM Element to transform
|
|
106
|
+
* @param key - React key for the element
|
|
107
|
+
* @returns React node
|
|
108
|
+
*/
|
|
109
|
+
private static transformElement;
|
|
110
|
+
/**
|
|
111
|
+
* Get list of registered patterns (for debugging/testing)
|
|
112
|
+
* @returns Array of registered patterns
|
|
113
|
+
*/
|
|
114
|
+
static getRegisteredPatterns(): string[];
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=ComponentTransformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentTransformer.d.ts","sourceRoot":"","sources":["../../../src/schemas/transformers/ComponentTransformer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAc,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAahE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,GAAG,CAAC;AAEvD;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CAAC,cAAc,EAAE,uBAAuB,GAAG,IAAI;IAuBvE;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,EAAE,GAAG,MAAM;IAKvD;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,GAAG,SAAS,EAAE;IAmC9E;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IA4D5B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IA6C9B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,8BAA8B;IAQ7C;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,gCAAgC;IAI/C;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAYtC;;;OAGG;IACH,MAAM,CAAC,uBAAuB,IAAI,MAAM,EAAE;IAI1C;;OAEG;IACH,MAAM,CAAC,aAAa,IAAI,IAAI;IAO5B;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;IAOtE;;;;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;IAgB/D;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE;IAa/C;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IA4C/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,EAAE,SAAS,EAA+C,MAAM,OAAO,CAAC;AAG/E;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,GAAG;IA0DtC;;;;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;IA0BtC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAkB/B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAqBlC"}
|