@palmyit/elements 0.1.7 → 0.1.8

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.
Files changed (70) hide show
  1. package/dist/definitions.d.ts +23 -20
  2. package/dist/definitions.js +692 -686
  3. package/dist/elements/button/definition.d.ts +38 -0
  4. package/dist/elements/button/template.d.ts +2 -0
  5. package/dist/elements/checkbox/definition.d.ts +10 -0
  6. package/dist/elements/checkbox/template.d.ts +2 -0
  7. package/dist/elements/container/definition.d.ts +39 -0
  8. package/dist/elements/container/template.d.ts +2 -0
  9. package/dist/elements/divider/definition.d.ts +10 -0
  10. package/dist/elements/divider/template.d.ts +2 -0
  11. package/dist/elements/icon/definition.d.ts +18 -0
  12. package/dist/elements/icon/template.d.ts +2 -0
  13. package/dist/{schema/PImage/pImage.definition.d.ts → elements/image/definition.d.ts} +8 -8
  14. package/dist/elements/image/template.d.ts +2 -0
  15. package/dist/elements/list/definition.d.ts +11 -0
  16. package/dist/elements/list/template.d.ts +2 -0
  17. package/dist/elements/page/definition.d.ts +22 -0
  18. package/dist/elements/page/template.d.ts +2 -0
  19. package/dist/elements/radio/definition.d.ts +13 -0
  20. package/dist/elements/radio/template.d.ts +2 -0
  21. package/dist/elements/rich-text/definition.d.ts +8 -0
  22. package/dist/elements/rich-text/template.d.ts +2 -0
  23. package/dist/elements/section/definition.d.ts +39 -0
  24. package/dist/elements/section/template.d.ts +2 -0
  25. package/dist/elements/select/definition.d.ts +13 -0
  26. package/dist/elements/select/template.d.ts +2 -0
  27. package/dist/{schema/PTable/pTable.definition.d.ts → elements/table/definition.d.ts} +2 -2
  28. package/dist/elements/table/template.d.ts +2 -0
  29. package/dist/{schema/PText/pText.definition.d.ts → elements/text/definition.d.ts} +9 -9
  30. package/dist/elements/text/template.d.ts +2 -0
  31. package/dist/elements/text-area/definition.d.ts +10 -0
  32. package/dist/elements/text-area/template.d.ts +2 -0
  33. package/dist/elements/text-field/definition.d.ts +10 -0
  34. package/dist/elements/text-field/template.d.ts +2 -0
  35. package/dist/elements/video/definition.d.ts +10 -0
  36. package/dist/elements/video/template.d.ts +2 -0
  37. package/dist/manifest.json +2 -2
  38. package/dist/plmt-elements.css +2 -1
  39. package/dist/render/styleToClasses.d.ts +35 -0
  40. package/dist/render/styleTokens.d.ts +57 -0
  41. package/dist/render/types.d.ts +6 -0
  42. package/dist/schema/Fields/BackgroundField/backgroundValue.d.ts +4 -3
  43. package/dist/schema/backgroundStyleDefinitions.d.ts +1 -6
  44. package/dist/schema/elementRegistry.d.ts +14 -14
  45. package/dist/schema/elementStyleDefinitions.d.ts +1 -1
  46. package/dist/schema/style/elementStyle.d.ts +2 -2
  47. package/dist/schema/style/page-styles.d.ts +2 -2
  48. package/dist/schema/styleTokensSchema.d.ts +274 -0
  49. package/dist/styleToClasses-CZSWp6Ez.js +683 -0
  50. package/dist/templates/elementSpec.d.ts +2 -7
  51. package/dist/templates/helpers.d.ts +9 -1
  52. package/dist/templates.d.ts +3 -1
  53. package/dist/templates.js +252 -172
  54. package/package.json +3 -1
  55. package/dist/schema/PButton/pButton.definition.d.ts +0 -38
  56. package/dist/schema/PCheckbox/pCheckbox.definition.d.ts +0 -10
  57. package/dist/schema/PContainer/pContainer.definition.d.ts +0 -39
  58. package/dist/schema/PDivider/pDivider.definition.d.ts +0 -10
  59. package/dist/schema/PIcon/pIcon.definition.d.ts +0 -18
  60. package/dist/schema/PList/pList.definition.d.ts +0 -11
  61. package/dist/schema/PPage/pPage.definition.d.ts +0 -22
  62. package/dist/schema/PRadio/pRadio.definition.d.ts +0 -13
  63. package/dist/schema/PRichText/pRichText.definition.d.ts +0 -8
  64. package/dist/schema/PSection/pSection.definition.d.ts +0 -39
  65. package/dist/schema/PSelect/pSelect.definition.d.ts +0 -13
  66. package/dist/schema/PTextArea/pTextArea.definition.d.ts +0 -10
  67. package/dist/schema/PTextField/pTextField.definition.d.ts +0 -10
  68. package/dist/schema/PVideo/pVideo.definition.d.ts +0 -10
  69. /package/dist/{schema/PRichText → elements/rich-text}/richTextMarks.d.ts +0 -0
  70. /package/dist/{schema/PRichText → elements/rich-text}/richTextOptions.d.ts +0 -0
@@ -0,0 +1,35 @@
1
+ import { ElementType } from '../schema/elementConfiguration';
2
+ export type DeviceStyleProps = {
3
+ style?: Record<string, unknown>;
4
+ tabletStyle?: Record<string, unknown>;
5
+ mobileStyle?: Record<string, unknown>;
6
+ tabletLandscapeStyle?: Record<string, unknown>;
7
+ mobileLandscapeStyle?: Record<string, unknown>;
8
+ };
9
+ type VariantPrefix = '' | 'tablet:' | 'mobile:' | 'tablet-landscape:' | 'mobile-landscape:';
10
+ /**
11
+ * Turn one style object into utility classes. Values that cannot map onto a
12
+ * Tailwind token are collected in `unresolved` for CSS variables.
13
+ */
14
+ export declare function styleObjectToClasses(type: ElementType, style: Record<string, unknown> | undefined, variant?: VariantPrefix): {
15
+ classes: string[];
16
+ unresolved: Record<string, unknown>;
17
+ };
18
+ /**
19
+ * Classes for an element: type defaults, then desktop style, then device variants.
20
+ * Later entries win in the cascade when variants apply; within one breakpoint the
21
+ * last class for a conflicting property should not be duplicated by the caller.
22
+ */
23
+ export declare function styleToClasses(type: ElementType, props: DeviceStyleProps): string[];
24
+ /**
25
+ * Style keys that still need `--palmyit-*` variables (font family, gradients,
26
+ * off-scale lengths, hex colors outside the palette).
27
+ */
28
+ export declare function unresolvedStyleForVars(type: ElementType, style: Record<string, unknown> | undefined): Record<string, unknown>;
29
+ /** Convert page style tokens into values styleToCssVariables can write. */
30
+ export declare function pageTokensToVarValues(props: {
31
+ backgroundColor?: unknown;
32
+ textColor?: unknown;
33
+ textSize?: unknown;
34
+ }): Record<string, unknown>;
35
+ export {};
@@ -0,0 +1,57 @@
1
+ /** Spacing / sizing keys on Tailwind's default scale, plus auto. */
2
+ export declare const SPACING_TOKENS: readonly ["0", "px", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "5", "6", "7", "8", "9", "10", "11", "12", "14", "16", "20", "24", "28", "32", "36", "40", "44", "48", "52", "56", "60", "64", "72", "80", "96", "auto"];
3
+ export type SpacingToken = (typeof SPACING_TOKENS)[number];
4
+ export declare const BORDER_WIDTH_TOKENS: readonly ["0", "1", "2", "4", "8"];
5
+ export type BorderWidthToken = (typeof BORDER_WIDTH_TOKENS)[number];
6
+ export declare const RADIUS_TOKENS: readonly ["none", "sm", "md", "lg", "xl", "2xl", "3xl", "full", "0", "px", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "5", "6", "7", "8", "9", "10", "11", "12", "14", "16"];
7
+ export type RadiusToken = (typeof RADIUS_TOKENS)[number];
8
+ export declare const TEXT_SIZE_TOKENS: readonly ["xs", "sm", "base", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl"];
9
+ export type TextSizeToken = (typeof TEXT_SIZE_TOKENS)[number];
10
+ export declare const LEADING_TOKENS: readonly ["none", "tight", "snug", "normal", "relaxed", "loose", "3", "4", "5", "6", "7", "8", "9", "10"];
11
+ export type LeadingToken = (typeof LEADING_TOKENS)[number];
12
+ export declare const TRACKING_TOKENS: readonly ["tighter", "tight", "normal", "wide", "wider", "widest"];
13
+ export type TrackingToken = (typeof TRACKING_TOKENS)[number];
14
+ export declare const COLOR_NAMES: readonly ["accent", "transparent", "white", "black", "slate-50", "slate-100", "slate-200", "slate-300", "slate-400", "slate-500", "slate-600", "slate-700", "slate-800", "slate-900", "slate-950"];
15
+ export type ColorName = (typeof COLOR_NAMES)[number];
16
+ export declare const OPACITY_STEPS: readonly [0, 5, 10, 15, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100];
17
+ export type OpacityStep = (typeof OPACITY_STEPS)[number];
18
+ /** Palette color stored on an element. Hex colors remain supported for legacy docs. */
19
+ export type PaletteColor = {
20
+ name: ColorName;
21
+ opacity: OpacityStep;
22
+ };
23
+ export type StyleColor = PaletteColor | {
24
+ hex: string;
25
+ opacity: number;
26
+ };
27
+ export declare function isSpacingToken(value: string): value is SpacingToken;
28
+ export declare function isBorderWidthToken(value: string): value is BorderWidthToken;
29
+ export declare function isRadiusToken(value: string): value is RadiusToken;
30
+ export declare function isTextSizeToken(value: string): value is TextSizeToken;
31
+ export declare function isLeadingToken(value: string): value is LeadingToken;
32
+ export declare function isTrackingToken(value: string): value is TrackingToken;
33
+ export declare function isPaletteColor(value: unknown): value is PaletteColor;
34
+ export declare function isHexColor(value: unknown): value is {
35
+ hex: string;
36
+ opacity: number;
37
+ };
38
+ /** Map a CSS length (or token) onto the spacing scale when it lands exactly. */
39
+ export declare function toSpacingToken(value: unknown): SpacingToken | undefined;
40
+ export declare function toBorderWidthToken(value: unknown): BorderWidthToken | undefined;
41
+ export declare function toRadiusToken(value: unknown): RadiusToken | undefined;
42
+ export declare function toTextSizeToken(value: unknown): TextSizeToken | undefined;
43
+ export declare function toLeadingToken(value: unknown): LeadingToken | undefined;
44
+ export declare function toTrackingToken(value: unknown): TrackingToken | undefined;
45
+ export declare function toPaletteColor(value: unknown): PaletteColor | undefined;
46
+ export declare function fontWeightClass(value: unknown): string | undefined;
47
+ export declare function colorClass(prefix: 'bg' | 'text' | 'border', color: PaletteColor): string;
48
+ export declare function spacingClass(prefix: string, token: SpacingToken): string;
49
+ export declare function radiusClass(corner: string, token: RadiusToken): string;
50
+ export declare function borderWidthClass(token: BorderWidthToken): string;
51
+ export declare function textSizeClass(token: TextSizeToken): string;
52
+ export declare function leadingClass(token: LeadingToken): string;
53
+ export declare function trackingClass(token: TrackingToken): string;
54
+ /** CSS value for a text-size token, used for page theme variables. */
55
+ export declare function textSizeTokenToCss(token: TextSizeToken): string;
56
+ /** CSS value for a palette color (for page theme variables). */
57
+ export declare function paletteColorToCss(color: PaletteColor): string | undefined;
@@ -1,3 +1,4 @@
1
+ import { ElementType } from '../schema/elementConfiguration';
1
2
  export type ElementAttribute = string | number | boolean | undefined;
2
3
  export type CssVariables = Record<string, string | undefined>;
3
4
  export type ElementSpec = {
@@ -12,3 +13,8 @@ export type ElementSpecOptions = {
12
13
  /** Layout host children (from Puck slots or recursion). Ignored for leaf elements. */
13
14
  children?: Array<ElementSpec | string>;
14
15
  };
16
+ export type ShortcodeNode = {
17
+ type: ElementType;
18
+ props: Record<string, unknown>;
19
+ children?: ShortcodeNode[];
20
+ };
@@ -1,4 +1,4 @@
1
- import { ColorValue } from '../ColorField/color-value';
1
+ import { StyleColor } from '../../../render/styleTokens';
2
2
  export type BackgroundType = 'color' | 'gradient';
3
3
  export type GradientKind = 'linear' | 'radial';
4
4
  export type GradientValue = {
@@ -7,8 +7,9 @@ export type GradientValue = {
7
7
  };
8
8
  export type BackgroundStyle = {
9
9
  backgroundType: BackgroundType;
10
- backgroundColor: ColorValue;
11
- backgroundGradient: GradientValue;
10
+ backgroundColor: StyleColor;
11
+ /** Present only when the author picks a gradient fill. */
12
+ backgroundGradient?: GradientValue;
12
13
  };
13
14
  export declare const MAX_GRADIENT_ARGS_LENGTH = 200;
14
15
  export declare function isSafeGradientArgs(value: string): boolean;
@@ -1,10 +1,6 @@
1
- import { z } from 'zod';
2
1
  import { BackgroundStyle } from './Fields/BackgroundField/backgroundValue';
3
2
  import { StyleDefinition } from './styleItems';
4
- export declare const colorValue: z.ZodObject<{
5
- hex: z.ZodString;
6
- opacity: z.ZodNumber;
7
- }, z.core.$strict>;
3
+ export { colorValue } from './styleTokensSchema';
8
4
  type BackgroundDefinitionOptions = {
9
5
  /** Omit to leave every background key unset until the user picks one. */
10
6
  defaults?: BackgroundStyle;
@@ -12,4 +8,3 @@ type BackgroundDefinitionOptions = {
12
8
  typeAttribute?: string;
13
9
  };
14
10
  export declare function backgroundStyleDefinitions(prefix: string, { defaults, typeAttribute }?: BackgroundDefinitionOptions): StyleDefinition[];
15
- export {};
@@ -1,6 +1,6 @@
1
1
  import { ElementType } from './elementConfiguration';
2
2
  export declare const elementRegistry: {
3
- PPage: import('./elementConfiguration').ElementConfiguration<import('./PPage/pPage.definition').PPageRootProps>;
3
+ PPage: import('./elementConfiguration').ElementConfiguration<import('../definitions').PPageRootProps>;
4
4
  PSection: import('./elementConfiguration').ElementConfiguration<import('./layoutElementConfiguration').LayoutElementProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
5
5
  PContainer: import('./elementConfiguration').ElementConfiguration<import('./layoutElementConfiguration').LayoutElementProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
6
6
  PButton: import('./elementConfiguration').ElementConfiguration<import('./linkSettings').LinkSettings & {
@@ -8,33 +8,33 @@ export declare const elementRegistry: {
8
8
  name: string;
9
9
  startIcon: string;
10
10
  endIcon: string;
11
- style: import('./PButton/pButton.definition').ButtonStyle;
11
+ style: import('../definitions').ButtonStyle;
12
12
  } & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
13
13
  PText: import('./elementConfiguration').ElementConfiguration<import('./linkSettings').LinkSettings & {
14
14
  id: string;
15
15
  text: string;
16
- style: import('./PText/pText.definition').TextStyle;
16
+ style: import('../definitions').TextStyle;
17
17
  } & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
18
- PRichText: import('./elementConfiguration').ElementConfiguration<import('./PRichText/pRichText.definition').PRichTextDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
18
+ PRichText: import('./elementConfiguration').ElementConfiguration<import('../elements/rich-text/definition').PRichTextDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
19
19
  PImage: import('./elementConfiguration').ElementConfiguration<import('./linkSettings').LinkSettings & {
20
20
  id: string;
21
21
  src: string;
22
22
  alt: string;
23
- style: import('./PImage/pImage.definition').ImageStyle;
23
+ style: import('../definitions').ImageStyle;
24
24
  } & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
25
- PVideo: import('./elementConfiguration').ElementConfiguration<import('./PVideo/pVideo.definition').PVideoDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
26
- PList: import('./elementConfiguration').ElementConfiguration<import('./PList/pList.definition').PListDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
25
+ PVideo: import('./elementConfiguration').ElementConfiguration<import('../elements/video/definition').PVideoDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
26
+ PList: import('./elementConfiguration').ElementConfiguration<import('../elements/list/definition').PListDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
27
27
  PIcon: import('./elementConfiguration').ElementConfiguration<import('./linkSettings').LinkSettings & {
28
28
  id: string;
29
29
  icon: string;
30
30
  label: string;
31
31
  } & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
32
- PDivider: import('./elementConfiguration').ElementConfiguration<import('./PDivider/pDivider.definition').PDividerDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
33
- PTextField: import('./elementConfiguration').ElementConfiguration<import('./PTextField/pTextField.definition').PTextFieldDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
34
- PTextArea: import('./elementConfiguration').ElementConfiguration<import('./PTextArea/pTextArea.definition').PTextAreaDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
35
- PCheckbox: import('./elementConfiguration').ElementConfiguration<import('./PCheckbox/pCheckbox.definition').PCheckboxDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
36
- PRadio: import('./elementConfiguration').ElementConfiguration<import('./PRadio/pRadio.definition').PRadioDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
37
- PSelect: import('./elementConfiguration').ElementConfiguration<import('./PSelect/pSelect.definition').PSelectDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
38
- PTable: import('./elementConfiguration').ElementConfiguration<import('./PTable/pTable.definition').PTableDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
32
+ PDivider: import('./elementConfiguration').ElementConfiguration<import('../elements/divider/definition').PDividerDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
33
+ PTextField: import('./elementConfiguration').ElementConfiguration<import('../elements/text-field/definition').PTextFieldDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
34
+ PTextArea: import('./elementConfiguration').ElementConfiguration<import('../elements/text-area/definition').PTextAreaDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
35
+ PCheckbox: import('./elementConfiguration').ElementConfiguration<import('../elements/checkbox/definition').PCheckboxDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
36
+ PRadio: import('./elementConfiguration').ElementConfiguration<import('../elements/radio/definition').PRadioDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
37
+ PSelect: import('./elementConfiguration').ElementConfiguration<import('../elements/select/definition').PSelectDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
38
+ PTable: import('./elementConfiguration').ElementConfiguration<import('../elements/table/definition').PTableDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
39
39
  };
40
40
  export declare function isElementType(value: unknown): value is ElementType;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { ElementStyle, ElementStyleKind } from './style/elementStyle';
3
3
  import { StyleDefinition } from './styleItems';
4
- export declare const lengthValue: z.ZodString;
4
+ export { lengthValue, colorValue, borderWidthValue } from './styleTokensSchema';
5
5
  export declare const lengthKeys: readonly [readonly ["width", "width", "Width"], readonly ["height", "height", "Height"], readonly ["minWidth", "min-width", "Min width"], readonly ["minHeight", "min-height", "Min height"], readonly ["maxWidth", "max-width", "Max width"], readonly ["maxHeight", "max-height", "Max height"], readonly ["paddingTop", "padding-top", "Padding top"], readonly ["paddingBottom", "padding-bottom", "Padding bottom"], readonly ["paddingLeft", "padding-left", "Padding left"], readonly ["paddingRight", "padding-right", "Padding right"], readonly ["marginTop", "margin-top", "Margin top"], readonly ["marginBottom", "margin-bottom", "Margin bottom"], readonly ["marginLeft", "margin-left", "Margin left"], readonly ["marginRight", "margin-right", "Margin right"], readonly ["borderRadiusTopLeft", "border-top-left-radius", "Radius top left"], readonly ["borderRadiusTopRight", "border-top-right-radius", "Radius top right"], readonly ["borderRadiusBottomRight", "border-bottom-right-radius", "Radius bottom right"], readonly ["borderRadiusBottomLeft", "border-bottom-left-radius", "Radius bottom left"]];
6
6
  export type LengthKey = (typeof lengthKeys)[number][0];
7
7
  export declare function elementStyleDefinitions(kind: ElementStyleKind, defaults: ElementStyle): StyleDefinition[];
@@ -1,5 +1,5 @@
1
1
  import { BackgroundStyle } from '../Fields/BackgroundField/backgroundValue';
2
- import { ColorValue } from '../Fields/ColorField/color-value';
2
+ import { StyleColor } from '../../render/styleTokens';
3
3
  export declare const BORDER_LINE_STYLES: readonly ["none", "solid", "dashed", "dotted", "double"];
4
4
  export type BorderLineStyle = (typeof BORDER_LINE_STYLES)[number];
5
5
  export declare const FLEX_DIRECTIONS: readonly ["row", "column", "row-reverse", "column-reverse"];
@@ -49,7 +49,7 @@ export type ElementStyle = {
49
49
  borderRadiusBottomLeft: string;
50
50
  borderWidth: string;
51
51
  borderStyle: BorderLineStyle;
52
- borderColor: ColorValue;
52
+ borderColor: StyleColor;
53
53
  } & BackgroundStyle;
54
54
  export declare const defaultElementStyle: ElementStyle;
55
55
  export declare const LENGTH_PATTERN: RegExp;
@@ -1,3 +1,3 @@
1
- import { ColorValue } from '../Fields/ColorField/color-value';
2
- export declare function colorValueToCss(value: ColorValue): string | undefined;
1
+ import { StyleColor } from '../../render/styleTokens';
2
+ export declare function colorValueToCss(value: StyleColor): string | undefined;
3
3
  export declare function textSizeToCss(size: number): string | undefined;
@@ -0,0 +1,274 @@
1
+ import { z } from 'zod';
2
+ declare const spacingToken: z.ZodEnum<{
3
+ 0: "0";
4
+ px: "px";
5
+ 0.5: "0.5";
6
+ 1: "1";
7
+ 1.5: "1.5";
8
+ 2: "2";
9
+ 2.5: "2.5";
10
+ 3: "3";
11
+ 3.5: "3.5";
12
+ 4: "4";
13
+ 5: "5";
14
+ 6: "6";
15
+ 7: "7";
16
+ 8: "8";
17
+ 9: "9";
18
+ 10: "10";
19
+ 11: "11";
20
+ 12: "12";
21
+ 14: "14";
22
+ 16: "16";
23
+ 20: "20";
24
+ 24: "24";
25
+ 28: "28";
26
+ 32: "32";
27
+ 36: "36";
28
+ 40: "40";
29
+ 44: "44";
30
+ 48: "48";
31
+ 52: "52";
32
+ 56: "56";
33
+ 60: "60";
34
+ 64: "64";
35
+ 72: "72";
36
+ 80: "80";
37
+ 96: "96";
38
+ auto: "auto";
39
+ }>;
40
+ declare const borderWidthToken: z.ZodEnum<{
41
+ 0: "0";
42
+ 1: "1";
43
+ 2: "2";
44
+ 4: "4";
45
+ 8: "8";
46
+ }>;
47
+ declare const radiusToken: z.ZodEnum<{
48
+ 0: "0";
49
+ px: "px";
50
+ 0.5: "0.5";
51
+ 1: "1";
52
+ 1.5: "1.5";
53
+ 2: "2";
54
+ 2.5: "2.5";
55
+ 3: "3";
56
+ 3.5: "3.5";
57
+ 4: "4";
58
+ 5: "5";
59
+ 6: "6";
60
+ 7: "7";
61
+ 8: "8";
62
+ 9: "9";
63
+ 10: "10";
64
+ 11: "11";
65
+ 12: "12";
66
+ 14: "14";
67
+ 16: "16";
68
+ none: "none";
69
+ sm: "sm";
70
+ md: "md";
71
+ lg: "lg";
72
+ xl: "xl";
73
+ "2xl": "2xl";
74
+ "3xl": "3xl";
75
+ full: "full";
76
+ }>;
77
+ declare const textSizeToken: z.ZodEnum<{
78
+ sm: "sm";
79
+ lg: "lg";
80
+ xl: "xl";
81
+ "2xl": "2xl";
82
+ "3xl": "3xl";
83
+ xs: "xs";
84
+ base: "base";
85
+ "4xl": "4xl";
86
+ "5xl": "5xl";
87
+ "6xl": "6xl";
88
+ }>;
89
+ declare const leadingToken: z.ZodEnum<{
90
+ 3: "3";
91
+ 4: "4";
92
+ 5: "5";
93
+ 6: "6";
94
+ 7: "7";
95
+ 8: "8";
96
+ 9: "9";
97
+ 10: "10";
98
+ none: "none";
99
+ tight: "tight";
100
+ snug: "snug";
101
+ normal: "normal";
102
+ relaxed: "relaxed";
103
+ loose: "loose";
104
+ }>;
105
+ declare const trackingToken: z.ZodEnum<{
106
+ tight: "tight";
107
+ normal: "normal";
108
+ tighter: "tighter";
109
+ wide: "wide";
110
+ wider: "wider";
111
+ widest: "widest";
112
+ }>;
113
+ /** Spacing / size: Tailwind token or a legacy CSS length. */
114
+ export declare const lengthValue: z.ZodUnion<readonly [z.ZodEnum<{
115
+ 0: "0";
116
+ px: "px";
117
+ 0.5: "0.5";
118
+ 1: "1";
119
+ 1.5: "1.5";
120
+ 2: "2";
121
+ 2.5: "2.5";
122
+ 3: "3";
123
+ 3.5: "3.5";
124
+ 4: "4";
125
+ 5: "5";
126
+ 6: "6";
127
+ 7: "7";
128
+ 8: "8";
129
+ 9: "9";
130
+ 10: "10";
131
+ 11: "11";
132
+ 12: "12";
133
+ 14: "14";
134
+ 16: "16";
135
+ 20: "20";
136
+ 24: "24";
137
+ 28: "28";
138
+ 32: "32";
139
+ 36: "36";
140
+ 40: "40";
141
+ 44: "44";
142
+ 48: "48";
143
+ 52: "52";
144
+ 56: "56";
145
+ 60: "60";
146
+ 64: "64";
147
+ 72: "72";
148
+ 80: "80";
149
+ 96: "96";
150
+ auto: "auto";
151
+ }>, z.ZodEnum<{
152
+ 0: "0";
153
+ px: "px";
154
+ 0.5: "0.5";
155
+ 1: "1";
156
+ 1.5: "1.5";
157
+ 2: "2";
158
+ 2.5: "2.5";
159
+ 3: "3";
160
+ 3.5: "3.5";
161
+ 4: "4";
162
+ 5: "5";
163
+ 6: "6";
164
+ 7: "7";
165
+ 8: "8";
166
+ 9: "9";
167
+ 10: "10";
168
+ 11: "11";
169
+ 12: "12";
170
+ 14: "14";
171
+ 16: "16";
172
+ none: "none";
173
+ sm: "sm";
174
+ md: "md";
175
+ lg: "lg";
176
+ xl: "xl";
177
+ "2xl": "2xl";
178
+ "3xl": "3xl";
179
+ full: "full";
180
+ }>, z.ZodString]>;
181
+ /** Border width: Tailwind token or a legacy CSS length. */
182
+ export declare const borderWidthValue: z.ZodUnion<readonly [z.ZodEnum<{
183
+ 0: "0";
184
+ 1: "1";
185
+ 2: "2";
186
+ 4: "4";
187
+ 8: "8";
188
+ }>, z.ZodString]>;
189
+ /** Text size: Tailwind token, legacy pixel number, or CSS length. */
190
+ export declare const textSizeValue: z.ZodUnion<readonly [z.ZodEnum<{
191
+ sm: "sm";
192
+ lg: "lg";
193
+ xl: "xl";
194
+ "2xl": "2xl";
195
+ "3xl": "3xl";
196
+ xs: "xs";
197
+ base: "base";
198
+ "4xl": "4xl";
199
+ "5xl": "5xl";
200
+ "6xl": "6xl";
201
+ }>, z.ZodNumber, z.ZodString]>;
202
+ export declare const lineHeightValue: z.ZodUnion<readonly [z.ZodEnum<{
203
+ 3: "3";
204
+ 4: "4";
205
+ 5: "5";
206
+ 6: "6";
207
+ 7: "7";
208
+ 8: "8";
209
+ 9: "9";
210
+ 10: "10";
211
+ none: "none";
212
+ tight: "tight";
213
+ snug: "snug";
214
+ normal: "normal";
215
+ relaxed: "relaxed";
216
+ loose: "loose";
217
+ }>, z.ZodString]>;
218
+ export declare const letterSpacingValue: z.ZodUnion<readonly [z.ZodEnum<{
219
+ tight: "tight";
220
+ normal: "normal";
221
+ tighter: "tighter";
222
+ wide: "wide";
223
+ wider: "wider";
224
+ widest: "widest";
225
+ }>, z.ZodString]>;
226
+ declare const hexColor: z.ZodObject<{
227
+ hex: z.ZodString;
228
+ opacity: z.ZodNumber;
229
+ }, z.core.$strict>;
230
+ declare const paletteColor: z.ZodObject<{
231
+ name: z.ZodEnum<{
232
+ accent: "accent";
233
+ transparent: "transparent";
234
+ white: "white";
235
+ black: "black";
236
+ "slate-50": "slate-50";
237
+ "slate-100": "slate-100";
238
+ "slate-200": "slate-200";
239
+ "slate-300": "slate-300";
240
+ "slate-400": "slate-400";
241
+ "slate-500": "slate-500";
242
+ "slate-600": "slate-600";
243
+ "slate-700": "slate-700";
244
+ "slate-800": "slate-800";
245
+ "slate-900": "slate-900";
246
+ "slate-950": "slate-950";
247
+ }>;
248
+ opacity: z.ZodNumber;
249
+ }, z.core.$strict>;
250
+ /** Palette token or legacy hex color. */
251
+ export declare const colorValue: z.ZodUnion<readonly [z.ZodObject<{
252
+ name: z.ZodEnum<{
253
+ accent: "accent";
254
+ transparent: "transparent";
255
+ white: "white";
256
+ black: "black";
257
+ "slate-50": "slate-50";
258
+ "slate-100": "slate-100";
259
+ "slate-200": "slate-200";
260
+ "slate-300": "slate-300";
261
+ "slate-400": "slate-400";
262
+ "slate-500": "slate-500";
263
+ "slate-600": "slate-600";
264
+ "slate-700": "slate-700";
265
+ "slate-800": "slate-800";
266
+ "slate-900": "slate-900";
267
+ "slate-950": "slate-950";
268
+ }>;
269
+ opacity: z.ZodNumber;
270
+ }, z.core.$strict>, z.ZodObject<{
271
+ hex: z.ZodString;
272
+ opacity: z.ZodNumber;
273
+ }, z.core.$strict>]>;
274
+ export { spacingToken, borderWidthToken, radiusToken, textSizeToken, leadingToken, trackingToken, hexColor, paletteColor, };