@plitzi/sdk-elements 0.37.2 → 0.37.3

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 (158) hide show
  1. package/CHANGELOG.md +1155 -0
  2. package/dist/Component/ComponentProvider.mjs +10 -5
  3. package/dist/Element/JsxManager.mjs +1 -0
  4. package/dist/Element/PluginRemote.d.ts +3 -1
  5. package/dist/Element/PluginRemote.mjs +9 -9
  6. package/dist/Element/helpers/elementConstants.mjs +28 -0
  7. package/dist/Element/helpers/elementUtils.mjs +1 -1
  8. package/dist/Element/helpers/loadComponent.d.ts +6 -1
  9. package/dist/Element/helpers/loadComponent.mjs +7 -7
  10. package/dist/Element/helpers/pluginSelector.mjs +1 -0
  11. package/dist/Element/hooks/useElementDataSource.mjs +23 -16
  12. package/dist/Element/hooks/useElementInternal.mjs +60 -52
  13. package/dist/Element/hooks/useInternalClassName.mjs +19 -18
  14. package/dist/Element/hooks/useKeyTriggers.d.ts +18 -0
  15. package/dist/Element/hooks/useKeyTriggers.mjs +36 -0
  16. package/dist/Element/hooks/useRootElementInteractions.mjs +65 -56
  17. package/dist/Element/hooks/useRscData.mjs +20 -15
  18. package/dist/dataSource/GlobalSources.mjs +114 -80
  19. package/dist/dataSource/getSourcesByElementId.mjs +2 -2
  20. package/dist/elements/advanced/BlockJsx/BlockJsx.mjs +1 -1
  21. package/dist/elements/advanced/NodeHtml/declaration.d.ts +1 -1
  22. package/dist/elements/advanced/NodeHtml/index.d.ts +1 -1
  23. package/dist/elements/basic/Button/Button.d.ts +10 -3
  24. package/dist/elements/basic/Button/Button.mjs +5 -5
  25. package/dist/elements/basic/Button/Settings.d.ts +2 -1
  26. package/dist/elements/basic/Button/Settings.mjs +14 -7
  27. package/dist/elements/basic/Button/declaration.d.ts +8 -3
  28. package/dist/elements/basic/Button/declaration.mjs +14 -6
  29. package/dist/elements/basic/Button/index.d.ts +8 -3
  30. package/dist/elements/basic/Dropdown/Dropdown.mjs +48 -39
  31. package/dist/elements/basic/Dropdown/declaration.d.ts +3 -0
  32. package/dist/elements/basic/Dropdown/declaration.mjs +9 -3
  33. package/dist/elements/basic/Dropdown/index.d.ts +3 -0
  34. package/dist/elements/basic/Dropdown/useDropdown.d.ts +6 -1
  35. package/dist/elements/basic/Dropdown/useDropdown.mjs +58 -41
  36. package/dist/elements/basic/Dropdown/useDropdownTrigger.d.ts +26 -0
  37. package/dist/elements/basic/Dropdown/useDropdownTrigger.mjs +30 -0
  38. package/dist/elements/basic/Heading/declaration.d.ts +9 -6
  39. package/dist/elements/basic/Heading/declaration.mjs +17 -9
  40. package/dist/elements/basic/Heading/index.d.ts +9 -6
  41. package/dist/elements/basic/Link/Link.mjs +4 -1
  42. package/dist/elements/basic/Link/Settings.d.ts +2 -1
  43. package/dist/elements/basic/Link/Settings.mjs +31 -24
  44. package/dist/elements/basic/Link/declaration.d.ts +5 -1
  45. package/dist/elements/basic/Link/declaration.mjs +16 -3
  46. package/dist/elements/basic/Link/index.d.ts +5 -1
  47. package/dist/elements/basic/Markdown/declaration.d.ts +1 -1
  48. package/dist/elements/basic/Markdown/declaration.mjs +1 -1
  49. package/dist/elements/basic/Markdown/index.d.ts +1 -1
  50. package/dist/elements/basic/RichText/declaration.d.ts +3 -0
  51. package/dist/elements/basic/RichText/declaration.mjs +8 -3
  52. package/dist/elements/basic/RichText/index.d.ts +3 -0
  53. package/dist/elements/basic/Text/declaration.d.ts +1 -1
  54. package/dist/elements/basic/Text/declaration.mjs +1 -1
  55. package/dist/elements/basic/Text/index.d.ts +1 -1
  56. package/dist/elements/basic/ThemeToggle/ThemeToggle.mjs +3 -0
  57. package/dist/elements/basic/ThemeToggle/declaration.d.ts +3 -0
  58. package/dist/elements/basic/ThemeToggle/declaration.mjs +4 -3
  59. package/dist/elements/basic/ThemeToggle/index.d.ts +3 -0
  60. package/dist/elements/declarations/index.d.ts +217 -17
  61. package/dist/elements/declarations/index.mjs +24 -22
  62. package/dist/elements/form/Form/declaration.d.ts +3 -0
  63. package/dist/elements/form/Form/declaration.mjs +4 -3
  64. package/dist/elements/form/Form/index.d.ts +3 -0
  65. package/dist/elements/form/FormControl/FormControl.d.ts +18 -6
  66. package/dist/elements/form/FormControl/FormControl.mjs +135 -127
  67. package/dist/elements/form/FormControl/Settings.d.ts +3 -1
  68. package/dist/elements/form/FormControl/Settings.mjs +73 -57
  69. package/dist/elements/form/FormControl/components/Label.d.ts +3 -1
  70. package/dist/elements/form/FormControl/components/Label.mjs +20 -18
  71. package/dist/elements/form/FormControl/components/visuallyHidden.d.ts +6 -0
  72. package/dist/elements/form/FormControl/components/visuallyHidden.mjs +14 -0
  73. package/dist/elements/form/FormControl/declaration.d.ts +5 -0
  74. package/dist/elements/form/FormControl/declaration.mjs +46 -30
  75. package/dist/elements/form/FormControl/hocs/withFieldValue.mjs +68 -61
  76. package/dist/elements/form/FormControl/index.d.ts +5 -0
  77. package/dist/elements/form/FormControl/inputs/Checkbox.d.ts +6 -1
  78. package/dist/elements/form/FormControl/inputs/Checkbox.mjs +5 -3
  79. package/dist/elements/form/FormControl/inputs/Input.d.ts +8 -1
  80. package/dist/elements/form/FormControl/inputs/Input.mjs +44 -38
  81. package/dist/elements/form/FormControl/inputs/Select.d.ts +6 -1
  82. package/dist/elements/form/FormControl/inputs/Select.mjs +12 -10
  83. package/dist/elements/form/FormControl/inputs/Textarea.d.ts +8 -1
  84. package/dist/elements/form/FormControl/inputs/Textarea.mjs +26 -21
  85. package/dist/elements/form/FormControl/inputs/useFocusWhenShown.d.ts +7 -0
  86. package/dist/elements/form/FormControl/inputs/useFocusWhenShown.mjs +9 -0
  87. package/dist/elements/index.d.ts +3 -1
  88. package/dist/elements/index.mjs +16 -14
  89. package/dist/elements/internal/LayoutContainer/declaration.d.ts +3 -0
  90. package/dist/elements/internal/LayoutContainer/declaration.mjs +15 -3
  91. package/dist/elements/internal/LayoutContainer/index.d.ts +3 -0
  92. package/dist/elements/media/FontAwesome/FontAwesome.d.ts +8 -1
  93. package/dist/elements/media/FontAwesome/FontAwesome.mjs +12 -5
  94. package/dist/elements/media/FontAwesome/Settings.d.ts +2 -1
  95. package/dist/elements/media/FontAwesome/Settings.mjs +29 -22
  96. package/dist/elements/media/FontAwesome/declaration.d.ts +1 -0
  97. package/dist/elements/media/FontAwesome/index.d.ts +1 -0
  98. package/dist/elements/media/Image/Image.d.ts +13 -2
  99. package/dist/elements/media/Image/Image.mjs +25 -25
  100. package/dist/elements/media/Image/Settings.d.ts +3 -1
  101. package/dist/elements/media/Image/Settings.mjs +29 -15
  102. package/dist/elements/media/Image/declaration.d.ts +7 -1
  103. package/dist/elements/media/Image/declaration.mjs +16 -3
  104. package/dist/elements/media/Image/index.d.ts +7 -1
  105. package/dist/elements/provider/ApiContainer/ApiContainer.mjs +145 -137
  106. package/dist/elements/provider/ApiContainer/declaration.d.ts +14 -1
  107. package/dist/elements/provider/ApiContainer/declaration.mjs +41 -4
  108. package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.d.ts +16 -0
  109. package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.mjs +4 -0
  110. package/dist/elements/provider/ApiContainer/helpers/queryInput.d.ts +5 -0
  111. package/dist/elements/provider/ApiContainer/helpers/queryInput.mjs +12 -0
  112. package/dist/elements/provider/ApiContainer/index.d.ts +14 -1
  113. package/dist/elements/provider/Channel/Channel.d.ts +26 -0
  114. package/dist/elements/provider/Channel/Channel.mjs +92 -0
  115. package/dist/elements/provider/Channel/Settings.d.ts +9 -0
  116. package/dist/elements/provider/Channel/Settings.mjs +38 -0
  117. package/dist/elements/provider/Channel/declaration.d.ts +138 -0
  118. package/dist/elements/provider/Channel/declaration.mjs +125 -0
  119. package/dist/elements/provider/Channel/index.d.ts +137 -0
  120. package/dist/elements/provider/Channel/index.mjs +6 -0
  121. package/dist/elements/settings.mjs +25 -23
  122. package/dist/elements/structure/Container/Container.d.ts +16 -2
  123. package/dist/elements/structure/Container/Container.mjs +18 -9
  124. package/dist/elements/structure/Container/Settings.d.ts +4 -2
  125. package/dist/elements/structure/Container/Settings.mjs +110 -69
  126. package/dist/elements/structure/Container/declaration.d.ts +12 -1
  127. package/dist/elements/structure/Container/declaration.mjs +35 -3
  128. package/dist/elements/structure/Container/index.d.ts +6 -1
  129. package/dist/elements/structure/Container/index.mjs +3 -3
  130. package/dist/elements/structure/DialogContainer/DialogContainer.mjs +123 -100
  131. package/dist/elements/structure/List/declaration.d.ts +4 -0
  132. package/dist/elements/structure/List/declaration.mjs +7 -3
  133. package/dist/elements/structure/List/index.d.ts +4 -0
  134. package/dist/elements/structure/ModalContainer/ModalContainer.mjs +92 -80
  135. package/dist/elements/structure/ModalContainer/metadataFromText.d.ts +1 -0
  136. package/dist/elements/structure/ModalContainer/metadataFromText.mjs +10 -0
  137. package/dist/elements/structure/ModalContainer/useModalDialog.d.ts +20 -0
  138. package/dist/elements/structure/ModalContainer/useModalDialog.mjs +31 -0
  139. package/dist/elements/structure/Pagination/Pagination.d.ts +6 -1
  140. package/dist/elements/structure/Pagination/Pagination.mjs +23 -21
  141. package/dist/elements/structure/Pagination/Settings.d.ts +2 -1
  142. package/dist/elements/structure/Pagination/Settings.mjs +16 -9
  143. package/dist/elements/structure/Pagination/declaration.d.ts +5 -0
  144. package/dist/elements/structure/Pagination/declaration.mjs +7 -3
  145. package/dist/elements/structure/Pagination/index.d.ts +5 -0
  146. package/dist/elements/structure/TabContainer/TabContainer.mjs +19 -17
  147. package/dist/elements/structure/TabContainer/TabContainerBody/TabContainerBody.mjs +8 -6
  148. package/dist/elements/structure/TabContainer/TabContainerContext.d.ts +2 -0
  149. package/dist/elements/structure/TabContainer/TabContainerHeader/TabContainerHeader.mjs +18 -14
  150. package/dist/elements/structure/TabContainer/TabContainerItem/TabContainerItem.d.ts +5 -1
  151. package/dist/elements/structure/TabContainer/TabContainerItem/TabContainerItem.mjs +48 -13
  152. package/dist/elements/structure/TabContainer/TabContainerItem/declaration.d.ts +1 -1
  153. package/dist/index.d.ts +220 -16
  154. package/dist/index.mjs +20 -17
  155. package/dist/realtime/useChannel.d.ts +35 -0
  156. package/dist/realtime/useChannel.mjs +57 -0
  157. package/package.json +67 -11
  158. package/dist/elements/media/FontAwesome/FontAwesome.stories-paused.d.ts +0 -1
@@ -6,31 +6,35 @@ import { jsx as c } from "react/jsx-runtime";
6
6
  import l from "clsx";
7
7
  //#region src/elements/structure/TabContainer/TabContainerHeader/TabContainerHeader.tsx
8
8
  var u = ({ ref: e, className: u = "", children: d }) => {
9
- let { tabSelected: f, onSelect: p } = o(n), { childrenParsed: m } = s(() => {
10
- let e = { childrenParsed: [] };
11
- return r.forEach(d, (t, n) => {
12
- if (!a(t)) return;
13
- let r = t.props;
14
- e.childrenParsed.push(i(t, {
15
- ...r,
9
+ let { baseId: f, tabSelected: p, onSelect: m } = o(n), { childrenParsed: h } = s(() => {
10
+ let e = { childrenParsed: [] }, t = r.toArray(d).filter(a).length;
11
+ return r.forEach(d, (n, r) => {
12
+ if (!a(n)) return;
13
+ let o = n.props;
14
+ e.childrenParsed.push(i(n, {
15
+ ...o,
16
16
  internalProps: {
17
- ...r.internalProps,
17
+ ...o.internalProps,
18
18
  isHeader: !0,
19
- onSelect: p,
20
- tabSelected: f,
21
- tabIndex: n
19
+ baseId: f,
20
+ onSelect: m,
21
+ tabSelected: p,
22
+ tabIndex: r,
23
+ tabCount: t
22
24
  }
23
25
  }));
24
26
  }), e;
25
27
  }, [
28
+ f,
26
29
  d,
27
- p,
28
- f
30
+ m,
31
+ p
29
32
  ]);
30
33
  return /* @__PURE__ */ c(t, {
31
34
  ref: e,
35
+ role: "tablist",
32
36
  className: l("plitzi-component__tab-container-header", u),
33
- children: m
37
+ children: h
34
38
  });
35
39
  }, d = e(u);
36
40
  //#endregion
@@ -3,12 +3,16 @@ export type TabContainerItemProps = {
3
3
  ref: RefObject<HTMLElement>;
4
4
  className: string;
5
5
  children: ReactNode;
6
+ baseId?: string;
6
7
  tabSelected?: number;
8
+ /** The item's position among its siblings — not the HTML attribute, which the tabs set themselves. */
7
9
  tabIndex?: number;
10
+ /** How many tabs the header holds, so the arrow keys can go round them. */
11
+ tabCount?: number;
8
12
  isHeader?: boolean;
9
13
  onSelect?: Dispatch<SetStateAction<number>>;
10
14
  };
11
- declare const TabContainerItem: ({ className, children, ref, tabSelected, tabIndex, isHeader, onSelect }: TabContainerItemProps) => import('react').JSX.Element;
15
+ declare const TabContainerItem: ({ className, children, ref, baseId, tabSelected, tabIndex: position, tabCount, isHeader, onSelect }: TabContainerItemProps) => import('react').JSX.Element;
12
16
  declare const _default: {
13
17
  (props: import('../../../../Element/hocs/withElement').WithElementProps<TabContainerItemProps>): import('react').JSX.Element;
14
18
  displayName: string;
@@ -4,21 +4,56 @@ import { useCallback as n } from "react";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  import i from "clsx";
6
6
  //#region src/elements/structure/TabContainer/TabContainerItem/TabContainerItem.tsx
7
- var a = ({ className: e = "", children: a, ref: o, tabSelected: s, tabIndex: c = 0, isHeader: l, onSelect: u }) => {
8
- let d = n(() => {
9
- l && s !== c && u?.(c);
7
+ var a = (e, t, n) => {
8
+ switch (e) {
9
+ case "ArrowRight":
10
+ case "ArrowDown": return (t + 1) % n;
11
+ case "ArrowLeft":
12
+ case "ArrowUp": return (t - 1 + n) % n;
13
+ case "Home": return 0;
14
+ case "End": return n - 1;
15
+ default: return;
16
+ }
17
+ }, o = ({ className: e = "", children: o, ref: s, baseId: c = "", tabSelected: l, tabIndex: u = 0, tabCount: d = 0, isHeader: f, onSelect: p }) => {
18
+ let m = l === u, h = `${c}_tab_${u}`, g = `${c}_panel_${u}`, _ = n(() => {
19
+ f && !m && p?.(u);
20
+ }, [
21
+ f,
22
+ m,
23
+ u,
24
+ p
25
+ ]), v = n((e) => {
26
+ if (e.key === "Enter" || e.key === " ") {
27
+ e.preventDefault(), p?.(u);
28
+ return;
29
+ }
30
+ let t = a(e.key, u, d);
31
+ t !== void 0 && d !== 0 && (e.preventDefault(), p?.(t), e.currentTarget.ownerDocument.getElementById(`${c}_tab_${t}`)?.focus());
10
32
  }, [
11
- l,
12
- s,
13
33
  c,
14
- u
15
- ]);
34
+ u,
35
+ d,
36
+ p
37
+ ]), y = f ? {
38
+ id: h,
39
+ role: "tab",
40
+ "aria-selected": m,
41
+ "aria-controls": g,
42
+ tabIndex: m ? 0 : -1,
43
+ onKeyDown: v
44
+ } : {
45
+ id: g,
46
+ role: "tabpanel",
47
+ "aria-labelledby": h,
48
+ tabIndex: 0
49
+ };
16
50
  return /* @__PURE__ */ r(t, {
17
- ref: o,
18
- onClick: d,
19
- className: i("plitzi-component__tab-container-item", e, { active: s === c }),
20
- children: a
51
+ ref: s,
52
+ onClick: _,
53
+ className: i("plitzi-component__tab-container-item", e, { active: m }),
54
+ ...c ? y : {},
55
+ children: o
21
56
  });
22
- }, o = e(a);
57
+ }, s = e(o);
23
58
  //#endregion
24
- export { a as TabContainerItem, o as default };
59
+ export { o as TabContainerItem, s as default };
@@ -1,7 +1,7 @@
1
1
  import { TabContainerItemProps } from './TabContainerItem';
2
2
  import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring/declare';
3
3
  /** What this element can be authored with — its component's own props, minus what the runtime supplies. */
4
- export type TabContainerItemAttributes = AuthorableAttributes<TabContainerItemProps, 'tabSelected' | 'tabIndex' | 'isHeader' | 'onSelect'>;
4
+ export type TabContainerItemAttributes = AuthorableAttributes<TabContainerItemProps, 'baseId' | 'tabSelected' | 'tabIndex' | 'tabCount' | 'isHeader' | 'onSelect'>;
5
5
  declare const declaration: {
6
6
  readonly type: "tabContainerItem";
7
7
  readonly content: {
package/dist/index.d.ts CHANGED
@@ -78,6 +78,9 @@ export declare const defaultElements: {
78
78
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<unknown>;
79
79
  };
80
80
  type: "dropdown";
81
+ attributeValues: {
82
+ readonly popupPlacement: readonly string[];
83
+ };
81
84
  content: {
82
85
  readonly attributes: {
83
86
  readonly popupPlacement: "bottom";
@@ -494,6 +497,7 @@ export declare const defaultElements: {
494
497
  defaultValue?: string | number | readonly string[] | undefined;
495
498
  onLoad?: import('react').ReactEventHandler<"span"> | undefined;
496
499
  onClick?: import('react').MouseEventHandler<"span"> | undefined;
500
+ onPointerDown?: import('react').PointerEventHandler<"span"> | undefined;
497
501
  onMouseEnter?: import('react').MouseEventHandler<"span"> | undefined;
498
502
  onMouseLeave?: import('react').MouseEventHandler<"span"> | undefined;
499
503
  onFocus?: import('react').FocusEventHandler<"span"> | undefined;
@@ -682,7 +686,6 @@ export declare const defaultElements: {
682
686
  onTouchMoveCapture?: import('react').TouchEventHandler<"span"> | undefined;
683
687
  onTouchStart?: import('react').TouchEventHandler<"span"> | undefined;
684
688
  onTouchStartCapture?: import('react').TouchEventHandler<"span"> | undefined;
685
- onPointerDown?: import('react').PointerEventHandler<"span"> | undefined;
686
689
  onPointerDownCapture?: import('react').PointerEventHandler<"span"> | undefined;
687
690
  onPointerMove?: import('react').PointerEventHandler<"span"> | undefined;
688
691
  onPointerMoveCapture?: import('react').PointerEventHandler<"span"> | undefined;
@@ -916,6 +919,9 @@ export declare const defaultElements: {
916
919
  displayName: string;
917
920
  } & {
918
921
  readonly type: "container";
922
+ readonly attributeValues: {
923
+ readonly subType: readonly string[];
924
+ };
919
925
  readonly content: {
920
926
  readonly attributes: {
921
927
  readonly subType: "div";
@@ -964,13 +970,18 @@ export declare const defaultElements: {
964
970
  readonly settings: {};
965
971
  };
966
972
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
967
- subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | undefined;
973
+ label?: string | undefined;
974
+ subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "dl" | "dt" | "dd" | "li" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
975
+ decorative?: boolean | undefined;
968
976
  }>>;
969
977
  layoutContainer: {
970
978
  (props: import('./Element/hocs/withElement').WithElementProps<import('./elements/internal/LayoutContainer/LayoutContainer').LayoutContainerProps>): import('react').JSX.Element;
971
979
  displayName: string;
972
980
  } & {
973
981
  readonly type: "layoutContainer";
982
+ readonly attributeValues: {
983
+ readonly subType: readonly string[];
984
+ };
974
985
  readonly content: {
975
986
  readonly attributes: {
976
987
  readonly subType: "div";
@@ -1664,6 +1675,9 @@ export declare const defaultElements: {
1664
1675
  displayName: string;
1665
1676
  } & {
1666
1677
  readonly type: "heading";
1678
+ readonly attributeValues: {
1679
+ readonly subType: readonly string[];
1680
+ };
1667
1681
  readonly content: {
1668
1682
  readonly attributes: {
1669
1683
  readonly content: "Heading";
@@ -1718,7 +1732,7 @@ export declare const defaultElements: {
1718
1732
  readonly 'margin-bottom': "25px";
1719
1733
  readonly 'font-size': "38px";
1720
1734
  readonly 'font-weight': 700;
1721
- readonly 'line-height': "44px";
1735
+ readonly 'line-height': "1.158";
1722
1736
  };
1723
1737
  };
1724
1738
  };
@@ -1733,7 +1747,7 @@ export declare const defaultElements: {
1733
1747
  readonly 'margin-bottom': "25px";
1734
1748
  readonly 'font-size': "32px";
1735
1749
  readonly 'font-weight': 700;
1736
- readonly 'line-height': "36px";
1750
+ readonly 'line-height': "1.125";
1737
1751
  };
1738
1752
  };
1739
1753
  };
@@ -1748,7 +1762,7 @@ export declare const defaultElements: {
1748
1762
  readonly 'margin-bottom': "25px";
1749
1763
  readonly 'font-size': "24px";
1750
1764
  readonly 'font-weight': 700;
1751
- readonly 'line-height': "30px";
1765
+ readonly 'line-height': "1.25";
1752
1766
  };
1753
1767
  };
1754
1768
  };
@@ -1763,7 +1777,7 @@ export declare const defaultElements: {
1763
1777
  readonly 'margin-bottom': "25px";
1764
1778
  readonly 'font-size': "18px";
1765
1779
  readonly 'font-weight': 700;
1766
- readonly 'line-height': "24px";
1780
+ readonly 'line-height': "1.333";
1767
1781
  };
1768
1782
  };
1769
1783
  };
@@ -1778,7 +1792,7 @@ export declare const defaultElements: {
1778
1792
  readonly 'margin-bottom': "25px";
1779
1793
  readonly 'font-size': "14px";
1780
1794
  readonly 'font-weight': 700;
1781
- readonly 'line-height': "20px";
1795
+ readonly 'line-height': "1.429";
1782
1796
  };
1783
1797
  };
1784
1798
  };
@@ -1793,7 +1807,7 @@ export declare const defaultElements: {
1793
1807
  readonly 'margin-bottom': "25px";
1794
1808
  readonly 'font-size': "12px";
1795
1809
  readonly 'font-weight': 700;
1796
- readonly 'line-height': "18px";
1810
+ readonly 'line-height': "1.5";
1797
1811
  };
1798
1812
  };
1799
1813
  };
@@ -1811,10 +1825,15 @@ export declare const defaultElements: {
1811
1825
  displayName: string;
1812
1826
  } & {
1813
1827
  readonly type: "image";
1828
+ readonly attributeValues: {
1829
+ readonly fetchPriority: readonly string[];
1830
+ readonly loadMode: readonly string[];
1831
+ };
1814
1832
  readonly content: {
1815
1833
  readonly attributes: {
1816
1834
  readonly src: "https://cdn.plitzi.com/resources/img/placeholder-img.svg";
1817
1835
  readonly alt: "";
1836
+ readonly decorative: false;
1818
1837
  readonly fetchPriority: "auto";
1819
1838
  readonly loadMode: "auto";
1820
1839
  };
@@ -1867,7 +1886,8 @@ export declare const defaultElements: {
1867
1886
  fetchPriority?: "high" | "low" | "auto" | undefined;
1868
1887
  src?: string | undefined;
1869
1888
  alt?: string | undefined;
1870
- loadMode?: "eager" | "lazy" | undefined;
1889
+ decorative?: boolean | undefined;
1890
+ loadMode?: "auto" | "eager" | "lazy" | undefined;
1871
1891
  }>>;
1872
1892
  video: {
1873
1893
  (props: import('./Element/hocs/withElement').WithElementProps<import('./elements/media/Video/Video').VideoProps>): import('react').JSX.Element;
@@ -1991,6 +2011,7 @@ export declare const defaultElements: {
1991
2011
  };
1992
2012
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
1993
2013
  size?: string | undefined;
2014
+ label?: string | undefined;
1994
2015
  icon?: string | undefined;
1995
2016
  iconAnimation?: string | undefined;
1996
2017
  }>>;
@@ -1999,6 +2020,10 @@ export declare const defaultElements: {
1999
2020
  displayName: string;
2000
2021
  } & {
2001
2022
  readonly type: "button";
2023
+ readonly attributeValues: {
2024
+ readonly subType: readonly string[];
2025
+ readonly contentPlacement: readonly string[];
2026
+ };
2002
2027
  readonly content: {
2003
2028
  readonly attributes: {
2004
2029
  readonly contentPlacement: "after";
@@ -2058,7 +2083,7 @@ export declare const defaultElements: {
2058
2083
  readonly 'padding-bottom': "6px";
2059
2084
  readonly cursor: "pointer";
2060
2085
  readonly 'font-size': "16px";
2061
- readonly 'line-height': "24px";
2086
+ readonly 'line-height': "1.5";
2062
2087
  readonly 'border-top-left-radius': "4px";
2063
2088
  readonly 'border-top-right-radius': "4px";
2064
2089
  readonly 'border-bottom-left-radius': "4px";
@@ -2079,7 +2104,7 @@ export declare const defaultElements: {
2079
2104
  readonly 'padding-bottom': "6px";
2080
2105
  readonly cursor: "pointer";
2081
2106
  readonly 'font-size': "16px";
2082
- readonly 'line-height': "24px";
2107
+ readonly 'line-height': "1.5";
2083
2108
  readonly 'border-top-left-radius': "4px";
2084
2109
  readonly 'border-top-right-radius': "4px";
2085
2110
  readonly 'border-bottom-left-radius': "4px";
@@ -2100,7 +2125,7 @@ export declare const defaultElements: {
2100
2125
  readonly 'padding-bottom': "6px";
2101
2126
  readonly cursor: "pointer";
2102
2127
  readonly 'font-size': "16px";
2103
- readonly 'line-height': "24px";
2128
+ readonly 'line-height': "1.5";
2104
2129
  readonly 'border-top-left-radius': "4px";
2105
2130
  readonly 'border-top-right-radius': "4px";
2106
2131
  readonly 'border-bottom-left-radius': "4px";
@@ -2114,6 +2139,7 @@ export declare const defaultElements: {
2114
2139
  readonly settings: {};
2115
2140
  };
2116
2141
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
2142
+ label?: string | undefined;
2117
2143
  title?: string | undefined;
2118
2144
  content?: string | undefined;
2119
2145
  disabled?: boolean | undefined;
@@ -2224,7 +2250,7 @@ export declare const defaultElements: {
2224
2250
  readonly base: {
2225
2251
  readonly default: {
2226
2252
  readonly 'font-size': "14px";
2227
- readonly 'line-height': "24px";
2253
+ readonly 'line-height': "1.714";
2228
2254
  readonly display: "inline";
2229
2255
  };
2230
2256
  };
@@ -2240,6 +2266,9 @@ export declare const defaultElements: {
2240
2266
  displayName: string;
2241
2267
  } & {
2242
2268
  readonly type: "themeToggle";
2269
+ readonly attributeValues: {
2270
+ readonly subType: readonly string[];
2271
+ };
2243
2272
  readonly triggers: {
2244
2273
  readonly onThemeChange: {
2245
2274
  readonly action: "onThemeChange";
@@ -2372,6 +2401,10 @@ export declare const defaultElements: {
2372
2401
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<unknown>;
2373
2402
  };
2374
2403
  type: "list";
2404
+ attributeValues: {
2405
+ readonly subType: readonly string[];
2406
+ readonly source: readonly string[];
2407
+ };
2375
2408
  sourceType: "list";
2376
2409
  content: {
2377
2410
  readonly attributes: {
@@ -2461,6 +2494,10 @@ export declare const defaultElements: {
2461
2494
  displayName: string;
2462
2495
  } & {
2463
2496
  readonly type: "link";
2497
+ readonly attributeValues: {
2498
+ readonly mode: readonly string[];
2499
+ readonly target: readonly string[];
2500
+ };
2464
2501
  readonly content: {
2465
2502
  readonly attributes: {
2466
2503
  readonly href: "#";
@@ -2516,9 +2553,9 @@ export declare const defaultElements: {
2516
2553
  };
2517
2554
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
2518
2555
  mode?: "page" | "internal" | "external" | undefined;
2556
+ href?: string | undefined;
2519
2557
  label?: string | undefined;
2520
2558
  target?: "self" | "blank" | "parent" | "top" | undefined;
2521
- href?: string | undefined;
2522
2559
  }>>;
2523
2560
  markdown: {
2524
2561
  (props: import('./Element/hocs/withElement').WithElementProps<import('./elements/basic/Markdown/Markdown').MarkdownProps>): import('react').JSX.Element;
@@ -2566,7 +2603,7 @@ export declare const defaultElements: {
2566
2603
  readonly base: {
2567
2604
  readonly default: {
2568
2605
  readonly 'font-size': "14px";
2569
- readonly 'line-height': "24px";
2606
+ readonly 'line-height': "1.714";
2570
2607
  };
2571
2608
  };
2572
2609
  };
@@ -2581,6 +2618,9 @@ export declare const defaultElements: {
2581
2618
  displayName: string;
2582
2619
  } & {
2583
2620
  readonly type: "richText";
2621
+ readonly attributeValues: {
2622
+ readonly format: readonly string[];
2623
+ };
2584
2624
  readonly content: {
2585
2625
  readonly attributes: {
2586
2626
  readonly content: "";
@@ -2640,6 +2680,10 @@ export declare const defaultElements: {
2640
2680
  displayName: string;
2641
2681
  } & {
2642
2682
  readonly type: "pagination";
2683
+ readonly attributeValues: {
2684
+ readonly mode: readonly string[];
2685
+ readonly target: readonly string[];
2686
+ };
2643
2687
  readonly triggers: {
2644
2688
  readonly onPageChange: {
2645
2689
  readonly action: "onPageChange";
@@ -2712,6 +2756,7 @@ export declare const defaultElements: {
2712
2756
  };
2713
2757
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
2714
2758
  mode?: "pages" | "loadMore" | undefined;
2759
+ label?: string | undefined;
2715
2760
  target?: "url" | "interaction" | undefined;
2716
2761
  pageParam?: string | undefined;
2717
2762
  pageInfo?: import('./elements/structure/Pagination/Pagination').PaginationPageInfo | undefined;
@@ -2776,6 +2821,9 @@ export declare const defaultElements: {
2776
2821
  settings: {};
2777
2822
  };
2778
2823
  type: "form";
2824
+ attributeValues: {
2825
+ readonly method: readonly string[];
2826
+ };
2779
2827
  sourceType: "apiContainer";
2780
2828
  triggers: {
2781
2829
  readonly onSubmit: {
@@ -2861,9 +2909,11 @@ export declare const defaultElements: {
2861
2909
  readonly subType: "text";
2862
2910
  readonly name: "";
2863
2911
  readonly label: "Label";
2912
+ readonly hideLabel: false;
2864
2913
  readonly placeholder: "";
2865
2914
  readonly defaultValue: "";
2866
2915
  readonly autoComplete: true;
2916
+ readonly autoFocus: false;
2867
2917
  readonly disabled: false;
2868
2918
  readonly options: readonly [];
2869
2919
  readonly required: true;
@@ -3340,6 +3390,9 @@ export declare const defaultElements: {
3340
3390
  settings: {};
3341
3391
  };
3342
3392
  type: "formControl";
3393
+ attributeValues: {
3394
+ readonly subType: readonly string[];
3395
+ };
3343
3396
  triggers: {
3344
3397
  readonly onChange: {
3345
3398
  readonly action: "onChange";
@@ -3359,6 +3412,12 @@ export declare const defaultElements: {
3359
3412
  displayName: string;
3360
3413
  } & {
3361
3414
  readonly type: "apiContainer";
3415
+ readonly attributeValues: {
3416
+ readonly subType: readonly string[];
3417
+ readonly method: readonly string[];
3418
+ readonly credentials: readonly string[];
3419
+ readonly pagination: readonly string[];
3420
+ };
3362
3421
  readonly sourceType: "apiContainer";
3363
3422
  readonly triggers: {
3364
3423
  readonly onApiError: {
@@ -3392,7 +3451,14 @@ export declare const defaultElements: {
3392
3451
  readonly title: "Perform Query";
3393
3452
  readonly type: "callback";
3394
3453
  readonly preview: {};
3395
- readonly params: {};
3454
+ readonly params: {
3455
+ readonly input: {
3456
+ readonly label: "Input (server providers)";
3457
+ readonly type: "codemirror-json";
3458
+ readonly defaultValue: "{}";
3459
+ readonly description: string;
3460
+ };
3461
+ };
3396
3462
  };
3397
3463
  readonly loadMore: {
3398
3464
  readonly action: "loadMore";
@@ -3499,5 +3565,143 @@ export declare const defaultElements: {
3499
3565
  readonly settings: {};
3500
3566
  };
3501
3567
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<import('./elements/provider/ApiContainer/declaration').ApiContainerAttributes>;
3568
+ channel: {
3569
+ (props: import('./Element/hocs/withElement').WithElementProps<import('./elements/provider/Channel/Channel').ChannelProps>): import('react').JSX.Element;
3570
+ displayName: string;
3571
+ } & {
3572
+ readonly type: "channel";
3573
+ readonly attributeValues: {
3574
+ readonly subType: readonly string[];
3575
+ };
3576
+ readonly sourceType: "channel";
3577
+ readonly triggers: {
3578
+ readonly onMessage: {
3579
+ readonly action: "onMessage";
3580
+ readonly title: "On Message";
3581
+ readonly type: "trigger";
3582
+ readonly params: {};
3583
+ readonly preview: {
3584
+ readonly type: "";
3585
+ readonly data: "";
3586
+ readonly from: "";
3587
+ readonly user: "";
3588
+ readonly at: "";
3589
+ };
3590
+ };
3591
+ readonly onJoin: {
3592
+ readonly action: "onJoin";
3593
+ readonly title: "On Join";
3594
+ readonly type: "trigger";
3595
+ readonly params: {};
3596
+ readonly preview: {
3597
+ readonly from: "";
3598
+ readonly user: "";
3599
+ readonly state: {};
3600
+ };
3601
+ };
3602
+ readonly onLeave: {
3603
+ readonly action: "onLeave";
3604
+ readonly title: "On Leave";
3605
+ readonly type: "trigger";
3606
+ readonly params: {};
3607
+ readonly preview: {
3608
+ readonly from: "";
3609
+ readonly user: "";
3610
+ readonly state: {};
3611
+ };
3612
+ };
3613
+ };
3614
+ readonly callbacks: {
3615
+ readonly publish: {
3616
+ readonly action: "publish";
3617
+ readonly title: "Publish";
3618
+ readonly type: "callback";
3619
+ readonly preview: {};
3620
+ readonly params: {
3621
+ readonly type: {
3622
+ readonly label: "Type";
3623
+ readonly defaultValue: "";
3624
+ readonly type: "text";
3625
+ };
3626
+ readonly data: {
3627
+ readonly label: "Data (JSON or a template)";
3628
+ readonly defaultValue: "";
3629
+ readonly type: "text";
3630
+ };
3631
+ };
3632
+ };
3633
+ readonly setPresence: {
3634
+ readonly action: "setPresence";
3635
+ readonly title: "Set Presence";
3636
+ readonly type: "callback";
3637
+ readonly preview: {};
3638
+ readonly params: {
3639
+ readonly data: {
3640
+ readonly label: "State (JSON or a template)";
3641
+ readonly defaultValue: "";
3642
+ readonly type: "text";
3643
+ };
3644
+ };
3645
+ };
3646
+ };
3647
+ readonly content: {
3648
+ readonly attributes: {
3649
+ readonly topic: "";
3650
+ readonly grant: "";
3651
+ readonly keep: 20;
3652
+ readonly subType: "";
3653
+ };
3654
+ readonly definition: {
3655
+ readonly label: "Channel";
3656
+ readonly type: "channel";
3657
+ readonly description: string;
3658
+ readonly items: readonly [];
3659
+ readonly bindings: {};
3660
+ readonly styleSelectors: {
3661
+ readonly base: "";
3662
+ };
3663
+ readonly initialState: {
3664
+ readonly visibility: true;
3665
+ };
3666
+ };
3667
+ readonly builder: {
3668
+ readonly canDelete: true;
3669
+ readonly canSelect: true;
3670
+ readonly canDragDrop: true;
3671
+ readonly canMove: true;
3672
+ readonly canTemplate: true;
3673
+ readonly itemsAllowed: readonly [];
3674
+ readonly itemsNotAllowed: readonly [];
3675
+ };
3676
+ readonly market: {
3677
+ readonly category: "provider";
3678
+ readonly owner: "Plitzi";
3679
+ readonly verified: true;
3680
+ readonly license: "MIT";
3681
+ readonly website: "https://plitzi.com";
3682
+ readonly backgroundColor: "#4422ee";
3683
+ readonly icon: "fa-solid fa-tower-broadcast";
3684
+ };
3685
+ readonly defaultStyle: {
3686
+ readonly name: "Channel";
3687
+ readonly displayMode: "desktop";
3688
+ readonly style: {
3689
+ readonly base: {
3690
+ readonly default: {};
3691
+ };
3692
+ };
3693
+ readonly subTypes: {};
3694
+ };
3695
+ readonly settings: {};
3696
+ };
3697
+ } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
3698
+ subType?: "" | "div" | "section" | "aside" | "main" | undefined;
3699
+ topic?: string | undefined;
3700
+ grant?: string | undefined;
3701
+ presence?: unknown;
3702
+ keep?: number | string | undefined;
3703
+ }>>;
3502
3704
  };
3503
3705
  export { useRscData, elements, elementSettings, JsxManager };
3706
+ export { default as useChannel } from './realtime/useChannel';
3707
+ export type { ChannelHandle, UseChannelOptions } from './realtime/useChannel';