@rulecms/widget-angular 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +7 -0
- package/README.md +125 -0
- package/fesm2022/rulecms-widget-angular.mjs +3465 -0
- package/fesm2022/rulecms-widget-angular.mjs.map +1 -0
- package/index.d.ts +6 -0
- package/lib/fetch/fetch-rule-cms-widget.d.ts +23 -0
- package/lib/fetch/fetch-rule-cms-widget.d.ts.map +1 -0
- package/lib/fetch/resolve-widget-libraries.d.ts +16 -0
- package/lib/fetch/resolve-widget-libraries.d.ts.map +1 -0
- package/lib/helpers/background-image-types.d.ts +24 -0
- package/lib/helpers/background-image-types.d.ts.map +1 -0
- package/lib/helpers/border-types.d.ts +22 -0
- package/lib/helpers/border-types.d.ts.map +1 -0
- package/lib/helpers/box-shadow-types.d.ts +25 -0
- package/lib/helpers/box-shadow-types.d.ts.map +1 -0
- package/lib/helpers/box-spacing-style-attribute-entries.d.ts +4 -0
- package/lib/helpers/box-spacing-style-attribute-entries.d.ts.map +1 -0
- package/lib/helpers/box-spacing-types.d.ts +31 -0
- package/lib/helpers/box-spacing-types.d.ts.map +1 -0
- package/lib/helpers/cloudinary-image-url.d.ts +20 -0
- package/lib/helpers/cloudinary-image-url.d.ts.map +1 -0
- package/lib/helpers/collect-component-instance-paths.d.ts +16 -0
- package/lib/helpers/collect-component-instance-paths.d.ts.map +1 -0
- package/lib/helpers/constants.d.ts +5 -0
- package/lib/helpers/constants.d.ts.map +1 -0
- package/lib/helpers/css-classes.d.ts +13 -0
- package/lib/helpers/css-classes.d.ts.map +1 -0
- package/lib/helpers/css-color-types.d.ts +18 -0
- package/lib/helpers/css-color-types.d.ts.map +1 -0
- package/lib/helpers/css-enum-types.d.ts +41 -0
- package/lib/helpers/css-enum-types.d.ts.map +1 -0
- package/lib/helpers/css-variable-types.d.ts +33 -0
- package/lib/helpers/css-variable-types.d.ts.map +1 -0
- package/lib/helpers/derive-display-flex-if-needed.d.ts +13 -0
- package/lib/helpers/derive-display-flex-if-needed.d.ts.map +1 -0
- package/lib/helpers/format-background-image-styles.d.ts +12 -0
- package/lib/helpers/format-background-image-styles.d.ts.map +1 -0
- package/lib/helpers/format-border-styles.d.ts +9 -0
- package/lib/helpers/format-border-styles.d.ts.map +1 -0
- package/lib/helpers/format-box-shadow-styles.d.ts +8 -0
- package/lib/helpers/format-box-shadow-styles.d.ts.map +1 -0
- package/lib/helpers/format-box-spacing-styles.d.ts +11 -0
- package/lib/helpers/format-box-spacing-styles.d.ts.map +1 -0
- package/lib/helpers/format-css-color-styles.d.ts +8 -0
- package/lib/helpers/format-css-color-styles.d.ts.map +1 -0
- package/lib/helpers/format-css-enum-styles.d.ts +7 -0
- package/lib/helpers/format-css-enum-styles.d.ts.map +1 -0
- package/lib/helpers/format-css-length-styles.d.ts +9 -0
- package/lib/helpers/format-css-length-styles.d.ts.map +1 -0
- package/lib/helpers/format-line-height-styles.d.ts +8 -0
- package/lib/helpers/format-line-height-styles.d.ts.map +1 -0
- package/lib/helpers/format-opacity-styles.d.ts +8 -0
- package/lib/helpers/format-opacity-styles.d.ts.map +1 -0
- package/lib/helpers/format-spacing-side-value.d.ts +4 -0
- package/lib/helpers/format-spacing-side-value.d.ts.map +1 -0
- package/lib/helpers/get-column-attributes.d.ts +26 -0
- package/lib/helpers/get-column-attributes.d.ts.map +1 -0
- package/lib/helpers/get-component-attributes-and-styles.d.ts +23 -0
- package/lib/helpers/get-component-attributes-and-styles.d.ts.map +1 -0
- package/lib/helpers/get-default-dimension-attributes.d.ts +9 -0
- package/lib/helpers/get-default-dimension-attributes.d.ts.map +1 -0
- package/lib/helpers/get-device-type-based-attributes.d.ts +10 -0
- package/lib/helpers/get-device-type-based-attributes.d.ts.map +1 -0
- package/lib/helpers/get-merged-attributes.d.ts +11 -0
- package/lib/helpers/get-merged-attributes.d.ts.map +1 -0
- package/lib/helpers/has-items.d.ts +3 -0
- package/lib/helpers/has-items.d.ts.map +1 -0
- package/lib/helpers/index.d.ts +40 -0
- package/lib/helpers/index.d.ts.map +1 -0
- package/lib/helpers/line-height-types.d.ts +12 -0
- package/lib/helpers/line-height-types.d.ts.map +1 -0
- package/lib/helpers/object-style-attribute-registry.d.ts +44 -0
- package/lib/helpers/object-style-attribute-registry.d.ts.map +1 -0
- package/lib/helpers/opacity-types.d.ts +9 -0
- package/lib/helpers/opacity-types.d.ts.map +1 -0
- package/lib/helpers/resolve-row-styles.d.ts +23 -0
- package/lib/helpers/resolve-row-styles.d.ts.map +1 -0
- package/lib/helpers/resolve-widget-container-styles.d.ts +55 -0
- package/lib/helpers/resolve-widget-container-styles.d.ts.map +1 -0
- package/lib/helpers/resolve-widget-instance-props.d.ts +18 -0
- package/lib/helpers/resolve-widget-instance-props.d.ts.map +1 -0
- package/lib/helpers/types.d.ts +131 -0
- package/lib/helpers/types.d.ts.map +1 -0
- package/lib/helpers/warn-unmatched-component-props.d.ts +30 -0
- package/lib/helpers/warn-unmatched-component-props.d.ts.map +1 -0
- package/lib/helpers-display/dimension-wrapper-styles.d.ts +7 -0
- package/lib/helpers-display/dimension-wrapper-styles.d.ts.map +1 -0
- package/lib/helpers-display/resolve-no-container.d.ts +14 -0
- package/lib/helpers-display/resolve-no-container.d.ts.map +1 -0
- package/lib/helpers-display/resolve-renders-own-element.d.ts +15 -0
- package/lib/helpers-display/resolve-renders-own-element.d.ts.map +1 -0
- package/lib/id-utils/collection-col-type-prefix.d.ts +2 -0
- package/lib/id-utils/collection-col-type-prefix.d.ts.map +1 -0
- package/lib/id-utils/dev-client-token.d.ts +33 -0
- package/lib/id-utils/dev-client-token.d.ts.map +1 -0
- package/lib/id-utils/drag-item-id-helper.d.ts +9 -0
- package/lib/id-utils/drag-item-id-helper.d.ts.map +1 -0
- package/lib/id-utils/get-collection-id-for-collection-type.d.ts +2 -0
- package/lib/id-utils/get-collection-id-for-collection-type.d.ts.map +1 -0
- package/lib/id-utils/get-name-and-instance-id-from-widget-key.d.ts +6 -0
- package/lib/id-utils/get-name-and-instance-id-from-widget-key.d.ts.map +1 -0
- package/lib/id-utils/get-name-for-widget-key.d.ts +5 -0
- package/lib/id-utils/get-name-for-widget-key.d.ts.map +1 -0
- package/lib/id-utils/get-widget-key-for-collection.d.ts +16 -0
- package/lib/id-utils/get-widget-key-for-collection.d.ts.map +1 -0
- package/lib/id-utils/index.d.ts +11 -0
- package/lib/id-utils/index.d.ts.map +1 -0
- package/lib/id-utils/published-key-utilities.d.ts +24 -0
- package/lib/id-utils/published-key-utilities.d.ts.map +1 -0
- package/lib/id-utils/types.d.ts +25 -0
- package/lib/id-utils/types.d.ts.map +1 -0
- package/lib/id-utils/version-utilities.d.ts +7 -0
- package/lib/id-utils/version-utilities.d.ts.map +1 -0
- package/lib/library-registry/ComponentLibraryRegistry.d.ts +17 -0
- package/lib/library-registry/ComponentLibraryRegistry.d.ts.map +1 -0
- package/lib/library-registry/collect-referenced-library-ids.d.ts +20 -0
- package/lib/library-registry/collect-referenced-library-ids.d.ts.map +1 -0
- package/lib/library-registry/index.d.ts +5 -0
- package/lib/library-registry/index.d.ts.map +1 -0
- package/lib/library-registry/resolve-key.d.ts +16 -0
- package/lib/library-registry/resolve-key.d.ts.map +1 -0
- package/lib/library-registry/types.d.ts +142 -0
- package/lib/library-registry/types.d.ts.map +1 -0
- package/lib/provider/rule-cms-widget-context.service.d.ts +11 -0
- package/lib/provider/rule-cms-widget-context.service.d.ts.map +1 -0
- package/lib/provider/rule-cms-widget-provider.component.d.ts +26 -0
- package/lib/provider/rule-cms-widget-provider.component.d.ts.map +1 -0
- package/lib/render/breakpoint-variant-render.component.d.ts +21 -0
- package/lib/render/breakpoint-variant-render.component.d.ts.map +1 -0
- package/lib/render/breakpoint-variant-styles.d.ts +2 -0
- package/lib/render/breakpoint-variant-styles.d.ts.map +1 -0
- package/lib/render/display-component.component.d.ts +27 -0
- package/lib/render/display-component.component.d.ts.map +1 -0
- package/lib/render/display-device-type.d.ts +5 -0
- package/lib/render/display-device-type.d.ts.map +1 -0
- package/lib/render/embed-in-row.component.d.ts +21 -0
- package/lib/render/embed-in-row.component.d.ts.map +1 -0
- package/lib/render/embed-in-vertical-container.component.d.ts +24 -0
- package/lib/render/embed-in-vertical-container.component.d.ts.map +1 -0
- package/lib/render/get-components-plugin-from-plugins.d.ts +11 -0
- package/lib/render/get-components-plugin-from-plugins.d.ts.map +1 -0
- package/lib/render/has-device-divergent-values.d.ts +6 -0
- package/lib/render/has-device-divergent-values.d.ts.map +1 -0
- package/lib/render/render-components-for-device.component.d.ts +20 -0
- package/lib/render/render-components-for-device.component.d.ts.map +1 -0
- package/lib/render/render-components-inner.component.d.ts +33 -0
- package/lib/render/render-components-inner.component.d.ts.map +1 -0
- package/lib/render/render-components.component.d.ts +26 -0
- package/lib/render/render-components.component.d.ts.map +1 -0
- package/lib/render/types.d.ts +43 -0
- package/lib/render/types.d.ts.map +1 -0
- package/lib/widget/prepare-rule-cms-widget-data.d.ts +4 -0
- package/lib/widget/prepare-rule-cms-widget-data.d.ts.map +1 -0
- package/lib/widget/resolve-source-components-plugin.d.ts +19 -0
- package/lib/widget/resolve-source-components-plugin.d.ts.map +1 -0
- package/lib/widget/rule-cms-widget.component.d.ts +66 -0
- package/lib/widget/rule-cms-widget.component.d.ts.map +1 -0
- package/lib/widget/rule-cms-widget.styles.d.ts +9 -0
- package/lib/widget/rule-cms-widget.styles.d.ts.map +1 -0
- package/lib/widget/widget-data.types.d.ts +47 -0
- package/lib/widget/widget-data.types.d.ts.map +1 -0
- package/package.json +43 -0
- package/public-api.d.ts +22 -0
- package/public-api.d.ts.map +1 -0
- package/rulecms-widget-angular.d.ts.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-default-dimension-attributes.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/get-default-dimension-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAGvB,MAAM,2BAA2B,CAAC;AAGnC,eAAO,MAAM,6BAA6B,wDAIvC;IACD,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,sBAAsB,CAAC;CAChD;;aA+BA,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DeviceDisplayTypes } from "./types";
|
|
2
|
+
export declare const getDeviceTypeBasedAttributes: ({ deviceDisplayType, componentAttributes, }: {
|
|
3
|
+
deviceDisplayType: keyof typeof DeviceDisplayTypes;
|
|
4
|
+
componentAttributes: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
} | undefined;
|
|
7
|
+
}) => {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
} | undefined;
|
|
10
|
+
//# sourceMappingURL=get-device-type-based-attributes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-device-type-based-attributes.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/get-device-type-based-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAM7C,eAAO,MAAM,4BAA4B,gDAGtC;IACD,iBAAiB,EAAE,MAAM,OAAO,kBAAkB,CAAC;IACnD,mBAAmB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CACzD,KAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,SAoD5B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const getMergedAttributes: ({ defaultAttributes, userModifiedAttributes, }: {
|
|
2
|
+
defaultAttributes: {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
} | undefined;
|
|
5
|
+
userModifiedAttributes: {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
} | undefined;
|
|
8
|
+
}) => {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
} | undefined;
|
|
11
|
+
//# sourceMappingURL=get-merged-attributes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-merged-attributes.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/get-merged-attributes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,mDAG7B;IACD,iBAAiB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;IACtD,sBAAsB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CAC5D,KAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,SAU5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has-items.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/has-items.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,eAAO,MAAM,QAAQ,UAAW,KAAK,GAAG,SAAS,wBAQhD,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export * from './constants';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export * from './background-image-types';
|
|
4
|
+
export * from './box-spacing-types';
|
|
5
|
+
export * from './cloudinary-image-url';
|
|
6
|
+
export * from './css-color-types';
|
|
7
|
+
export * from './css-enum-types';
|
|
8
|
+
export * from './css-variable-types';
|
|
9
|
+
export * from './border-types';
|
|
10
|
+
export * from './box-shadow-types';
|
|
11
|
+
export * from './line-height-types';
|
|
12
|
+
export * from './opacity-types';
|
|
13
|
+
export { boxSpacingStyleAttributeEntries } from './box-spacing-style-attribute-entries';
|
|
14
|
+
export { objectStyleAttributeRegistry, formatObjectStyleAttribute, } from './object-style-attribute-registry';
|
|
15
|
+
export type { ObjectStyleAttributeEntry } from './object-style-attribute-registry';
|
|
16
|
+
export { formatBackgroundImageStyles } from './format-background-image-styles';
|
|
17
|
+
export { formatBoxSpacingStyles } from './format-box-spacing-styles';
|
|
18
|
+
export { formatCssLengthStyles } from './format-css-length-styles';
|
|
19
|
+
export { formatCssColorStyles } from './format-css-color-styles';
|
|
20
|
+
export { formatCssEnumStyles } from './format-css-enum-styles';
|
|
21
|
+
export { formatBorderStyles } from './format-border-styles';
|
|
22
|
+
export { formatBoxShadowStyles } from './format-box-shadow-styles';
|
|
23
|
+
export { formatOpacityStyles } from './format-opacity-styles';
|
|
24
|
+
export { formatLineHeightStyles } from './format-line-height-styles';
|
|
25
|
+
export { formatSpacingSideValue } from './format-spacing-side-value';
|
|
26
|
+
export { deriveDisplayFlexIfNeeded } from './derive-display-flex-if-needed';
|
|
27
|
+
export { getDefaultDimensionAttributes } from './get-default-dimension-attributes';
|
|
28
|
+
export { getDeviceTypeBasedAttributes } from './get-device-type-based-attributes';
|
|
29
|
+
export { getMergedAttributes } from './get-merged-attributes';
|
|
30
|
+
export { getColumnAttributes } from './get-column-attributes';
|
|
31
|
+
export { getComponentAttributesAndStyles } from './get-component-attributes-and-styles';
|
|
32
|
+
export { hasItems } from './has-items';
|
|
33
|
+
export { DEFAULT_ROW_GAP, isRowHiddenForDevice, resolveRowStyles, rowBasedPropertiesAreAssigned, } from './resolve-row-styles';
|
|
34
|
+
export { HIDE_WIDGET_ATTRIBUTE_NAME, WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE, isWidgetHiddenForDevice, resolveWidgetContainerStyles, widgetBasedPropertiesAreAssigned, } from './resolve-widget-container-styles';
|
|
35
|
+
export type { WidgetContainerStyles } from './resolve-widget-container-styles';
|
|
36
|
+
export { CSS_CLASSES_ATTRIBUTE_NAME, normalizeCssClasses } from './css-classes';
|
|
37
|
+
export { COMPONENT_PROPS_PATH_SEPARATOR, resolveWidgetInstanceProps, } from './resolve-widget-instance-props';
|
|
38
|
+
export { collectComponentInstancePaths } from './collect-component-instance-paths';
|
|
39
|
+
export { findUnmatchedComponentPropsKeys, warnUnmatchedComponentProps, } from './warn-unmatched-component-props';
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,0BAA0B,EAC1B,yCAAyC,EACzC,uBAAuB,EACvB,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,GAC5B,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SpacingSideValue } from './box-spacing-types';
|
|
2
|
+
import { CssVariableCarrier } from './css-variable-types';
|
|
3
|
+
/**
|
|
4
|
+
* line-height accepts a unitless multiplier (e.g. 1.5), a length/keyword, or a
|
|
5
|
+
* design token from the embedding application.
|
|
6
|
+
*/
|
|
7
|
+
export type LineHeightValue = ({
|
|
8
|
+
unit: 'number';
|
|
9
|
+
value: number;
|
|
10
|
+
} & CssVariableCarrier) | SpacingSideValue;
|
|
11
|
+
export declare const isLineHeightValue: (value: unknown) => value is LineHeightValue;
|
|
12
|
+
//# sourceMappingURL=line-height-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-height-types.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/line-height-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EACL,kBAAkB,EAGnB,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,MAAM,MAAM,eAAe,GACvB,CAAC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CAAC,GACxD,gBAAgB,CAAC;AAErB,eAAO,MAAM,iBAAiB,UAAW,OAAO,KAAG,KAAK,IAAI,eAuB3D,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SpacingCapabilities } from './box-spacing-types';
|
|
2
|
+
/**
|
|
3
|
+
* Unified registry for object-valued (and other non-legacy) style attributes.
|
|
4
|
+
* Adding a new style attribute is usually: one entry here + the matching
|
|
5
|
+
* keys in DIMENSION_STYLE_KEYS (noContainer wrapper allowlist). Composer UI can
|
|
6
|
+
* land later without another widget-react release.
|
|
7
|
+
*/
|
|
8
|
+
export type ObjectStyleAttributeEntry = {
|
|
9
|
+
kind: 'boxSpacing';
|
|
10
|
+
cssProperty: string;
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'length';
|
|
13
|
+
cssProperty: string;
|
|
14
|
+
capabilities?: SpacingCapabilities;
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'border';
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'boxShadow';
|
|
19
|
+
} | {
|
|
20
|
+
kind: 'color';
|
|
21
|
+
cssProperty: string;
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'opacity';
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'enum';
|
|
26
|
+
cssProperty: string;
|
|
27
|
+
allowedValues: readonly string[];
|
|
28
|
+
} | {
|
|
29
|
+
kind: 'lineHeight';
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'backgroundImage';
|
|
32
|
+
};
|
|
33
|
+
export declare const objectStyleAttributeRegistry: {
|
|
34
|
+
[attributeName: string]: ObjectStyleAttributeEntry;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Formats a flattened leaf for a registered object-style attribute into React
|
|
38
|
+
* style entries. Returns {} when the attribute is unknown or the leaf is
|
|
39
|
+
* malformed (graceful degradation).
|
|
40
|
+
*/
|
|
41
|
+
export declare const formatObjectStyleAttribute: (attributeName: string, leaf: unknown) => {
|
|
42
|
+
[styleKey: string]: string | number;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=object-style-attribute-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-style-attribute-registry.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/object-style-attribute-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AA4B1D;;;;;GAKG;AACH,MAAM,MAAM,yBAAyB,GACjC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,mBAAmB,CAAA;CAAE,GAC3E;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACvE;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,GACtB;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAEhC,eAAO,MAAM,4BAA4B,EAAE;IACzC,CAAC,aAAa,EAAE,MAAM,GAAG,yBAAyB,CAAC;CAyKpD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,kBACtB,MAAM,QACf,OAAO,KACZ;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CA4BvC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CssVariableValue } from './css-variable-types';
|
|
2
|
+
/**
|
|
3
|
+
* Opacity leaf: a finite number in [0, 1], or a design token from the
|
|
4
|
+
* embedding application. Like enums, a bare number has nowhere to hang the
|
|
5
|
+
* token, so a tokenised opacity arrives as `{ cssVariable }`.
|
|
6
|
+
*/
|
|
7
|
+
export type OpacityValue = number | CssVariableValue;
|
|
8
|
+
export declare const isOpacityValue: (value: unknown) => value is OpacityValue;
|
|
9
|
+
//# sourceMappingURL=opacity-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opacity-types.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/opacity-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAGjB,MAAM,sBAAsB,CAAC;AAE9B;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,gBAAgB,CAAC;AAErD,eAAO,MAAM,cAAc,UAAW,OAAO,KAAG,KAAK,IAAI,YAKxD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DeviceDisplayTypes, DisplayItemRow } from './types';
|
|
2
|
+
export declare const DEFAULT_ROW_GAP = "var(--sl-spacing-x-small)";
|
|
3
|
+
/**
|
|
4
|
+
* True when the row should mount a real flex wrapper so styles have a DOM
|
|
5
|
+
* target — matching the column idea that assigned attributes imply a container.
|
|
6
|
+
*/
|
|
7
|
+
export declare function rowBasedPropertiesAreAssigned(row: DisplayItemRow): boolean;
|
|
8
|
+
export declare function isRowHiddenForDevice({ row, deviceDisplayType, }: {
|
|
9
|
+
row: DisplayItemRow;
|
|
10
|
+
deviceDisplayType: keyof typeof DeviceDisplayTypes;
|
|
11
|
+
}): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Flatten rowAttributes for the device, then overlay layout defaults with
|
|
14
|
+
* fallback to legacy first-class fields on DisplayItemRow.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveRowStyles({ row, deviceDisplayType, isComposeMode, }: {
|
|
17
|
+
row: DisplayItemRow;
|
|
18
|
+
deviceDisplayType: keyof typeof DeviceDisplayTypes;
|
|
19
|
+
isComposeMode: boolean;
|
|
20
|
+
}): {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=resolve-row-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-row-styles.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/resolve-row-styles.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,cAAc,EAEf,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,eAAe,8BAA8B,CAAC;AAE3D;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAW1E;AAED,wBAAgB,oBAAoB,CAAC,EACnC,GAAG,EACH,iBAAiB,GAClB,EAAE;IACD,GAAG,EAAE,cAAc,CAAC;IACpB,iBAAiB,EAAE,MAAM,OAAO,kBAAkB,CAAC;CACpD,GAAG,OAAO,CAUV;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,iBAAiB,EACjB,aAAa,GACd,EAAE;IACD,GAAG,EAAE,cAAc,CAAC;IACpB,iBAAiB,EAAE,MAAM,OAAO,kBAAkB,CAAC;IACnD,aAAa,EAAE,OAAO,CAAC;CACxB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAyDzB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { DeviceDisplayTypes } from './types';
|
|
2
|
+
export declare const HIDE_WIDGET_ATTRIBUTE_NAME = "hide-component-3-resolutions";
|
|
3
|
+
/**
|
|
4
|
+
* Widget-level settings the editing canvas must not apply.
|
|
5
|
+
*
|
|
6
|
+
* The canvas is a drag-and-drop surface, not a scaled preview. A widget pinned
|
|
7
|
+
* to 400px, inset by margin, or clipped by overflow leaves the author with
|
|
8
|
+
* nowhere to drop the next component, and a hidden widget leaves nothing to
|
|
9
|
+
* edit at all. Preview and consuming apps apply every one of these.
|
|
10
|
+
*
|
|
11
|
+
* Flex layout, gap, colors, typography, opacity and CSS classes are absent
|
|
12
|
+
* deliberately: they change how the canvas looks without taking away the room
|
|
13
|
+
* or the affordances the author needs to keep working.
|
|
14
|
+
*/
|
|
15
|
+
export declare const WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE: readonly ["width-3-resolutions", "min-width-3-resolutions", "max-width-3-resolutions", "height-3-resolutions", "min-height-3-resolutions", "max-height-3-resolutions", "margin-3-resolutions", "padding-3-resolutions", "border-3-resolutions", "border-radius-3-resolutions", "box-shadow-3-resolutions", "overflow-3-resolutions", "overflow-x-3-resolutions", "overflow-y-3-resolutions", "hide-component-3-resolutions"];
|
|
16
|
+
export type WidgetContainerStyles = {
|
|
17
|
+
styles: {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
};
|
|
20
|
+
cssClasses?: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* True when the author asked for the whole widget to be hidden at this device
|
|
24
|
+
* width. Callers must skip this in compose mode — see
|
|
25
|
+
* WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE.
|
|
26
|
+
*/
|
|
27
|
+
export declare function isWidgetHiddenForDevice({ containerAttributes, deviceDisplayType, }: {
|
|
28
|
+
containerAttributes: {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
} | undefined;
|
|
31
|
+
deviceDisplayType: keyof typeof DeviceDisplayTypes;
|
|
32
|
+
}): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Flatten the widget's own containerAttributes for the device into inline
|
|
35
|
+
* styles plus author CSS classes, dropping the settings the canvas cannot
|
|
36
|
+
* honour while in compose mode.
|
|
37
|
+
*
|
|
38
|
+
* The legacy raw `cssAttrArray` container CSS is untouched by this: it is not a
|
|
39
|
+
* `*-3-resolutions` key, so it never reaches here and keeps being emitted as a
|
|
40
|
+
* scoped style tag by EmbedInVerticalContainerIfRequired.
|
|
41
|
+
*/
|
|
42
|
+
export declare function resolveWidgetContainerStyles({ containerAttributes, deviceDisplayType, isComposeMode, }: {
|
|
43
|
+
containerAttributes: {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
} | undefined;
|
|
46
|
+
deviceDisplayType: keyof typeof DeviceDisplayTypes;
|
|
47
|
+
isComposeMode: boolean;
|
|
48
|
+
}): WidgetContainerStyles;
|
|
49
|
+
/**
|
|
50
|
+
* True when the widget carries settings that need a real DOM element to land
|
|
51
|
+
* on, so the vertical container has to be emitted even where it would
|
|
52
|
+
* otherwise collapse away. Mirrors rowBasedPropertiesAreAssigned.
|
|
53
|
+
*/
|
|
54
|
+
export declare function widgetBasedPropertiesAreAssigned(widgetContainerStyles: WidgetContainerStyles): boolean;
|
|
55
|
+
//# sourceMappingURL=resolve-widget-container-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-widget-container-styles.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/resolve-widget-container-styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,0BAA0B,iCAAiC,CAAC;AAEzE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yCAAyC,8ZAgB5C,CAAC;AAMX,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE;IACD,mBAAmB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;IACxD,iBAAiB,EAAE,MAAM,OAAO,kBAAkB,CAAC;CACpD,GAAG,OAAO,CAUV;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,GACd,EAAE;IACD,mBAAmB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;IACxD,iBAAiB,EAAE,MAAM,OAAO,kBAAkB,CAAC;IACnD,aAAa,EAAE,OAAO,CAAC;CACxB,GAAG,qBAAqB,CA0BxB;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,qBAAqB,EAAE,qBAAqB,GAC3C,OAAO,CAKT"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentPropsMap, WidgetInstanceProps } from './types';
|
|
2
|
+
export declare const COMPONENT_PROPS_PATH_SEPARATOR = "/";
|
|
3
|
+
/**
|
|
4
|
+
* Picks the host-supplied props for one component instance out of the
|
|
5
|
+
* `componentProps` map.
|
|
6
|
+
*
|
|
7
|
+
* `ancestorColumnIds` are the columns holding the enclosing collections,
|
|
8
|
+
* outermost first; `columnId` is the instance's own column. A key matches when
|
|
9
|
+
* its segments are the tail of that path, which is what lets a bare column id
|
|
10
|
+
* address every copy of a repeated collection while a longer path narrows to
|
|
11
|
+
* one. Longest match wins, so a specific path always beats a bare id.
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveWidgetInstanceProps({ componentProps, ancestorColumnIds, columnId, }: {
|
|
14
|
+
componentProps?: ComponentPropsMap;
|
|
15
|
+
ancestorColumnIds?: string[];
|
|
16
|
+
columnId: string;
|
|
17
|
+
}): WidgetInstanceProps | undefined;
|
|
18
|
+
//# sourceMappingURL=resolve-widget-instance-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-widget-instance-props.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/resolve-widget-instance-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEjE,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAElD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,cAAc,EACd,iBAAiB,EACjB,QAAQ,GACT,EAAE;IACD,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,mBAAmB,GAAG,SAAS,CAgBlC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
export type PageViewType = 'Preview' | 'Compose' | 'RenderedPage';
|
|
2
|
+
export declare const PageViewTypes: {
|
|
3
|
+
Preview: PageViewType;
|
|
4
|
+
Compose: PageViewType;
|
|
5
|
+
RenderedPage: PageViewType;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Extra props a host application supplies for one component instance, handed
|
|
9
|
+
* to the component as `widgetInstanceProps`. Opaque to widget-react: it
|
|
10
|
+
* forwards the bag and never inspects it, so whether a key means anything is
|
|
11
|
+
* entirely up to the component that receives it.
|
|
12
|
+
*/
|
|
13
|
+
export type WidgetInstanceProps = {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Host-supplied per-instance props, keyed by the column id of the component
|
|
18
|
+
* instance they are meant for. Column ids are the UUIDs persisted in the
|
|
19
|
+
* widget config; the composer's Modify drawer shows the selected one.
|
|
20
|
+
*
|
|
21
|
+
* A key may be a single column id or a `/`-separated path of column ids
|
|
22
|
+
* ending at the target, where the leading segments are the columns holding
|
|
23
|
+
* the enclosing collections:
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* {
|
|
27
|
+
* 'b721c4e2-…': { onClick: handleCta }, // any column with this id
|
|
28
|
+
* 'a3f9d180-…/b721c4e2-…': { onClick: handleCta }, // …only inside that collection column
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* A key matches when its segments are the tail of the instance's own path, so
|
|
33
|
+
* a bare column id applies to every copy of a collection embedded more than
|
|
34
|
+
* once, and adding parent segments narrows it. When several keys match, the
|
|
35
|
+
* one with the most segments wins.
|
|
36
|
+
*/
|
|
37
|
+
export type ComponentPropsMap = {
|
|
38
|
+
[key: string]: WidgetInstanceProps;
|
|
39
|
+
};
|
|
40
|
+
export type DisplayItemType = 'droppable-box' | string;
|
|
41
|
+
export declare const DisplayItemTypes: {
|
|
42
|
+
DroppableBox: DisplayItemType;
|
|
43
|
+
};
|
|
44
|
+
export type JustifyContentValues = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
45
|
+
export declare const JustifyContentTypes: {
|
|
46
|
+
FlexStart: JustifyContentValues;
|
|
47
|
+
FlexEnd: JustifyContentValues;
|
|
48
|
+
Center: JustifyContentValues;
|
|
49
|
+
SpaceBetween: JustifyContentValues;
|
|
50
|
+
SpaceAround: JustifyContentValues;
|
|
51
|
+
SpaceEvenly: JustifyContentValues;
|
|
52
|
+
};
|
|
53
|
+
export type AlignItemsValues = 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
|
|
54
|
+
export type AlignContentValues = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly' | 'stretch';
|
|
55
|
+
export declare const AlignContentTypes: {
|
|
56
|
+
FlexStart: AlignContentValues;
|
|
57
|
+
FlexEnd: AlignContentValues;
|
|
58
|
+
Center: AlignContentValues;
|
|
59
|
+
SpaceBetween: AlignContentValues;
|
|
60
|
+
SpaceAround: AlignContentValues;
|
|
61
|
+
SpaceEvenly: AlignContentValues;
|
|
62
|
+
Stretch: AlignContentValues;
|
|
63
|
+
};
|
|
64
|
+
export type Items = {
|
|
65
|
+
rows: DisplayItemRow[];
|
|
66
|
+
containerAttributes?: {
|
|
67
|
+
[key: string]: any;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export type DisplayItemRow = {
|
|
71
|
+
id: string;
|
|
72
|
+
horizontalAlignment?: JustifyContentValues;
|
|
73
|
+
verticalAlignment?: AlignItemsValues;
|
|
74
|
+
/** CSS gap between columns. When unset, the renderer keeps its default spacing. */
|
|
75
|
+
gap?: string;
|
|
76
|
+
/**
|
|
77
|
+
* How wrapped lines of columns pack along the cross axis. Only visible when
|
|
78
|
+
* flex-wrap is on and the row has more than one line (often also needs a
|
|
79
|
+
* taller row than its content).
|
|
80
|
+
*/
|
|
81
|
+
alignContent?: AlignContentValues;
|
|
82
|
+
columns: DisplayItemColumn[];
|
|
83
|
+
flexWrap?: 'wrap' | 'nowrap';
|
|
84
|
+
/**
|
|
85
|
+
* Per-row style/layout attributes (same `*-3-resolutions` shape as column
|
|
86
|
+
* `componentAttributes`). Preferred over the legacy first-class layout
|
|
87
|
+
* fields above when both are present; see resolveRowStyles.
|
|
88
|
+
*/
|
|
89
|
+
rowAttributes?: {
|
|
90
|
+
[key: string]: any;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export type DisplayItemColumn = {
|
|
94
|
+
id: string;
|
|
95
|
+
type: DisplayItemType;
|
|
96
|
+
/**
|
|
97
|
+
* The component library providing this component's type. Absent (or
|
|
98
|
+
* "default") resolves to the default library — existing configs unchanged.
|
|
99
|
+
* Never set for collection types.
|
|
100
|
+
*/
|
|
101
|
+
libraryId?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Per-column attribute values as persisted in published payloads written
|
|
104
|
+
* after the persisted-key migration. Readers must check this key first
|
|
105
|
+
* (see getColumnAttributes).
|
|
106
|
+
*/
|
|
107
|
+
componentAttributes?: {
|
|
108
|
+
[key: string]: any;
|
|
109
|
+
};
|
|
110
|
+
/** @deprecated Legacy persisted field name. Newer payloads use componentAttributes; readers must check componentAttributes first. */
|
|
111
|
+
widgetAttributes?: {
|
|
112
|
+
[key: string]: any;
|
|
113
|
+
};
|
|
114
|
+
collection?: WidgetCollection;
|
|
115
|
+
};
|
|
116
|
+
export type WidgetCollection = {
|
|
117
|
+
id: string;
|
|
118
|
+
name: string;
|
|
119
|
+
userFriendlyName?: string;
|
|
120
|
+
parentId?: string;
|
|
121
|
+
collectionRows: Items;
|
|
122
|
+
notAvailableToAdd?: boolean;
|
|
123
|
+
};
|
|
124
|
+
export declare const cssAttrArrayKey = "cssAttrArray";
|
|
125
|
+
export type DeviceDisplayType = 'phone' | 'tablet' | 'desktop';
|
|
126
|
+
export declare const DeviceDisplayTypes: {
|
|
127
|
+
Phone: DeviceDisplayType;
|
|
128
|
+
Tablet: DeviceDisplayType;
|
|
129
|
+
Desktop: DeviceDisplayType;
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentPropsMap, Items, WidgetCollection } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Names the `componentProps` keys that address no component in this config.
|
|
4
|
+
*
|
|
5
|
+
* A key that matches nothing is silent at render time — the props are simply
|
|
6
|
+
* never handed to anything — and the usual causes are a typo, a column that
|
|
7
|
+
* was deleted and re-added with a fresh id, or a path whose parent segment is
|
|
8
|
+
* wrong. Returns the offending keys so the caller decides how to report them.
|
|
9
|
+
*/
|
|
10
|
+
export declare function findUnmatchedComponentPropsKeys({ componentProps, displayItemList, widgetCollections, }: {
|
|
11
|
+
componentProps: ComponentPropsMap | undefined;
|
|
12
|
+
displayItemList: Items | undefined;
|
|
13
|
+
widgetCollections: {
|
|
14
|
+
[key: string]: WidgetCollection;
|
|
15
|
+
} | undefined;
|
|
16
|
+
}): string[];
|
|
17
|
+
/**
|
|
18
|
+
* Development-only console warning for `componentProps` keys that address
|
|
19
|
+
* nothing. Silent in production: a stale key is a wiring mistake to catch
|
|
20
|
+
* while building, not noise on a customer's page.
|
|
21
|
+
*/
|
|
22
|
+
export declare function warnUnmatchedComponentProps({ componentProps, displayItemList, widgetCollections, publishedKey, }: {
|
|
23
|
+
componentProps: ComponentPropsMap | undefined;
|
|
24
|
+
displayItemList: Items | undefined;
|
|
25
|
+
widgetCollections: {
|
|
26
|
+
[key: string]: WidgetCollection;
|
|
27
|
+
} | undefined;
|
|
28
|
+
publishedKey: string;
|
|
29
|
+
}): void;
|
|
30
|
+
//# sourceMappingURL=warn-unmatched-component-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warn-unmatched-component-props.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/warn-unmatched-component-props.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAOrE;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,EAC9C,cAAc,EACd,eAAe,EACf,iBAAiB,GAClB,EAAE;IACD,cAAc,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC9C,eAAe,EAAE,KAAK,GAAG,SAAS,CAAC;IACnC,iBAAiB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;KAAE,GAAG,SAAS,CAAC;CACpE,GAAG,MAAM,EAAE,CAYX;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,YAAY,GACb,EAAE;IACD,cAAc,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC9C,eAAe,EAAE,KAAK,GAAG,SAAS,CAAC;IACnC,iBAAiB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;KAAE,GAAG,SAAS,CAAC;IACnE,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAuBP"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const DIMENSION_STYLE_KEYS: readonly ["minWidth", "maxWidth", "minHeight", "maxHeight", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "borderWidth", "borderStyle", "borderColor", "border", "borderRadius", "boxShadow", "width", "height", "gap", "display", "justifyContent", "alignItems", "flexWrap", "alignContent", "flexDirection", "overflow", "overflowX", "overflowY", "backgroundColor", "backgroundImage", "backgroundSize", "backgroundPosition", "backgroundRepeat", "opacity", "fontFamily", "fontSize", "fontWeight", "fontStyle", "color", "lineHeight", "letterSpacing", "textAlign", "textDecoration", "textTransform"];
|
|
2
|
+
type DimensionStyleKey = (typeof DIMENSION_STYLE_KEYS)[number];
|
|
3
|
+
export declare const pickDimensionStyles: (styleProps?: Record<string, unknown>) => Partial<Record<DimensionStyleKey, unknown>>;
|
|
4
|
+
export declare const omitDimensionStyles: (styleProps?: Record<string, unknown>) => Record<string, unknown> | undefined;
|
|
5
|
+
export declare const hasDimensionStyles: (dimensionStyles: Record<string, unknown>) => boolean;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=dimension-wrapper-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dimension-wrapper-styles.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers-display/dimension-wrapper-styles.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,oBAAoB,grBAoDhB,CAAC;AAEX,KAAK,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAK/D,eAAO,MAAM,mBAAmB,gBACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACnC,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAe5C,CAAC;AAEF,eAAO,MAAM,mBAAmB,gBACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAW5B,CAAC;AAEF,eAAO,MAAM,kBAAkB,oBAAqB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAClC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { LibraryComponentEntry, NoContainerResolverContext } from '../library-registry/types';
|
|
2
|
+
/**
|
|
3
|
+
* Decides whether a component needs the dimension-style wrapper div.
|
|
4
|
+
*
|
|
5
|
+
* A component library may answer per render by exposing `resolveNoContainer`,
|
|
6
|
+
* which takes precedence over the static `noContainer` flag on the same entry.
|
|
7
|
+
* Libraries that expose neither keep the historical default of `false`.
|
|
8
|
+
*
|
|
9
|
+
* A resolver that throws or returns a non-boolean is a bug in the library, not
|
|
10
|
+
* a reason to fail the page: it is reported and the static flag is used
|
|
11
|
+
* instead.
|
|
12
|
+
*/
|
|
13
|
+
export declare const resolveNoContainer: (entry: LibraryComponentEntry | undefined, context: NoContainerResolverContext) => boolean;
|
|
14
|
+
//# sourceMappingURL=resolve-no-container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-no-container.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers-display/resolve-no-container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,UACtB,qBAAqB,GAAG,SAAS,WAC/B,0BAA0B,KAClC,OAwBF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { LibraryComponentEntry, NoContainerResolverContext } from '../library-registry/types';
|
|
2
|
+
/**
|
|
3
|
+
* Decides whether a card's own root element can carry a `className` — i.e.
|
|
4
|
+
* whether the renderer can hand the card a class instead of wrapping it in a
|
|
5
|
+
* fresh `div` to carry one.
|
|
6
|
+
*
|
|
7
|
+
* Absence of a resolver defaults to `false`: a library that predates this
|
|
8
|
+
* contract gets a wrapper div instead, which is one extra element but never
|
|
9
|
+
* loses the class.
|
|
10
|
+
*
|
|
11
|
+
* A resolver that throws or returns a non-boolean is a bug in the library,
|
|
12
|
+
* not a reason to fail the page: it is reported and `false` is used instead.
|
|
13
|
+
*/
|
|
14
|
+
export declare const resolveRendersOwnElement: (entry: LibraryComponentEntry | undefined, context: NoContainerResolverContext) => boolean;
|
|
15
|
+
//# sourceMappingURL=resolve-renders-own-element.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-renders-own-element.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers-display/resolve-renders-own-element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,UAC5B,qBAAqB,GAAG,SAAS,WAC/B,0BAA0B,KAClC,OAuBF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-col-type-prefix.d.ts","sourceRoot":"","sources":["../../../src/lib/id-utils/collection-col-type-prefix.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,QAAyC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Prefix on RulesCMS client tokens for Development / non-publishable environments. */
|
|
2
|
+
export declare const DEV_CLIENT_TOKEN_PREFIX = "dev.";
|
|
3
|
+
/** Live draft API host — RulesCMS production (never relative / local). */
|
|
4
|
+
export declare const RULECMS_API_ORIGIN = "https://rulecms.com";
|
|
5
|
+
/** Published (cached) API host. */
|
|
6
|
+
export declare const WIDGET_CACHE_API_ORIGIN = "https://widget-cache.rulecms.com";
|
|
7
|
+
/** Published (cached) client API path. */
|
|
8
|
+
export declare const PUBLISHED_WIDGET_API_PATH = "/api/v1/c/widget/get";
|
|
9
|
+
/** Live draft client API path — no cache; reads the widget table directly. */
|
|
10
|
+
export declare const DEV_WIDGET_API_PATH = "/api/v1/c/dev/widget/get";
|
|
11
|
+
export declare function isDevClientToken(token: string | null | undefined): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Resolves the API origin. Consumers should not need to set `endpoint` —
|
|
14
|
+
* Development tokens hit RulesCMS; published tokens hit widget-cache.
|
|
15
|
+
* An explicit `endpoint` is only an override (e.g. tests).
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveWidgetApiOrigin(token: string, endpoint?: string): string;
|
|
18
|
+
export interface BuildWidgetFetchUrlParams {
|
|
19
|
+
/**
|
|
20
|
+
* For published mode this is the published key (`envId---widget-...`).
|
|
21
|
+
* For Development (`dev.` token) this is the live widget key (`widget-...`).
|
|
22
|
+
*/
|
|
23
|
+
publishedKey: string;
|
|
24
|
+
token: string;
|
|
25
|
+
/** Optional override. Defaults by token: rulecms.com (dev) or widget-cache (published). */
|
|
26
|
+
endpoint?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Builds the widget fetch URL. Development tokens (`dev.…`) hit the uncached
|
|
30
|
+
* draft endpoint with `widgetKey`; everything else uses the published API.
|
|
31
|
+
*/
|
|
32
|
+
export declare function buildWidgetFetchUrl({ publishedKey, token, endpoint, }: BuildWidgetFetchUrlParams): string;
|
|
33
|
+
//# sourceMappingURL=dev-client-token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-client-token.d.ts","sourceRoot":"","sources":["../../../src/lib/id-utils/dev-client-token.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,eAAO,MAAM,uBAAuB,SAAS,CAAC;AAE9C,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AAExD,mCAAmC;AACnC,eAAO,MAAM,uBAAuB,qCAAqC,CAAC;AAE1E,0CAA0C;AAC1C,eAAO,MAAM,yBAAyB,yBAAyB,CAAC;AAEhE,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAE9D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE1E;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAKR;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,YAAY,EACZ,KAAK,EACL,QAAQ,GACT,EAAE,yBAAyB,GAAG,MAAM,CAQpC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DragItemIdPrefixes, DragItemAndPrefix } from './types';
|
|
2
|
+
export declare const getDragItemId: ({ id, prefix }: DragItemAndPrefix) => string;
|
|
3
|
+
export declare const getDragItemPrefixAndId: (combinedVal?: string) => DragItemAndPrefix | undefined;
|
|
4
|
+
export declare const typeHasPrefix: (type: string) => boolean;
|
|
5
|
+
export declare const getIdAndPrefix: (combinedVal: string) => {
|
|
6
|
+
prefix: DragItemIdPrefixes;
|
|
7
|
+
id: string;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=drag-item-id-helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drag-item-id-helper.d.ts","sourceRoot":"","sources":["../../../src/lib/id-utils/drag-item-id-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEhE,eAAO,MAAM,aAAa,mBAAoB,iBAAiB,WAE9D,CAAC;AAEF,eAAO,MAAM,sBAAsB,iBACnB,MAAM,KACnB,iBAAiB,GAAG,SAMtB,CAAC;AAEF,eAAO,MAAM,aAAa,SAAU,MAAM,YAEzC,CAAC;AAEF,eAAO,MAAM,cAAc,gBAAiB,MAAM;YAQ5B,kBAAkB;;CAGvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-collection-id-for-collection-type.d.ts","sourceRoot":"","sources":["../../../src/lib/id-utils/get-collection-id-for-collection-type.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gCAAgC,kBAAmB,MAAM,uBAarE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-name-and-instance-id-from-widget-key.d.ts","sourceRoot":"","sources":["../../../src/lib/id-utils/get-name-and-instance-id-from-widget-key.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iCAAiC,cACjC,MAAM,KAChB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAkB7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-name-for-widget-key.d.ts","sourceRoot":"","sources":["../../../src/lib/id-utils/get-name-for-widget-key.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,cACpB,MAAM,KAChB;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CASxC,CAAC"}
|