@proteos/sdk 0.22.0 → 0.23.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.
@@ -1523,6 +1523,47 @@ declare const PageLayoutSidePanelSchema: z.ZodObject<{
1523
1523
  width?: SizeValue | undefined;
1524
1524
  is_sticky?: boolean | undefined;
1525
1525
  }>;
1526
+ /**
1527
+ * Design-token keys a page background may name instead of a raw CSS color. The
1528
+ * web resolver maps each to `var(--color-<key>)`. Keep in sync with
1529
+ * `pageBackgroundTokens` in the metadata-service layout validator.
1530
+ */
1531
+ declare const PAGE_BACKGROUND_TOKENS: readonly ["bg", "bg-2", "bg-3", "ink", "ink-2", "ink-3", "ink-4", "rule", "rule-2", "accent", "accent-2", "accent-ink", "success", "warning", "danger", "info"];
1532
+ type PageBackgroundToken = (typeof PAGE_BACKGROUND_TOKENS)[number];
1533
+ /**
1534
+ * Per-page presentation of a standalone page shell: background color plus the
1535
+ * content container's max-width and side / top padding. Every field is
1536
+ * optional; an omitted field falls back to the renderer default (the historical
1537
+ * bg / 1200px / 24px-32px look). `max_width: "fill"` (or `"auto"`) with zero
1538
+ * padding lets a component fill the page edge-to-edge.
1539
+ *
1540
+ * Honored only on `public` and `kiosk` pages in v1 (enforced server-side).
1541
+ */
1542
+ interface PageStyle {
1543
+ /** Design-token key (see PAGE_BACKGROUND_TOKENS) or a raw CSS color. */
1544
+ background?: string;
1545
+ /** Content max-width; `"fill"` / `"auto"` removes the cap. */
1546
+ max_width?: SizeValue;
1547
+ /** Horizontal / vertical padding of the content container (Tailwind px/py). */
1548
+ padding_x?: SizeValue;
1549
+ padding_y?: SizeValue;
1550
+ }
1551
+ declare const PageStyleSchema: z.ZodObject<{
1552
+ background: z.ZodOptional<z.ZodString>;
1553
+ max_width: z.ZodOptional<z.ZodType<SizeValue, z.ZodTypeDef, SizeValue>>;
1554
+ padding_x: z.ZodOptional<z.ZodType<SizeValue, z.ZodTypeDef, SizeValue>>;
1555
+ padding_y: z.ZodOptional<z.ZodType<SizeValue, z.ZodTypeDef, SizeValue>>;
1556
+ }, "strip", z.ZodTypeAny, {
1557
+ background?: string | undefined;
1558
+ max_width?: SizeValue | undefined;
1559
+ padding_x?: SizeValue | undefined;
1560
+ padding_y?: SizeValue | undefined;
1561
+ }, {
1562
+ background?: string | undefined;
1563
+ max_width?: SizeValue | undefined;
1564
+ padding_x?: SizeValue | undefined;
1565
+ padding_y?: SizeValue | undefined;
1566
+ }>;
1526
1567
  /**
1527
1568
  * Top-level page layout. Replaces the legacy `mainContent` / `side_panel`
1528
1569
  * arrays of `PageSection`s with a single typed element tree.
@@ -1531,6 +1572,7 @@ interface PageLayout {
1531
1572
  version: 1;
1532
1573
  main: LayoutElement;
1533
1574
  side_panel?: PageLayoutSidePanel;
1575
+ style?: PageStyle;
1534
1576
  }
1535
1577
  declare const PageLayoutSchema: z.ZodObject<{
1536
1578
  version: z.ZodLiteral<1>;
@@ -1548,6 +1590,22 @@ declare const PageLayoutSchema: z.ZodObject<{
1548
1590
  width?: SizeValue | undefined;
1549
1591
  is_sticky?: boolean | undefined;
1550
1592
  }>>;
1593
+ style: z.ZodOptional<z.ZodObject<{
1594
+ background: z.ZodOptional<z.ZodString>;
1595
+ max_width: z.ZodOptional<z.ZodType<SizeValue, z.ZodTypeDef, SizeValue>>;
1596
+ padding_x: z.ZodOptional<z.ZodType<SizeValue, z.ZodTypeDef, SizeValue>>;
1597
+ padding_y: z.ZodOptional<z.ZodType<SizeValue, z.ZodTypeDef, SizeValue>>;
1598
+ }, "strip", z.ZodTypeAny, {
1599
+ background?: string | undefined;
1600
+ max_width?: SizeValue | undefined;
1601
+ padding_x?: SizeValue | undefined;
1602
+ padding_y?: SizeValue | undefined;
1603
+ }, {
1604
+ background?: string | undefined;
1605
+ max_width?: SizeValue | undefined;
1606
+ padding_x?: SizeValue | undefined;
1607
+ padding_y?: SizeValue | undefined;
1608
+ }>>;
1551
1609
  }, "strip", z.ZodTypeAny, {
1552
1610
  version: 1;
1553
1611
  main: LayoutElement;
@@ -1556,6 +1614,12 @@ declare const PageLayoutSchema: z.ZodObject<{
1556
1614
  width?: SizeValue | undefined;
1557
1615
  is_sticky?: boolean | undefined;
1558
1616
  } | undefined;
1617
+ style?: {
1618
+ background?: string | undefined;
1619
+ max_width?: SizeValue | undefined;
1620
+ padding_x?: SizeValue | undefined;
1621
+ padding_y?: SizeValue | undefined;
1622
+ } | undefined;
1559
1623
  }, {
1560
1624
  version: 1;
1561
1625
  main: LayoutElement;
@@ -1564,6 +1628,12 @@ declare const PageLayoutSchema: z.ZodObject<{
1564
1628
  width?: SizeValue | undefined;
1565
1629
  is_sticky?: boolean | undefined;
1566
1630
  } | undefined;
1631
+ style?: {
1632
+ background?: string | undefined;
1633
+ max_width?: SizeValue | undefined;
1634
+ padding_x?: SizeValue | undefined;
1635
+ padding_y?: SizeValue | undefined;
1636
+ } | undefined;
1567
1637
  }>;
1568
1638
 
1569
1639
  /**
@@ -3051,6 +3121,22 @@ declare const PageSchema: z.ZodObject<{
3051
3121
  width?: SizeValue | undefined;
3052
3122
  is_sticky?: boolean | undefined;
3053
3123
  }>>;
3124
+ style: z.ZodOptional<z.ZodObject<{
3125
+ background: z.ZodOptional<z.ZodString>;
3126
+ max_width: z.ZodOptional<z.ZodType<SizeValue, z.ZodTypeDef, SizeValue>>;
3127
+ padding_x: z.ZodOptional<z.ZodType<SizeValue, z.ZodTypeDef, SizeValue>>;
3128
+ padding_y: z.ZodOptional<z.ZodType<SizeValue, z.ZodTypeDef, SizeValue>>;
3129
+ }, "strip", z.ZodTypeAny, {
3130
+ background?: string | undefined;
3131
+ max_width?: SizeValue | undefined;
3132
+ padding_x?: SizeValue | undefined;
3133
+ padding_y?: SizeValue | undefined;
3134
+ }, {
3135
+ background?: string | undefined;
3136
+ max_width?: SizeValue | undefined;
3137
+ padding_x?: SizeValue | undefined;
3138
+ padding_y?: SizeValue | undefined;
3139
+ }>>;
3054
3140
  }, "strip", z.ZodTypeAny, {
3055
3141
  version: 1;
3056
3142
  main: LayoutElement;
@@ -3059,6 +3145,12 @@ declare const PageSchema: z.ZodObject<{
3059
3145
  width?: SizeValue | undefined;
3060
3146
  is_sticky?: boolean | undefined;
3061
3147
  } | undefined;
3148
+ style?: {
3149
+ background?: string | undefined;
3150
+ max_width?: SizeValue | undefined;
3151
+ padding_x?: SizeValue | undefined;
3152
+ padding_y?: SizeValue | undefined;
3153
+ } | undefined;
3062
3154
  }, {
3063
3155
  version: 1;
3064
3156
  main: LayoutElement;
@@ -3067,6 +3159,12 @@ declare const PageSchema: z.ZodObject<{
3067
3159
  width?: SizeValue | undefined;
3068
3160
  is_sticky?: boolean | undefined;
3069
3161
  } | undefined;
3162
+ style?: {
3163
+ background?: string | undefined;
3164
+ max_width?: SizeValue | undefined;
3165
+ padding_x?: SizeValue | undefined;
3166
+ padding_y?: SizeValue | undefined;
3167
+ } | undefined;
3070
3168
  }>;
3071
3169
  }, "strip", z.ZodTypeAny, {
3072
3170
  type: "platform" | "record" | "kiosk" | "public";
@@ -3096,6 +3194,12 @@ declare const PageSchema: z.ZodObject<{
3096
3194
  width?: SizeValue | undefined;
3097
3195
  is_sticky?: boolean | undefined;
3098
3196
  } | undefined;
3197
+ style?: {
3198
+ background?: string | undefined;
3199
+ max_width?: SizeValue | undefined;
3200
+ padding_x?: SizeValue | undefined;
3201
+ padding_y?: SizeValue | undefined;
3202
+ } | undefined;
3099
3203
  };
3100
3204
  entity_slug?: string | undefined;
3101
3205
  }, {
@@ -3126,6 +3230,12 @@ declare const PageSchema: z.ZodObject<{
3126
3230
  width?: SizeValue | undefined;
3127
3231
  is_sticky?: boolean | undefined;
3128
3232
  } | undefined;
3233
+ style?: {
3234
+ background?: string | undefined;
3235
+ max_width?: SizeValue | undefined;
3236
+ padding_x?: SizeValue | undefined;
3237
+ padding_y?: SizeValue | undefined;
3238
+ } | undefined;
3129
3239
  };
3130
3240
  entity_slug?: string | undefined;
3131
3241
  }>;
@@ -3530,4 +3640,4 @@ interface DesignReferenceContent {
3530
3640
  content: string;
3531
3641
  }
3532
3642
 
3533
- export { type FilterGroup as $, type AuditFields as A, CurrencyAttributeMetaSchema as B, type ClientOptions as C, type CurrencySymbolSide as D, type CurrencyValue as E, type FileRef as F, DEFAULT_OPTIONS as G, DEFAULT_PAGE_SIZE as H, DONE as I, type DeployModuleRequest as J, type DesignReference as K, type ListOptions as L, type DesignReferenceContent as M, DesignReferenceSchema as N, type DesignReferenceService as O, PageIterator as P, type Done as Q, type Entity as R, EntitySchema as S, type EntityService as T, type UserRef as U, type EntityWithSchema as V, EntityWithSchemaSchema as W, type FileAttributeMeta as X, FileRefSchema as Y, type FilterElement as Z, FilterElementSchema as _, type Attribute as a, type UpdatePageRequest as a$, FilterGroupSchema as a0, type List as a1, type ListAppsOptions as a2, type ListComponentsOptions as a3, type ListDesignReferencesOptions as a4, type ListEntitiesOptions as a5, type ListFn as a6, type ListListViewsOptions as a7, type ListListsOptions as a8, type ListMenuConfigurationsOptions as a9, type PageAction as aA, PageActionSchema as aB, type PageLayout as aC, PageLayoutSchema as aD, PageSchema as aE, type PageService as aF, type PageType as aG, type PublicPageComponent as aH, type PublicPageResponse as aI, type RelationAttributeMeta as aJ, RelationAttributeMetaSchema as aK, type RequestOptions as aL, type ResolvedClientOptions as aM, type ResponseMeta as aN, ResponseMetaSchema as aO, type SortConfig as aP, SortConfigSchema as aQ, type SortDirection as aR, type Timestamps as aS, type TokenProvider as aT, type UpdateAppRequest as aU, type UpdateComponentRequest as aV, type UpdateDesignReferenceRequest as aW, type UpdateEntityRequest as aX, type UpdateListRequest as aY, type UpdateListViewRequest as aZ, type UpdateMenuConfigurationRequest as a_, type ListModulesOptions as aa, type ListPagesOptions as ab, ListSchema as ac, type ListService as ad, type ListVariablesOptions as ae, type ListView as af, ListViewSchema as ag, type ListViewService as ah, type LogicalOperator as ai, type MenuConfiguration as aj, MenuConfigurationSchema as ak, type MenuConfigurationService as al, type MenuItem as am, MenuItemSchema as an, MenuItemType as ao, MetaClient as ap, type MetaListOptions as aq, type Module as ar, ModuleSchema as as, type ModuleService as at, type ModuleStatus as au, type OnDeleteAction as av, OnDeleteActionSchema as aw, PLATFORM_ATTRIBUTE_NAMES as ax, PLATFORM_USER_ID as ay, type Page as az, type ListResult as b, isBuiltInControl as b$, type UpdateVariableRequest as b0, UserRefSchema as b1, type UserType as b2, type Variable as b3, VariableSchema as b4, type VariableService as b5, allCurrencyCodes as b6, createIterator as b7, createListResultSchema as b8, currencyLabel as b9, type FieldElement as bA, FileAttributeMetaSchema as bB, type LayoutAlign as bC, type LayoutElement as bD, LayoutElementSchema as bE, LayoutElementType as bF, type LayoutGap as bG, type LayoutJustify as bH, type LayoutTab as bI, type NumberAttributeMeta as bJ, type ObjectAttributeMeta as bK, type PageLayoutSidePanel as bL, PageLayoutSidePanelSchema as bM, type RelatedListElement as bN, type ResponsiveSizing as bO, type RowElement as bP, type SectionElement as bQ, type SizeValue as bR, SizeValueSchema as bS, type SizingProps as bT, type StringAttributeMeta as bU, type StringFormat as bV, type TabsElement as bW, type TextElement as bX, type TextVariant as bY, type UserAttributeMeta as bZ, UserAttributeMetaSchema as b_, currencySymbol as ba, currencySymbolSide as bb, formatAmount as bc, formatMoney as bd, isPlatformAttributeName as be, localeNumberSeparators as bf, parseAmount as bg, parseCurrencyMeta as bh, parseFileMeta as bi, parseRelationMeta as bj, platformAttributes as bk, resolveOptions as bl, type ArrayAttributeMeta as bm, type AttributeForLookup as bn, type AttributeMeta as bo, BUILT_IN_CONTROLS as bp, type BuiltInControlSlug as bq, type ColumnElement as br, type CommonProps as bs, type ComponentElement as bt, type ControlBucket as bu, type DatetimeAttributeMeta as bv, type DatetimeFormat as bw, type DividerElement as bx, type EnumAttributeMeta as by, type EnumValue as bz, ProteosClient as c, lookupCompatibleControls as c0, lookupControls as c1, lookupPrimaryControl as c2, parseUserMeta as c3, type PublicAccessOperation as d, type App as e, AppSchema as f, type AppService as g, AttributeSchema as h, type AttributeType as i, AuditFieldsSchema as j, type Column as k, ColumnSchema as l, type ComparisonOperator as m, type Component as n, ComponentSchema as o, type ComponentService as p, type CreateAppRequest as q, type CreateComponentRequest as r, type CreateDesignReferenceRequest as s, type CreateEntityRequest as t, type CreateListRequest as u, type CreateListViewRequest as v, type CreateMenuConfigurationRequest as w, type CreatePageRequest as x, type CreateVariableRequest as y, type CurrencyAttributeMeta as z };
3643
+ export { type FilterGroup as $, type AuditFields as A, CurrencyAttributeMetaSchema as B, type ClientOptions as C, type CurrencySymbolSide as D, type CurrencyValue as E, type FileRef as F, DEFAULT_OPTIONS as G, DEFAULT_PAGE_SIZE as H, DONE as I, type DeployModuleRequest as J, type DesignReference as K, type ListOptions as L, type DesignReferenceContent as M, DesignReferenceSchema as N, type DesignReferenceService as O, PageIterator as P, type Done as Q, type Entity as R, EntitySchema as S, type EntityService as T, type UserRef as U, type EntityWithSchema as V, EntityWithSchemaSchema as W, type FileAttributeMeta as X, FileRefSchema as Y, type FilterElement as Z, FilterElementSchema as _, type Attribute as a, type UpdatePageRequest as a$, FilterGroupSchema as a0, type List as a1, type ListAppsOptions as a2, type ListComponentsOptions as a3, type ListDesignReferencesOptions as a4, type ListEntitiesOptions as a5, type ListFn as a6, type ListListViewsOptions as a7, type ListListsOptions as a8, type ListMenuConfigurationsOptions as a9, type PageAction as aA, PageActionSchema as aB, type PageLayout as aC, PageLayoutSchema as aD, PageSchema as aE, type PageService as aF, type PageType as aG, type PublicPageComponent as aH, type PublicPageResponse as aI, type RelationAttributeMeta as aJ, RelationAttributeMetaSchema as aK, type RequestOptions as aL, type ResolvedClientOptions as aM, type ResponseMeta as aN, ResponseMetaSchema as aO, type SortConfig as aP, SortConfigSchema as aQ, type SortDirection as aR, type Timestamps as aS, type TokenProvider as aT, type UpdateAppRequest as aU, type UpdateComponentRequest as aV, type UpdateDesignReferenceRequest as aW, type UpdateEntityRequest as aX, type UpdateListRequest as aY, type UpdateListViewRequest as aZ, type UpdateMenuConfigurationRequest as a_, type ListModulesOptions as aa, type ListPagesOptions as ab, ListSchema as ac, type ListService as ad, type ListVariablesOptions as ae, type ListView as af, ListViewSchema as ag, type ListViewService as ah, type LogicalOperator as ai, type MenuConfiguration as aj, MenuConfigurationSchema as ak, type MenuConfigurationService as al, type MenuItem as am, MenuItemSchema as an, MenuItemType as ao, MetaClient as ap, type MetaListOptions as aq, type Module as ar, ModuleSchema as as, type ModuleService as at, type ModuleStatus as au, type OnDeleteAction as av, OnDeleteActionSchema as aw, PLATFORM_ATTRIBUTE_NAMES as ax, PLATFORM_USER_ID as ay, type Page as az, type ListResult as b, type TextElement as b$, type UpdateVariableRequest as b0, UserRefSchema as b1, type UserType as b2, type Variable as b3, VariableSchema as b4, type VariableService as b5, allCurrencyCodes as b6, createIterator as b7, createListResultSchema as b8, currencyLabel as b9, type FieldElement as bA, FileAttributeMetaSchema as bB, type LayoutAlign as bC, type LayoutElement as bD, LayoutElementSchema as bE, LayoutElementType as bF, type LayoutGap as bG, type LayoutJustify as bH, type LayoutTab as bI, type NumberAttributeMeta as bJ, type ObjectAttributeMeta as bK, PAGE_BACKGROUND_TOKENS as bL, type PageBackgroundToken as bM, type PageLayoutSidePanel as bN, PageLayoutSidePanelSchema as bO, type PageStyle as bP, PageStyleSchema as bQ, type RelatedListElement as bR, type ResponsiveSizing as bS, type RowElement as bT, type SectionElement as bU, type SizeValue as bV, SizeValueSchema as bW, type SizingProps as bX, type StringAttributeMeta as bY, type StringFormat as bZ, type TabsElement as b_, currencySymbol as ba, currencySymbolSide as bb, formatAmount as bc, formatMoney as bd, isPlatformAttributeName as be, localeNumberSeparators as bf, parseAmount as bg, parseCurrencyMeta as bh, parseFileMeta as bi, parseRelationMeta as bj, platformAttributes as bk, resolveOptions as bl, type ArrayAttributeMeta as bm, type AttributeForLookup as bn, type AttributeMeta as bo, BUILT_IN_CONTROLS as bp, type BuiltInControlSlug as bq, type ColumnElement as br, type CommonProps as bs, type ComponentElement as bt, type ControlBucket as bu, type DatetimeAttributeMeta as bv, type DatetimeFormat as bw, type DividerElement as bx, type EnumAttributeMeta as by, type EnumValue as bz, ProteosClient as c, type TextVariant as c0, type UserAttributeMeta as c1, UserAttributeMetaSchema as c2, isBuiltInControl as c3, lookupCompatibleControls as c4, lookupControls as c5, lookupPrimaryControl as c6, parseUserMeta as c7, type PublicAccessOperation as d, type App as e, AppSchema as f, type AppService as g, AttributeSchema as h, type AttributeType as i, AuditFieldsSchema as j, type Column as k, ColumnSchema as l, type ComparisonOperator as m, type Component as n, ComponentSchema as o, type ComponentService as p, type CreateAppRequest as q, type CreateComponentRequest as r, type CreateDesignReferenceRequest as s, type CreateEntityRequest as t, type CreateListRequest as u, type CreateListViewRequest as v, type CreateMenuConfigurationRequest as w, type CreatePageRequest as x, type CreateVariableRequest as y, type CurrencyAttributeMeta as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proteos/sdk",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "TypeScript SDK for the Proteos platform",
6
6
  "repository": {
@@ -33,9 +33,13 @@ export {
33
33
  type TextVariant,
34
34
  } from './elements.js'
35
35
  export {
36
+ PAGE_BACKGROUND_TOKENS,
37
+ type PageBackgroundToken,
36
38
  type PageLayout,
37
39
  PageLayoutSchema,
38
40
  type PageLayoutSidePanel,
39
41
  PageLayoutSidePanelSchema,
42
+ type PageStyle,
43
+ PageStyleSchema,
40
44
  } from './page-layout.js'
41
45
  export { type SizeValue, SizeValueSchema } from './size-value.js'
@@ -18,6 +18,58 @@ export const PageLayoutSidePanelSchema = z.object({
18
18
  content: LayoutElementSchema,
19
19
  })
20
20
 
21
+ /**
22
+ * Design-token keys a page background may name instead of a raw CSS color. The
23
+ * web resolver maps each to `var(--color-<key>)`. Keep in sync with
24
+ * `pageBackgroundTokens` in the metadata-service layout validator.
25
+ */
26
+ export const PAGE_BACKGROUND_TOKENS = [
27
+ 'bg',
28
+ 'bg-2',
29
+ 'bg-3',
30
+ 'ink',
31
+ 'ink-2',
32
+ 'ink-3',
33
+ 'ink-4',
34
+ 'rule',
35
+ 'rule-2',
36
+ 'accent',
37
+ 'accent-2',
38
+ 'accent-ink',
39
+ 'success',
40
+ 'warning',
41
+ 'danger',
42
+ 'info',
43
+ ] as const
44
+
45
+ export type PageBackgroundToken = (typeof PAGE_BACKGROUND_TOKENS)[number]
46
+
47
+ /**
48
+ * Per-page presentation of a standalone page shell: background color plus the
49
+ * content container's max-width and side / top padding. Every field is
50
+ * optional; an omitted field falls back to the renderer default (the historical
51
+ * bg / 1200px / 24px-32px look). `max_width: "fill"` (or `"auto"`) with zero
52
+ * padding lets a component fill the page edge-to-edge.
53
+ *
54
+ * Honored only on `public` and `kiosk` pages in v1 (enforced server-side).
55
+ */
56
+ export interface PageStyle {
57
+ /** Design-token key (see PAGE_BACKGROUND_TOKENS) or a raw CSS color. */
58
+ background?: string
59
+ /** Content max-width; `"fill"` / `"auto"` removes the cap. */
60
+ max_width?: SizeValue
61
+ /** Horizontal / vertical padding of the content container (Tailwind px/py). */
62
+ padding_x?: SizeValue
63
+ padding_y?: SizeValue
64
+ }
65
+
66
+ export const PageStyleSchema = z.object({
67
+ background: z.string().optional(),
68
+ max_width: SizeValueSchema.optional(),
69
+ padding_x: SizeValueSchema.optional(),
70
+ padding_y: SizeValueSchema.optional(),
71
+ })
72
+
21
73
  /**
22
74
  * Top-level page layout. Replaces the legacy `mainContent` / `side_panel`
23
75
  * arrays of `PageSection`s with a single typed element tree.
@@ -26,10 +78,12 @@ export interface PageLayout {
26
78
  version: 1
27
79
  main: LayoutElement
28
80
  side_panel?: PageLayoutSidePanel
81
+ style?: PageStyle
29
82
  }
30
83
 
31
84
  export const PageLayoutSchema = z.object({
32
85
  version: z.literal(1),
33
86
  main: LayoutElementSchema,
34
87
  side_panel: PageLayoutSidePanelSchema.optional(),
88
+ style: PageStyleSchema.optional(),
35
89
  })