@universe-platform/ui 0.1.0-beta.40 → 0.1.0-beta.42

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/dist/globals.css CHANGED
@@ -524,6 +524,9 @@
524
524
  .block {
525
525
  display: block;
526
526
  }
527
+ .contents {
528
+ display: contents;
529
+ }
527
530
  .flex {
528
531
  display: flex;
529
532
  }
@@ -3051,6 +3054,84 @@
3051
3054
  }
3052
3055
  }
3053
3056
  }
3057
+ [data-theme="clean"] {
3058
+ --color-emerald-50: #eef2ff;
3059
+ --color-emerald-100: #e0e7ff;
3060
+ --color-emerald-200: #c7d2fe;
3061
+ --color-emerald-300: #a5b4fc;
3062
+ --color-emerald-400: #818cf8;
3063
+ --color-emerald-500: #6366f1;
3064
+ --color-emerald-600: #4f46e5;
3065
+ --color-emerald-700: #4338ca;
3066
+ --color-emerald-800: #3730a3;
3067
+ --color-emerald-900: #312e81;
3068
+ }
3069
+ [data-theme="ocean"] {
3070
+ --color-slate-50: #f3f8fa;
3071
+ --color-slate-100: #e4eef3;
3072
+ --color-slate-200: #cbdde6;
3073
+ --color-slate-300: #a6c0cf;
3074
+ --color-slate-400: #7a9bb0;
3075
+ --color-slate-500: #567b93;
3076
+ --color-slate-600: #416178;
3077
+ --color-slate-700: #324d60;
3078
+ --color-slate-800: #243b4b;
3079
+ --color-slate-900: #172a38;
3080
+ --color-slate-950: #0d1b26;
3081
+ --color-emerald-50: #ecfeff;
3082
+ --color-emerald-100: #cffafe;
3083
+ --color-emerald-200: #a5f3fc;
3084
+ --color-emerald-300: #67e8f9;
3085
+ --color-emerald-400: #22d3ee;
3086
+ --color-emerald-500: #06b6d4;
3087
+ --color-emerald-600: #0891b2;
3088
+ --color-emerald-700: #0e7490;
3089
+ --color-emerald-800: #155e75;
3090
+ --color-emerald-900: #164e63;
3091
+ --color-blue-50: #f0f9ff;
3092
+ --color-blue-100: #e0f2fe;
3093
+ --color-blue-200: #bae6fd;
3094
+ --color-blue-300: #7dd3fc;
3095
+ --color-blue-400: #38bdf8;
3096
+ --color-blue-500: #0ea5e9;
3097
+ --color-blue-600: #0284c7;
3098
+ --color-blue-700: #0369a1;
3099
+ --color-blue-800: #075985;
3100
+ --color-blue-900: #0c4a6e;
3101
+ }
3102
+ [data-theme="warm"] {
3103
+ --color-slate-50: #fafaf9;
3104
+ --color-slate-100: #f5f5f4;
3105
+ --color-slate-200: #e7e5e4;
3106
+ --color-slate-300: #d6d3d1;
3107
+ --color-slate-400: #a8a29e;
3108
+ --color-slate-500: #78716c;
3109
+ --color-slate-600: #57534e;
3110
+ --color-slate-700: #44403c;
3111
+ --color-slate-800: #292524;
3112
+ --color-slate-900: #1c1917;
3113
+ --color-slate-950: #0c0a09;
3114
+ --color-emerald-50: #fff7ed;
3115
+ --color-emerald-100: #ffedd5;
3116
+ --color-emerald-200: #fed7aa;
3117
+ --color-emerald-300: #fdba74;
3118
+ --color-emerald-400: #fb923c;
3119
+ --color-emerald-500: #f97316;
3120
+ --color-emerald-600: #ea580c;
3121
+ --color-emerald-700: #c2410c;
3122
+ --color-emerald-800: #9a3412;
3123
+ --color-emerald-900: #7c2d12;
3124
+ --color-blue-50: #fbf6f1;
3125
+ --color-blue-100: #f3e8dc;
3126
+ --color-blue-200: #e6d0b8;
3127
+ --color-blue-300: #d4b08a;
3128
+ --color-blue-400: #bf8d5c;
3129
+ --color-blue-500: #a8703c;
3130
+ --color-blue-600: #8f5a2d;
3131
+ --color-blue-700: #744725;
3132
+ --color-blue-800: #5c391f;
3133
+ --color-blue-900: #472c1a;
3134
+ }
3054
3135
  @property --tw-translate-x {
3055
3136
  syntax: "*";
3056
3137
  inherits: false;
package/dist/index.d.mts CHANGED
@@ -791,7 +791,6 @@ interface FormBlockProps {
791
791
  className?: string;
792
792
  onSuccess?: () => void;
793
793
  }
794
- declare function FormBlock({ settings: schema, executeAction, componentId, className, onSuccess }: FormBlockProps): react_jsx_runtime.JSX.Element;
795
794
 
796
795
  /**
797
796
  * UNIVERSE_COMPONENTS
@@ -799,10 +798,10 @@ declare function FormBlock({ settings: schema, executeAction, componentId, class
799
798
  * to their respective React component implementation.
800
799
  */
801
800
  declare const UNIVERSE_COMPONENTS: {
802
- readonly TABLE: typeof TableBlock;
803
- readonly WHATSAPP: typeof WhatsAppComponent;
804
- readonly FORM: typeof FormBlock;
805
- readonly PLACEMENT: react.FC<PlacementBlockProps>;
801
+ readonly TABLE: react.ComponentType<TableBlockProps>;
802
+ readonly WHATSAPP: react.ComponentType<WhatsAppComponentProps>;
803
+ readonly FORM: react.ComponentType<FormBlockProps>;
804
+ readonly PLACEMENT: react.ComponentType<PlacementBlockProps>;
806
805
  };
807
806
  type ComponentRegistry = typeof UNIVERSE_COMPONENTS;
808
807
  type UniverseComponentType = keyof ComponentRegistry;
@@ -827,4 +826,14 @@ declare function ToastProvider({ children }: {
827
826
 
828
827
  declare function useToast(): ToastContextType;
829
828
 
830
- export { type BaseComponentProps, ColumnHeaderTitle, type ColumnHeaderTitleProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentRegistry, type ComponentState, type CreateRecordPayload, CreateTemplateModal, type CreateTemplateModalProps, DEFAULT_PLACEMENT_STATUS_COLORS, DatePickerCell, type DeleteRecordPayload, DynamicFiltersBlock, type DynamicFiltersBlockProps, LinkPickerCell, type MetaTemplateComponent, type MetaWhatsAppTemplate, NON_TEXT_TYPES, type OrgRole, PASTEL_PALETTES, type PastelPalette, PlacementBlock, type PlacementBlockProps, type PlacementColumnOption, type PlacementConfig, PlacementSettings, type PlacementStatusColor, PlacementStatusEditor, type PlacementStatusSetting, RELATION_LABEL_KEY, RELATION_SEP, type RelationFilterOption, type RelationFilterPayload, RelationFilterPopover, type RelationFilterPopoverProps, RelationPickerCell, type RolePermissions, type RowStatusType, SettingsAndActionsBlock, type SettingsAndActionsBlockProps, SmartTextCell, type SplitTitleResult, TableBlock, TableBlockClient, type TableBlockProps, type TableConfig, type TableData, TimePickerCell, ToastContext, type ToastContextType, type ToastItem, ToastProvider, TruncatedTooltip, UNIVERSE_COMPONENTS, type UniverseComponentType, type UpdateRecordPayload, type UseColumnReorderOptions, type UseColumnResizeOptions, WhatsAppComponent, type WhatsAppComponentProps, type WhatsAppData, buildColumnOptions, buildRelationRef, calculateMinColumnWidth, checkElementTruncation, cn, columnRefLabel, enrichRowsWithRelations, formatConflictCellValue, formatPhoneDisplay, formatTimeInput, formatTimeIso, generateWhatsAppLink, getDeterministicPastelBadge, getRolePermissions, isUserColumn, isValidPhoneNumber, measureTextWidth, normalizePhoneForWhatsApp, normalizeRelationValue, openWhatsAppChat, parseColumnRef, parseLinkValue, parseTimeParts, readColumnValue, resolveDefaultStatusId, resolveProtocol, sanitizePhoneNumber, splitHeaderTitle, tableColumns, useColumnReorder, useColumnResize, useSmartTooltip, useToast, useWhatsAppState };
829
+ declare const UNIVERSE_THEME_IDS: readonly ["classic", "clean", "ocean", "warm"];
830
+ type UniverseThemeId = (typeof UNIVERSE_THEME_IDS)[number];
831
+ declare function resolveUniverseTheme(value: unknown): UniverseThemeId;
832
+ /**
833
+ * עוטף רכיב ב-data-theme לפי settings.theme (או config.theme) שהפלטפורמה מוסיפה לכל רכיב.
834
+ * display: contents אומר שהעטיפה לא משנה את הפריסה. משתני CSS עדיין עוברים בירושה לילדים.
835
+ * הערה: חלונות שנפתחים מחוץ לעץ (portal) לא יהיו בתוך העטיפה, ולכן עדיף להגדיר data-theme גם על <html> באתר.
836
+ */
837
+ declare function withThemeScope<P extends object>(Component: react.ComponentType<P>): react.ComponentType<P>;
838
+
839
+ export { type BaseComponentProps, ColumnHeaderTitle, type ColumnHeaderTitleProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentRegistry, type ComponentState, type CreateRecordPayload, CreateTemplateModal, type CreateTemplateModalProps, DEFAULT_PLACEMENT_STATUS_COLORS, DatePickerCell, type DeleteRecordPayload, DynamicFiltersBlock, type DynamicFiltersBlockProps, LinkPickerCell, type MetaTemplateComponent, type MetaWhatsAppTemplate, NON_TEXT_TYPES, type OrgRole, PASTEL_PALETTES, type PastelPalette, PlacementBlock, type PlacementBlockProps, type PlacementColumnOption, type PlacementConfig, PlacementSettings, type PlacementStatusColor, PlacementStatusEditor, type PlacementStatusSetting, RELATION_LABEL_KEY, RELATION_SEP, type RelationFilterOption, type RelationFilterPayload, RelationFilterPopover, type RelationFilterPopoverProps, RelationPickerCell, type RolePermissions, type RowStatusType, SettingsAndActionsBlock, type SettingsAndActionsBlockProps, SmartTextCell, type SplitTitleResult, TableBlock, TableBlockClient, type TableBlockProps, type TableConfig, type TableData, TimePickerCell, ToastContext, type ToastContextType, type ToastItem, ToastProvider, TruncatedTooltip, UNIVERSE_COMPONENTS, UNIVERSE_THEME_IDS, type UniverseComponentType, type UniverseThemeId, type UpdateRecordPayload, type UseColumnReorderOptions, type UseColumnResizeOptions, WhatsAppComponent, type WhatsAppComponentProps, type WhatsAppData, buildColumnOptions, buildRelationRef, calculateMinColumnWidth, checkElementTruncation, cn, columnRefLabel, enrichRowsWithRelations, formatConflictCellValue, formatPhoneDisplay, formatTimeInput, formatTimeIso, generateWhatsAppLink, getDeterministicPastelBadge, getRolePermissions, isUserColumn, isValidPhoneNumber, measureTextWidth, normalizePhoneForWhatsApp, normalizeRelationValue, openWhatsAppChat, parseColumnRef, parseLinkValue, parseTimeParts, readColumnValue, resolveDefaultStatusId, resolveProtocol, resolveUniverseTheme, sanitizePhoneNumber, splitHeaderTitle, tableColumns, useColumnReorder, useColumnResize, useSmartTooltip, useToast, useWhatsAppState, withThemeScope };
package/dist/index.d.ts CHANGED
@@ -791,7 +791,6 @@ interface FormBlockProps {
791
791
  className?: string;
792
792
  onSuccess?: () => void;
793
793
  }
794
- declare function FormBlock({ settings: schema, executeAction, componentId, className, onSuccess }: FormBlockProps): react_jsx_runtime.JSX.Element;
795
794
 
796
795
  /**
797
796
  * UNIVERSE_COMPONENTS
@@ -799,10 +798,10 @@ declare function FormBlock({ settings: schema, executeAction, componentId, class
799
798
  * to their respective React component implementation.
800
799
  */
801
800
  declare const UNIVERSE_COMPONENTS: {
802
- readonly TABLE: typeof TableBlock;
803
- readonly WHATSAPP: typeof WhatsAppComponent;
804
- readonly FORM: typeof FormBlock;
805
- readonly PLACEMENT: react.FC<PlacementBlockProps>;
801
+ readonly TABLE: react.ComponentType<TableBlockProps>;
802
+ readonly WHATSAPP: react.ComponentType<WhatsAppComponentProps>;
803
+ readonly FORM: react.ComponentType<FormBlockProps>;
804
+ readonly PLACEMENT: react.ComponentType<PlacementBlockProps>;
806
805
  };
807
806
  type ComponentRegistry = typeof UNIVERSE_COMPONENTS;
808
807
  type UniverseComponentType = keyof ComponentRegistry;
@@ -827,4 +826,14 @@ declare function ToastProvider({ children }: {
827
826
 
828
827
  declare function useToast(): ToastContextType;
829
828
 
830
- export { type BaseComponentProps, ColumnHeaderTitle, type ColumnHeaderTitleProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentRegistry, type ComponentState, type CreateRecordPayload, CreateTemplateModal, type CreateTemplateModalProps, DEFAULT_PLACEMENT_STATUS_COLORS, DatePickerCell, type DeleteRecordPayload, DynamicFiltersBlock, type DynamicFiltersBlockProps, LinkPickerCell, type MetaTemplateComponent, type MetaWhatsAppTemplate, NON_TEXT_TYPES, type OrgRole, PASTEL_PALETTES, type PastelPalette, PlacementBlock, type PlacementBlockProps, type PlacementColumnOption, type PlacementConfig, PlacementSettings, type PlacementStatusColor, PlacementStatusEditor, type PlacementStatusSetting, RELATION_LABEL_KEY, RELATION_SEP, type RelationFilterOption, type RelationFilterPayload, RelationFilterPopover, type RelationFilterPopoverProps, RelationPickerCell, type RolePermissions, type RowStatusType, SettingsAndActionsBlock, type SettingsAndActionsBlockProps, SmartTextCell, type SplitTitleResult, TableBlock, TableBlockClient, type TableBlockProps, type TableConfig, type TableData, TimePickerCell, ToastContext, type ToastContextType, type ToastItem, ToastProvider, TruncatedTooltip, UNIVERSE_COMPONENTS, type UniverseComponentType, type UpdateRecordPayload, type UseColumnReorderOptions, type UseColumnResizeOptions, WhatsAppComponent, type WhatsAppComponentProps, type WhatsAppData, buildColumnOptions, buildRelationRef, calculateMinColumnWidth, checkElementTruncation, cn, columnRefLabel, enrichRowsWithRelations, formatConflictCellValue, formatPhoneDisplay, formatTimeInput, formatTimeIso, generateWhatsAppLink, getDeterministicPastelBadge, getRolePermissions, isUserColumn, isValidPhoneNumber, measureTextWidth, normalizePhoneForWhatsApp, normalizeRelationValue, openWhatsAppChat, parseColumnRef, parseLinkValue, parseTimeParts, readColumnValue, resolveDefaultStatusId, resolveProtocol, sanitizePhoneNumber, splitHeaderTitle, tableColumns, useColumnReorder, useColumnResize, useSmartTooltip, useToast, useWhatsAppState };
829
+ declare const UNIVERSE_THEME_IDS: readonly ["classic", "clean", "ocean", "warm"];
830
+ type UniverseThemeId = (typeof UNIVERSE_THEME_IDS)[number];
831
+ declare function resolveUniverseTheme(value: unknown): UniverseThemeId;
832
+ /**
833
+ * עוטף רכיב ב-data-theme לפי settings.theme (או config.theme) שהפלטפורמה מוסיפה לכל רכיב.
834
+ * display: contents אומר שהעטיפה לא משנה את הפריסה. משתני CSS עדיין עוברים בירושה לילדים.
835
+ * הערה: חלונות שנפתחים מחוץ לעץ (portal) לא יהיו בתוך העטיפה, ולכן עדיף להגדיר data-theme גם על <html> באתר.
836
+ */
837
+ declare function withThemeScope<P extends object>(Component: react.ComponentType<P>): react.ComponentType<P>;
838
+
839
+ export { type BaseComponentProps, ColumnHeaderTitle, type ColumnHeaderTitleProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentRegistry, type ComponentState, type CreateRecordPayload, CreateTemplateModal, type CreateTemplateModalProps, DEFAULT_PLACEMENT_STATUS_COLORS, DatePickerCell, type DeleteRecordPayload, DynamicFiltersBlock, type DynamicFiltersBlockProps, LinkPickerCell, type MetaTemplateComponent, type MetaWhatsAppTemplate, NON_TEXT_TYPES, type OrgRole, PASTEL_PALETTES, type PastelPalette, PlacementBlock, type PlacementBlockProps, type PlacementColumnOption, type PlacementConfig, PlacementSettings, type PlacementStatusColor, PlacementStatusEditor, type PlacementStatusSetting, RELATION_LABEL_KEY, RELATION_SEP, type RelationFilterOption, type RelationFilterPayload, RelationFilterPopover, type RelationFilterPopoverProps, RelationPickerCell, type RolePermissions, type RowStatusType, SettingsAndActionsBlock, type SettingsAndActionsBlockProps, SmartTextCell, type SplitTitleResult, TableBlock, TableBlockClient, type TableBlockProps, type TableConfig, type TableData, TimePickerCell, ToastContext, type ToastContextType, type ToastItem, ToastProvider, TruncatedTooltip, UNIVERSE_COMPONENTS, UNIVERSE_THEME_IDS, type UniverseComponentType, type UniverseThemeId, type UpdateRecordPayload, type UseColumnReorderOptions, type UseColumnResizeOptions, WhatsAppComponent, type WhatsAppComponentProps, type WhatsAppData, buildColumnOptions, buildRelationRef, calculateMinColumnWidth, checkElementTruncation, cn, columnRefLabel, enrichRowsWithRelations, formatConflictCellValue, formatPhoneDisplay, formatTimeInput, formatTimeIso, generateWhatsAppLink, getDeterministicPastelBadge, getRolePermissions, isUserColumn, isValidPhoneNumber, measureTextWidth, normalizePhoneForWhatsApp, normalizeRelationValue, openWhatsAppChat, parseColumnRef, parseLinkValue, parseTimeParts, readColumnValue, resolveDefaultStatusId, resolveProtocol, resolveUniverseTheme, sanitizePhoneNumber, splitHeaderTitle, tableColumns, useColumnReorder, useColumnResize, useSmartTooltip, useToast, useWhatsAppState, withThemeScope };
package/dist/index.js CHANGED
@@ -94,6 +94,7 @@ __export(src_exports, {
94
94
  ToastProvider: () => ToastProvider,
95
95
  TruncatedTooltip: () => TruncatedTooltip,
96
96
  UNIVERSE_COMPONENTS: () => UNIVERSE_COMPONENTS,
97
+ UNIVERSE_THEME_IDS: () => UNIVERSE_THEME_IDS,
97
98
  WhatsAppComponent: () => WhatsAppComponent,
98
99
  applyFormulaColumns: () => applyFormulaColumns,
99
100
  applyRelationCopy: () => applyRelationCopy,
@@ -155,6 +156,7 @@ __export(src_exports, {
155
156
  renameCopyTarget: () => renameCopyTarget,
156
157
  resolveDefaultStatusId: () => resolveDefaultStatusId,
157
158
  resolveProtocol: () => resolveProtocol,
159
+ resolveUniverseTheme: () => resolveUniverseTheme,
158
160
  sanitizeDefaultFilter: () => sanitizeDefaultFilter,
159
161
  sanitizePhoneNumber: () => sanitizePhoneNumber,
160
162
  sanitizeTemplateNameInput: () => sanitizeTemplateNameInput,
@@ -175,7 +177,8 @@ __export(src_exports, {
175
177
  validateTemplateButtons: () => validateTemplateButtons,
176
178
  validateWhatsAppTemplate: () => validateWhatsAppTemplate,
177
179
  validateWordToVariableRatio: () => validateWordToVariableRatio,
178
- withDefaultFilter: () => withDefaultFilter
180
+ withDefaultFilter: () => withDefaultFilter,
181
+ withThemeScope: () => withThemeScope
179
182
  });
180
183
  module.exports = __toCommonJS(src_exports);
181
184
 
@@ -15475,12 +15478,30 @@ function FormBlock({ settings: schema, executeAction, componentId, className = "
15475
15478
  ] });
15476
15479
  }
15477
15480
 
15481
+ // src/themes/ThemeScope.tsx
15482
+ var React22 = __toESM(require("react"));
15483
+ var import_jsx_runtime29 = require("react/jsx-runtime");
15484
+ var UNIVERSE_THEME_IDS = ["classic", "clean", "ocean", "warm"];
15485
+ function resolveUniverseTheme(value) {
15486
+ return typeof value === "string" && UNIVERSE_THEME_IDS.includes(value) ? value : "classic";
15487
+ }
15488
+ function withThemeScope(Component) {
15489
+ function ThemeScoped(props) {
15490
+ var _a, _b, _c;
15491
+ const p = props;
15492
+ const theme = resolveUniverseTheme((_c = (_a = p.settings) == null ? void 0 : _a.theme) != null ? _c : (_b = p.config) == null ? void 0 : _b.theme);
15493
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { "data-theme": theme, style: { display: "contents" }, children: React22.createElement(Component, props) });
15494
+ }
15495
+ ThemeScoped.displayName = `ThemeScoped(${Component.displayName || Component.name || "Component"})`;
15496
+ return ThemeScoped;
15497
+ }
15498
+
15478
15499
  // src/registry.ts
15479
15500
  var UNIVERSE_COMPONENTS = {
15480
- TABLE: TableBlock,
15481
- WHATSAPP: WhatsAppComponent,
15482
- FORM: FormBlock,
15483
- PLACEMENT: PlacementBlock
15501
+ TABLE: withThemeScope(TableBlock),
15502
+ WHATSAPP: withThemeScope(WhatsAppComponent),
15503
+ FORM: withThemeScope(FormBlock),
15504
+ PLACEMENT: withThemeScope(PlacementBlock)
15484
15505
  };
15485
15506
  // Annotate the CommonJS export names for ESM import in node:
15486
15507
  0 && (module.exports = {
@@ -15518,6 +15539,7 @@ var UNIVERSE_COMPONENTS = {
15518
15539
  ToastProvider,
15519
15540
  TruncatedTooltip,
15520
15541
  UNIVERSE_COMPONENTS,
15542
+ UNIVERSE_THEME_IDS,
15521
15543
  WhatsAppComponent,
15522
15544
  applyFormulaColumns,
15523
15545
  applyRelationCopy,
@@ -15579,6 +15601,7 @@ var UNIVERSE_COMPONENTS = {
15579
15601
  renameCopyTarget,
15580
15602
  resolveDefaultStatusId,
15581
15603
  resolveProtocol,
15604
+ resolveUniverseTheme,
15582
15605
  sanitizeDefaultFilter,
15583
15606
  sanitizePhoneNumber,
15584
15607
  sanitizeTemplateNameInput,
@@ -15599,5 +15622,6 @@ var UNIVERSE_COMPONENTS = {
15599
15622
  validateTemplateButtons,
15600
15623
  validateWhatsAppTemplate,
15601
15624
  validateWordToVariableRatio,
15602
- withDefaultFilter
15625
+ withDefaultFilter,
15626
+ withThemeScope
15603
15627
  });
package/dist/index.mjs CHANGED
@@ -15383,12 +15383,30 @@ function FormBlock({ settings: schema, executeAction, componentId, className = "
15383
15383
  ] });
15384
15384
  }
15385
15385
 
15386
+ // src/themes/ThemeScope.tsx
15387
+ import * as React22 from "react";
15388
+ import { jsx as jsx29 } from "react/jsx-runtime";
15389
+ var UNIVERSE_THEME_IDS = ["classic", "clean", "ocean", "warm"];
15390
+ function resolveUniverseTheme(value) {
15391
+ return typeof value === "string" && UNIVERSE_THEME_IDS.includes(value) ? value : "classic";
15392
+ }
15393
+ function withThemeScope(Component) {
15394
+ function ThemeScoped(props) {
15395
+ var _a, _b, _c;
15396
+ const p = props;
15397
+ const theme = resolveUniverseTheme((_c = (_a = p.settings) == null ? void 0 : _a.theme) != null ? _c : (_b = p.config) == null ? void 0 : _b.theme);
15398
+ return /* @__PURE__ */ jsx29("div", { "data-theme": theme, style: { display: "contents" }, children: React22.createElement(Component, props) });
15399
+ }
15400
+ ThemeScoped.displayName = `ThemeScoped(${Component.displayName || Component.name || "Component"})`;
15401
+ return ThemeScoped;
15402
+ }
15403
+
15386
15404
  // src/registry.ts
15387
15405
  var UNIVERSE_COMPONENTS = {
15388
- TABLE: TableBlock,
15389
- WHATSAPP: WhatsAppComponent,
15390
- FORM: FormBlock,
15391
- PLACEMENT: PlacementBlock
15406
+ TABLE: withThemeScope(TableBlock),
15407
+ WHATSAPP: withThemeScope(WhatsAppComponent),
15408
+ FORM: withThemeScope(FormBlock),
15409
+ PLACEMENT: withThemeScope(PlacementBlock)
15392
15410
  };
15393
15411
  export {
15394
15412
  COLUMN_CAPABILITIES,
@@ -15425,6 +15443,7 @@ export {
15425
15443
  ToastProvider,
15426
15444
  TruncatedTooltip,
15427
15445
  UNIVERSE_COMPONENTS,
15446
+ UNIVERSE_THEME_IDS,
15428
15447
  WhatsAppComponent,
15429
15448
  applyFormulaColumns,
15430
15449
  applyRelationCopy,
@@ -15486,6 +15505,7 @@ export {
15486
15505
  renameCopyTarget,
15487
15506
  resolveDefaultStatusId,
15488
15507
  resolveProtocol,
15508
+ resolveUniverseTheme,
15489
15509
  sanitizeDefaultFilter,
15490
15510
  sanitizePhoneNumber,
15491
15511
  sanitizeTemplateNameInput,
@@ -15506,5 +15526,6 @@ export {
15506
15526
  validateTemplateButtons,
15507
15527
  validateWhatsAppTemplate,
15508
15528
  validateWordToVariableRatio,
15509
- withDefaultFilter
15529
+ withDefaultFilter,
15530
+ withThemeScope
15510
15531
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universe-platform/ui",
3
- "version": "0.1.0-beta.40",
3
+ "version": "0.1.0-beta.42",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",