@multivendorx/zyra 1.0.64 → 1.0.65

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 (125) hide show
  1. package/build/index.d.ts +1 -0
  2. package/build/index.js +6770 -6158
  3. package/build/index.js.map +1 -1
  4. package/build/index.mjs +6770 -6158
  5. package/build/index.mjs.map +1 -1
  6. package/build/types/builderform/src/EmailBuilder.d.ts +29 -0
  7. package/build/types/builderform/src/EmailTemplateEditorPopup.d.ts +16 -0
  8. package/build/types/builderform/src/FormBuilder/Builder.d.ts +11 -0
  9. package/build/types/builderform/src/FormBuilder/Canvas.d.ts +23 -0
  10. package/build/types/builderform/src/FormBuilder/FormBuilder.d.ts +13 -0
  11. package/build/types/builderform/src/FormBuilder/FormSettings.d.ts +19 -0
  12. package/build/types/builderform/src/FormBuilder/Inspector.d.ts +14 -0
  13. package/build/types/builderform/src/FormBuilder/Share.d.ts +10 -0
  14. package/build/types/builderform/src/FormBuilder/When.d.ts +20 -0
  15. package/build/types/builderform/src/FormBuilder/extensions.d.ts +97 -0
  16. package/build/types/builderform/src/FormBuilder/fields.d.ts +36 -0
  17. package/build/types/builderform/src/FormBuilder/index.d.ts +5 -0
  18. package/build/types/builderform/src/FormBuilder/route.d.ts +10 -0
  19. package/build/types/builderform/src/FormBuilder/runtime.d.ts +87 -0
  20. package/build/types/builderform/src/FormBuilder/types.d.ts +151 -0
  21. package/build/types/builderform/src/Switch.d.ts +9 -0
  22. package/build/types/builderform/src/emailBlockTypes.d.ts +89 -0
  23. package/build/types/builderform/src/index.d.ts +9 -0
  24. package/build/types/builderform/src/legacyEmailAdapter.d.ts +40 -0
  25. package/build/types/bundle/src/fieldRegistry.d.ts +1 -0
  26. package/build/types/bundle/src/index.d.ts +6 -0
  27. package/build/types/components/src/ActivityListComponent.d.ts +39 -0
  28. package/build/types/components/src/AnalyticsComponent.d.ts +56 -0
  29. package/build/types/components/src/AppShellComponent.d.ts +64 -0
  30. package/build/types/components/src/AuthLayoutComponent.d.ts +26 -0
  31. package/build/types/components/src/AvatarComponent.d.ts +13 -0
  32. package/build/types/components/src/BadgeComponent.d.ts +30 -0
  33. package/build/types/components/src/BrandComponent.d.ts +18 -0
  34. package/build/types/components/src/CardComponent.d.ts +25 -0
  35. package/build/types/components/src/ChartComponent.d.ts +58 -0
  36. package/build/types/components/src/ChoiceCardComponent.d.ts +41 -0
  37. package/build/types/components/src/ClipboardComponent.d.ts +13 -0
  38. package/build/types/components/src/ColumnComponent.d.ts +11 -0
  39. package/build/types/components/src/ContainerComponent.d.ts +11 -0
  40. package/build/types/components/src/CustomRecaptchaComponent.d.ts +2 -0
  41. package/build/types/components/src/EntityCellComponent.d.ts +30 -0
  42. package/build/types/components/src/FilterComponent.d.ts +20 -0
  43. package/build/types/components/src/FormGroupComponent.d.ts +19 -0
  44. package/build/types/components/src/FormGroupWrapperComponent.d.ts +10 -0
  45. package/build/types/components/src/FullPageLoadingComponent.d.ts +14 -0
  46. package/build/types/components/src/HeaderComponent.d.ts +93 -0
  47. package/build/types/components/src/HeaderSearchComponent.d.ts +32 -0
  48. package/build/types/components/src/IconComponent.d.ts +12 -0
  49. package/build/types/components/src/InformationItemComponent.d.ts +38 -0
  50. package/build/types/components/src/LegendComponent.d.ts +52 -0
  51. package/build/types/components/src/ListComponent.d.ts +47 -0
  52. package/build/types/components/src/ListToolbarComponent.d.ts +53 -0
  53. package/build/types/components/src/MapComponent.d.ts +33 -0
  54. package/build/types/components/src/MetricTileComponent.d.ts +174 -0
  55. package/build/types/components/src/ModuleGridComponent.d.ts +74 -0
  56. package/build/types/components/src/ModuleGuardComponent.d.ts +17 -0
  57. package/build/types/components/src/NavigatorComponent.d.ts +111 -0
  58. package/build/types/components/src/NoticeComponent.d.ts +48 -0
  59. package/build/types/components/src/PopupComponent.d.ts +28 -0
  60. package/build/types/components/src/RecaptchaComponent.d.ts +11 -0
  61. package/build/types/components/src/SaveStatusComponent.d.ts +18 -0
  62. package/build/types/components/src/ScoreRingComponent.d.ts +16 -0
  63. package/build/types/components/src/SectionComponent.d.ts +18 -0
  64. package/build/types/components/src/SettingRowComponent.d.ts +134 -0
  65. package/build/types/components/src/SettingsSectionComponent.d.ts +24 -0
  66. package/build/types/components/src/SetupWizardComponent.d.ts +75 -0
  67. package/build/types/components/src/SkeletonComponent.d.ts +11 -0
  68. package/build/types/components/src/SystemInfoComponent.d.ts +11 -0
  69. package/build/types/components/src/TabsComponent.d.ts +34 -0
  70. package/build/types/components/src/ThemeChoiceComponent.d.ts +19 -0
  71. package/build/types/components/src/TooltipComponent.d.ts +12 -0
  72. package/build/types/components/src/TourComponent.d.ts +26 -0
  73. package/build/types/components/src/TrendIndicatorComponent.d.ts +21 -0
  74. package/build/types/components/src/TrendStatComponent.d.ts +34 -0
  75. package/build/types/components/src/TypographyComponent.d.ts +58 -0
  76. package/build/types/components/src/index.d.ts +84 -0
  77. package/build/types/components/src/paletteClass.d.ts +3 -0
  78. package/build/types/core/src/ModuleContext.d.ts +8 -0
  79. package/build/types/core/src/SettingContext.d.ts +17 -0
  80. package/build/types/core/src/ThemeContext.d.ts +20 -0
  81. package/build/types/core/src/apiService.d.ts +38 -0
  82. package/build/types/core/src/blockStyle.d.ts +63 -0
  83. package/build/types/core/src/colorPalette.d.ts +41 -0
  84. package/build/types/core/src/index.d.ts +14 -0
  85. package/build/types/core/src/utils.d.ts +1165 -0
  86. package/build/types/inputs/src/AddressInput.d.ts +24 -0
  87. package/build/types/inputs/src/ButtonInput.d.ts +53 -0
  88. package/build/types/inputs/src/CalendarInput.d.ts +46 -0
  89. package/build/types/inputs/src/DecoratedInput.d.ts +11 -0
  90. package/build/types/inputs/src/DynamicRowInput.d.ts +42 -0
  91. package/build/types/inputs/src/EmailInput.d.ts +15 -0
  92. package/build/types/inputs/src/EndpointInput.d.ts +4 -0
  93. package/build/types/inputs/src/EventCalendarInput.d.ts +25 -0
  94. package/build/types/inputs/src/ExpandablePanelInput.d.ts +116 -0
  95. package/build/types/inputs/src/FileInput.d.ts +39 -0
  96. package/build/types/inputs/src/InputRenderer.d.ts +94 -0
  97. package/build/types/inputs/src/LogViewerInput.d.ts +13 -0
  98. package/build/types/inputs/src/MultiCheckboxInput.d.ts +48 -0
  99. package/build/types/inputs/src/NestedInput.d.ts +54 -0
  100. package/build/types/inputs/src/PhoneInput.d.ts +29 -0
  101. package/build/types/inputs/src/PickerInput.d.ts +77 -0
  102. package/build/types/inputs/src/RandomkeyInput.d.ts +14 -0
  103. package/build/types/inputs/src/RichTextInput.d.ts +30 -0
  104. package/build/types/inputs/src/SelectInput.d.ts +40 -0
  105. package/build/types/inputs/src/SetupWizardInput.d.ts +50 -0
  106. package/build/types/inputs/src/ShortcodeTableInput.d.ts +23 -0
  107. package/build/types/inputs/src/TableInput.d.ts +72 -0
  108. package/build/types/inputs/src/TaskExecutorInput.d.ts +30 -0
  109. package/build/types/inputs/src/TextAreaInput.d.ts +27 -0
  110. package/build/types/inputs/src/TextInput.d.ts +33 -0
  111. package/build/types/inputs/src/ToggleInput.d.ts +37 -0
  112. package/build/types/inputs/src/index.d.ts +53 -0
  113. package/build/types/table/src/Table.d.ts +4 -0
  114. package/build/types/table/src/TableActionButtons.d.ts +16 -0
  115. package/build/types/table/src/TableBulkActions.d.ts +19 -0
  116. package/build/types/table/src/TableCard.d.ts +10 -0
  117. package/build/types/table/src/TableEditable.d.ts +18 -0
  118. package/build/types/table/src/TableFilter.d.ts +19 -0
  119. package/build/types/table/src/TablePagination.d.ts +17 -0
  120. package/build/types/table/src/TableRowActions.d.ts +17 -0
  121. package/build/types/table/src/TableUtils.d.ts +3 -0
  122. package/build/types/table/src/index.d.ts +5 -0
  123. package/build/types/table/src/tableLabels.d.ts +14 -0
  124. package/build/types/table/src/types.d.ts +166 -0
  125. package/package.json +2 -3
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ import './TypographyComponent.scss';
3
+ /**
4
+ * Every heading size, from the largest page title down to the smallest.
5
+ * `title` is the app's existing `.title` style (section/card headers, etc.)
6
+ * carried over as-is.
7
+ */
8
+ export type HeadingVariant = 'display' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'title';
9
+ /**
10
+ * Every supporting/body text size, plus the two small label styles. `desc`
11
+ * and `small-desc` are the app's existing `.desc`/`.desc.small` styles
12
+ * carried over as-is.
13
+ */
14
+ export type DescriptionVariant = 'body-lg' | 'body-md' | 'body-sm' | 'body-xs' | 'caption' | 'overline' | 'desc' | 'small-desc';
15
+ export type TypographyVariant = HeadingVariant | DescriptionVariant;
16
+ export type FontWeight = 'regular' | 'medium' | 'semibold' | 'bold';
17
+ /**
18
+ * Named colors that ship with the design system's `$color-palette`
19
+ * (see `@zyra/theme/src/global.scss`). Passing one of these applies the
20
+ * matching `color-*` class so the color also picks up theme/dark-mode
21
+ * awareness automatically.
22
+ */
23
+ export declare const TYPOGRAPHY_PALETTE_COLORS: readonly ["zyra-primary", "zyra-secondary", "zyra-accent", "zyra-support", "red", "green", "teal", "orange", "yellow", "blue", "purple", "indigo", "violet", "cyan", "sky", "pink", "rose", "lime", "gray", "dark-mode", "black", "white"];
24
+ export type TypographyPaletteColor = (typeof TYPOGRAPHY_PALETTE_COLORS)[number];
25
+ /**
26
+ * Any of the design system's named palette colors (`"zyra-accent"`,
27
+ * `"red"`, ...) OR any custom CSS color your own theme uses — a hex code,
28
+ * `rgb()`/`hsl()`, a named CSS color, or a `var(--your-token)`. Palette
29
+ * names are matched against `TYPOGRAPHY_PALETTE_COLORS`; anything else is
30
+ * applied as-is via inline style, so "my color" always works.
31
+ */
32
+ export type TypographyColor = TypographyPaletteColor | (string & {});
33
+ export interface TypographyComponentProps extends Omit<React.HTMLAttributes<HTMLElement>, 'color' | 'style' | 'className'> {
34
+ /** Which heading or description style to render. Defaults to `"body-md"`. */
35
+ variant?: TypographyVariant;
36
+ /** Override the rendered HTML tag (defaults to `"div"` — style always comes from the class, not the tag). */
37
+ as?: React.ElementType;
38
+ /** A palette color name (`"zyra-accent"`, `"red"`, ...) or any custom CSS color. */
39
+ color?: TypographyColor;
40
+ /** Override the variant's default font weight. */
41
+ weight?: FontWeight;
42
+ align?: 'left' | 'center' | 'right';
43
+ /** Truncate to a single line with an ellipsis instead of wrapping. */
44
+ truncate?: boolean;
45
+ className?: string;
46
+ style?: React.CSSProperties;
47
+ children?: React.ReactNode;
48
+ /** Same contract as React's native prop — for pre-sanitized HTML strings (e.g. a CMS-authored title/description). Mutually exclusive with `children`. */
49
+ dangerouslySetInnerHTML?: {
50
+ __html: string;
51
+ };
52
+ /** Renders a skeleton line sized to this variant instead of the real text/children — for a heading or description whose value is still loading. */
53
+ isLoading?: boolean;
54
+ /** `isLoading` only — skeleton width. Defaults to `'8rem'` for heading variants (`display`-`h6`, `title`) and `'100%'` for description/body variants. */
55
+ skeletonWidth?: number | string;
56
+ }
57
+ export declare const TypographyComponent: React.FC<TypographyComponentProps>;
58
+ export default TypographyComponent;
@@ -0,0 +1,84 @@
1
+ export { BadgeComponent } from './BadgeComponent';
2
+ export type { BadgeComponentProps } from './BadgeComponent';
3
+ export { IconComponent } from './IconComponent';
4
+ export type { IconComponentProps } from './IconComponent';
5
+ export { default as CardComponent } from './CardComponent';
6
+ export { MetricTileComponent, default as MetricTileFieldComponent, } from './MetricTileComponent';
7
+ export type { MetricTileComponentProps, MetricTileItem, MetricTileBadge, } from './MetricTileComponent';
8
+ export { LegendComponent } from './LegendComponent';
9
+ export type { LegendComponentProps, LegendItem, LegendTone, LegendDotColor, } from './LegendComponent';
10
+ export { default as ColumnComponent } from './ColumnComponent';
11
+ export { default as ContainerComponent } from './ContainerComponent';
12
+ export { default as FormGroupComponent } from './FormGroupComponent';
13
+ export { default as FormGroupWrapperComponent } from './FormGroupWrapperComponent';
14
+ export { default as SkeletonComponent } from './SkeletonComponent';
15
+ export { default as TooltipComponent } from './TooltipComponent';
16
+ export type { TooltipPosition } from './TooltipComponent';
17
+ export { default as ClipboardFieldComponent } from './ClipboardComponent';
18
+ export { ClipboardComponent } from './ClipboardComponent';
19
+ export { default as ModuleGuardComponent } from './ModuleGuardComponent';
20
+ export { default as AnalyticsComponent } from './AnalyticsComponent';
21
+ export { default as ScoreRingComponent } from './ScoreRingComponent';
22
+ export { default as TrendIndicatorComponent } from './TrendIndicatorComponent';
23
+ export { default as ActivityListComponent } from './ActivityListComponent';
24
+ export { default as TrendStatComponent } from './TrendStatComponent';
25
+ export { default as ChartComponent } from './ChartComponent';
26
+ export { default as InformationItemComponent } from './InformationItemComponent';
27
+ export { default as ListFieldComponent } from './ListComponent';
28
+ export { ListComponent } from './ListComponent';
29
+ export { default as SectionFieldComponent } from './SectionComponent';
30
+ export { SectionComponent } from './SectionComponent';
31
+ export { SettingsPanelComponent, SettingsSectionComponent, SettingsFieldComponent, SettingsWideComponent, } from './SettingsSectionComponent';
32
+ export type { SettingsSectionComponentProps } from './SettingsSectionComponent';
33
+ export { TypographyComponent } from './TypographyComponent';
34
+ export type { TypographyComponentProps, TypographyVariant, HeadingVariant, DescriptionVariant, TypographyColor, TypographyPaletteColor, FontWeight, } from './TypographyComponent';
35
+ export { TYPOGRAPHY_PALETTE_COLORS } from './TypographyComponent';
36
+ export { default as PopupFieldComponent } from './PopupComponent';
37
+ export { PopupComponent } from './PopupComponent';
38
+ export { NoticeComponent, NoticeReceiverComponent, NoticeManager } from './NoticeComponent';
39
+ export { default as NoticeFieldComponent } from './NoticeComponent';
40
+ export type { NoticeType, NoticePosition } from './NoticeComponent';
41
+ export { RecaptchaComponent, default as RecaptchaFieldComponent } from './RecaptchaComponent';
42
+ export { default as CustomRecaptchaComponent } from './CustomRecaptchaComponent';
43
+ export { default as ModuleGridComponent } from './ModuleGridComponent';
44
+ export type { ModuleGridLabels } from './ModuleGridComponent';
45
+ export { default as NavigatorComponent } from './NavigatorComponent';
46
+ export { NavigatorHeaderComponent } from './NavigatorComponent';
47
+ export { default as HeaderComponent } from './HeaderComponent';
48
+ export { default as HeaderSearchComponent } from './HeaderSearchComponent';
49
+ export { default as TabsFieldComponent } from './TabsComponent';
50
+ export { TabsComponent } from './TabsComponent';
51
+ export { SystemInfoComponent } from './SystemInfoComponent';
52
+ export { default as SystemInfoFieldComponent } from './SystemInfoComponent';
53
+ export { MapComponent } from './MapComponent';
54
+ export { default as MapProviderFieldComponent } from './MapComponent';
55
+ export { default as TourComponent } from './TourComponent';
56
+ export { default as SettingRowFieldComponent } from './SettingRowComponent';
57
+ export { SettingRowComponent, SettingToggle } from './SettingRowComponent';
58
+ export type { SettingRowProps, SettingRowItem, SettingRowControl, SettingRowValue, SettingToggleProps, } from './SettingRowComponent';
59
+ export { default as ChoiceCardComponent } from './ChoiceCardComponent';
60
+ export type { ChoiceCardComponentProps, ChoiceCardOption } from './ChoiceCardComponent';
61
+ export { SetupWizardComponent, SetupWizardSection, SetupWizardField, SetupWizardRow, SetupWizardActionsGroup, SetupChecksComponent, SetupSummaryComponent, SetupOverviewComponent, } from './SetupWizardComponent';
62
+ export type { SetupWizardComponentProps, SetupWizardStep, SetupWizardSectionProps, SetupWizardFieldProps, SetupWizardActionsGroupProps, SetupChecksComponentProps, SetupCheckItem, SetupCheckStatus, SetupSummaryComponentProps, SetupSummaryRow, SetupOverviewItem, } from './SetupWizardComponent';
63
+ export { BreadcrumbTrail } from './NavigatorComponent';
64
+ export type { BreadcrumbTrailItem } from './NavigatorComponent';
65
+ export { SaveStatusComponent } from './SaveStatusComponent';
66
+ export type { SaveStatus, SaveStatusLabels, SaveStatusComponentProps, } from './SaveStatusComponent';
67
+ export { ThemeChoiceComponent } from './ThemeChoiceComponent';
68
+ export type { ThemeChoiceComponentProps, ThemeChoiceOption, ThemeChoiceSwatch, } from './ThemeChoiceComponent';
69
+ export { FilterComponent } from './FilterComponent';
70
+ export type { FilterComponentProps, FilterOption, } from './FilterComponent';
71
+ export { ListToolbarComponent } from './ListToolbarComponent';
72
+ export type { ListToolbarComponentProps, ListToolbarFilterOption, ListToolbarActiveFilter, } from './ListToolbarComponent';
73
+ export { AvatarComponent, getInitials } from './AvatarComponent';
74
+ export type { AvatarComponentProps } from './AvatarComponent';
75
+ export { BrandComponent } from './BrandComponent';
76
+ export type { BrandComponentProps } from './BrandComponent';
77
+ export { FullPageLoadingComponent } from './FullPageLoadingComponent';
78
+ export type { FullPageLoadingComponentProps } from './FullPageLoadingComponent';
79
+ export { AuthLayoutComponent } from './AuthLayoutComponent';
80
+ export type { AuthLayoutComponentProps } from './AuthLayoutComponent';
81
+ export { AppShellComponent } from './AppShellComponent';
82
+ export type { AppShellComponentProps, AppShellNavGroup, AppShellNavItem, AppShellLink, AppShellLabels, } from './AppShellComponent';
83
+ export { EntityCellComponent } from './EntityCellComponent';
84
+ export type { EntityCellComponentProps, EntityCellDetail } from './EntityCellComponent';
@@ -0,0 +1,3 @@
1
+ export declare const paletteClasses: (classes?: string) => string;
2
+ export declare const isPaletteColor: (color?: string) => boolean;
3
+ export declare const zyraColor: (color?: string) => string;
@@ -0,0 +1,8 @@
1
+ type ModuleContextType = {
2
+ modules: string[];
3
+ insertModule: (moduleName: string) => void;
4
+ removeModule: (moduleName: string) => void;
5
+ };
6
+ export declare const useModules: import("zustand").UseBoundStore<import("zustand").StoreApi<ModuleContextType>>;
7
+ export declare function initializeModules(pluginName: string, pluginSlug: string, apiLink: string): Promise<void>;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import React, { ReactNode } from 'react';
2
+ type SettingValue = string | number | boolean | null | Record<string, string | number | boolean | null>;
3
+ type SettingState = {
4
+ settingName: string;
5
+ setting: Record<string, SettingValue>;
6
+ };
7
+ export type SettingContextType = SettingState & {
8
+ setSetting: (name: string, setting: Record<string, SettingValue>) => void;
9
+ updateSetting: (key: string, value: SettingValue) => void;
10
+ clearSetting: () => void;
11
+ };
12
+ type SettingProviderProps = {
13
+ children: ReactNode;
14
+ };
15
+ declare const SettingProvider: React.FC<SettingProviderProps>;
16
+ declare const useSetting: () => SettingContextType;
17
+ export { SettingProvider, useSetting };
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ type Theme = 'light' | 'dark';
3
+ type ThemeState = {
4
+ theme: Theme;
5
+ };
6
+ type ThemeContextValue = ThemeState & {
7
+ toggleTheme: () => void;
8
+ };
9
+ /**
10
+ * context provider component
11
+ * @param {*} props
12
+ * @returns
13
+ */
14
+ declare const ThemeProvider: React.FC<React.PropsWithChildren>;
15
+ /**
16
+ * get theme context.
17
+ * @returns [ state, toggleTheme ]
18
+ */
19
+ declare const useTheme: () => ThemeContextValue;
20
+ export { ThemeProvider, useTheme };
@@ -0,0 +1,38 @@
1
+ import type { AxiosRequestConfig } from 'axios';
2
+ type AppLocalizer = {
3
+ nonce: string;
4
+ apiUrl: string;
5
+ restUrl: string;
6
+ };
7
+ /**
8
+ * Get response from REST API.
9
+ *
10
+ * @param url - API URL
11
+ * @param headers - Request headers
12
+ *
13
+ * @return API response data or null in case of an error
14
+ */
15
+ export declare const getApiResponse: <T>(url: string, headers?: AxiosRequestConfig) => Promise<T | null>;
16
+ /**
17
+ * Send response to REST API.
18
+ *
19
+ * @param appLocalizer - Global variable
20
+ * @param url - API URL
21
+ * @param data - Data to send
22
+ * @param headers - Request headers
23
+ *
24
+ * @return API response data or null in case of an error
25
+ */
26
+ export declare const sendApiResponse: <T>(appLocalizer: AppLocalizer, url: string, data: unknown, headers?: AxiosRequestConfig) => Promise<T | null>;
27
+ /**
28
+ * Generate API endpoint URL.
29
+ *
30
+ * @param appLocalizer - Global variable
31
+ * @param endpoint - API endpoint
32
+ * @param namespace - API namespace (optional)
33
+ * @param rootUrl - API root URL (optional)
34
+ *
35
+ * @return Complete API URL
36
+ */
37
+ export declare const getApiLink: (appLocalizer: AppLocalizer, endpoint: string, namespace?: string, rootUrl?: string) => string;
38
+ export {};
@@ -0,0 +1,63 @@
1
+ import React from 'react';
2
+ export interface BlockStyle {
3
+ backgroundColor?: string;
4
+ color?: string;
5
+ borderColor?: string;
6
+ paddingTop?: number;
7
+ paddingRight?: number;
8
+ paddingBottom?: number;
9
+ paddingLeft?: number;
10
+ marginTop?: number;
11
+ marginRight?: number;
12
+ marginBottom?: number;
13
+ marginLeft?: number;
14
+ borderWidth?: number;
15
+ borderStyle?: string;
16
+ borderRadius?: number;
17
+ textAlign?: 'left' | 'center' | 'right' | 'justify';
18
+ fontSize?: number;
19
+ fontFamily?: string;
20
+ lineHeight?: number;
21
+ fontWeight?: string;
22
+ textDecoration?: string;
23
+ align?: 'left' | 'center' | 'right';
24
+ width?: string;
25
+ height?: string | number;
26
+ justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
27
+ alignItems?: 'stretch' | 'flex-start' | 'center' | 'flex-end' | 'baseline';
28
+ gap?: number;
29
+ }
30
+ export declare const formatSpacing: (type: "padding" | "margin", style: BlockStyle) => string;
31
+ export declare const generateColorStyles: (style?: BlockStyle) => React.CSSProperties;
32
+ export declare const generateSpacingStyles: (style?: BlockStyle) => React.CSSProperties;
33
+ export declare const generateBorderStyles: (style?: BlockStyle) => React.CSSProperties;
34
+ export declare const generateTextStyles: (style?: BlockStyle) => React.CSSProperties;
35
+ export declare const generateDimensionStyles: (style?: BlockStyle) => React.CSSProperties;
36
+ export declare const generateColumnStyles: (style?: BlockStyle) => React.CSSProperties;
37
+ export declare const generateBlockStyles: (style?: BlockStyle, options?: {
38
+ includeText?: boolean;
39
+ includeDimensions?: boolean;
40
+ }) => React.CSSProperties;
41
+ export declare const DEFAULT_BLOCK_STYLES: Partial<BlockStyle>;
42
+ export declare const BLOCK_STYLE_PRESETS: {
43
+ heading: {
44
+ fontSize: number;
45
+ fontWeight: string;
46
+ lineHeight: number;
47
+ };
48
+ button: {
49
+ backgroundColor: string;
50
+ color: string;
51
+ fontSize: number;
52
+ fontWeight: string;
53
+ paddingTop: number;
54
+ paddingRight: number;
55
+ paddingBottom: number;
56
+ paddingLeft: number;
57
+ borderRadius: number;
58
+ align: "center";
59
+ };
60
+ image: {
61
+ align: "center";
62
+ };
63
+ };
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The real solid-color hex values behind zyra's own `$color-palette`/
3
+ * `$btn-color-palette` Sass maps (packages/theme/src/global.scss) —
4
+ * every named color `BadgeComponent`/`ButtonInput`/`TypographyComponent`'s
5
+ * own `color` prop already resolves to a CSS class for.
6
+ *
7
+ * Exists for the one case those components' own class-based `color` prop
8
+ * doesn't cover: a call site that needs a literal CSS color string
9
+ * (`ChartComponent`'s own `color`/`data[].color`, a raw inline `style`,
10
+ * an SVG `fill`, …) instead of a class name. Without this, that need was
11
+ * being met by re-guessing the hex locally — the exact drift this
12
+ * constant exists to end (VuloPilot's own severity/status tones had
13
+ * `#d97706`/`#f97316` invented in a dozen different files for what was
14
+ * always meant to be the same real orange this palette already ships,
15
+ * `#e67a2e`).
16
+ *
17
+ * Kept in sync with `$color-palette`/`$btn-color-palette` by hand — a
18
+ * Sass map isn't reachable from JS without a build step, so this is the
19
+ * one other place a real palette change (new color, or a value edit) has
20
+ * to be repeated.
21
+ */
22
+ export declare const COLOR_PALETTE: {
23
+ readonly critical: "#991b1b";
24
+ readonly red: "#dc2626";
25
+ readonly green: "#16a34a";
26
+ readonly orange: "#e67a2e";
27
+ readonly ai: "#e67a2e";
28
+ readonly yellow: "#b7791f";
29
+ readonly blue: "#0284c7";
30
+ readonly sky: "#0284c7";
31
+ readonly cyan: "#0891b2";
32
+ readonly teal: "#0f9f91";
33
+ readonly indigo: "#6366c8";
34
+ readonly violet: "#8b5cf6";
35
+ readonly pink: "#db2777";
36
+ readonly rose: "#e11d48";
37
+ readonly lime: "#65a30d";
38
+ readonly gray: "#6b7280";
39
+ readonly 'dark-mode': "#374151";
40
+ };
41
+ export type ColorPaletteName = keyof typeof COLOR_PALETTE;
@@ -0,0 +1,14 @@
1
+ export { getApiResponse, sendApiResponse, getApiLink } from './apiService';
2
+ export { configureZyra, getZyraConfig, useZyraConfig, ZyraVariable } from './utils';
3
+ export type { ZyraConfig } from './utils';
4
+ export { getAvailableSettings, getSettingById, isActiveSetting, getDefaultSettings, filterSettingByIds, getSettingsByPriority, } from './utils';
5
+ export type { FieldComponent } from './utils';
6
+ export { CountryCodes, useOutsideClick, FIELD_REGISTRY, scrollToId } from './utils';
7
+ export type { BlockStyle } from './blockStyle';
8
+ export { formatSpacing, generateColorStyles, generateSpacingStyles, generateBorderStyles, generateTextStyles, generateDimensionStyles, generateColumnStyles, generateBlockStyles, DEFAULT_BLOCK_STYLES, BLOCK_STYLE_PRESETS, } from './blockStyle';
9
+ export { useModules, initializeModules } from './ModuleContext';
10
+ export { SettingProvider, useSetting } from './SettingContext';
11
+ export type { SettingContextType } from './SettingContext';
12
+ export { ThemeProvider, useTheme } from './ThemeContext';
13
+ export { COLOR_PALETTE } from './colorPalette';
14
+ export type { ColorPaletteName } from './colorPalette';