@plitzi/sdk-elements 0.38.24 → 0.39.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.
Files changed (230) hide show
  1. package/CHANGELOG.md +156 -1
  2. package/dist/Element/RootElement.d.ts +1 -1
  3. package/dist/Element/RootElement.mjs +62 -61
  4. package/dist/Element/RowAnchor.d.ts +15 -0
  5. package/dist/Element/RowAnchor.mjs +8 -0
  6. package/dist/Element/helpers/elementConstants.mjs +12 -0
  7. package/dist/Element/hocs/withElement.d.ts +1 -1
  8. package/dist/Element/hocs/withElement.mjs +96 -88
  9. package/dist/Element/hooks/useEditableContent.d.ts +11 -0
  10. package/dist/Element/hooks/useEditableContent.mjs +11 -10
  11. package/dist/Element/hooks/useElement.mjs +1 -1
  12. package/dist/Element/hooks/useElementDataSource.mjs +11 -10
  13. package/dist/Element/hooks/useFocusInteractions.d.ts +12 -0
  14. package/dist/Element/hooks/useFocusInteractions.mjs +9 -0
  15. package/dist/Element/hooks/useInternalClassName.mjs +22 -21
  16. package/dist/Element/hooks/useRootElementInteractions.mjs +48 -42
  17. package/dist/Element/hooks/useScrollInteractions.d.ts +1 -1
  18. package/dist/Element/hooks/useScrollInteractions.mjs +61 -30
  19. package/dist/dataSource/PluginSource.d.ts +22 -0
  20. package/dist/dataSource/PluginSource.mjs +27 -0
  21. package/dist/dataSource/index.d.ts +2 -0
  22. package/dist/dataSource/index.mjs +5 -4
  23. package/dist/elements/advanced/BlockHtml/BlockHtml.d.ts +1 -1
  24. package/dist/elements/advanced/BlockHtml/index.d.ts +1 -1
  25. package/dist/elements/advanced/BlockJsx/BlockJsx.d.ts +1 -1
  26. package/dist/elements/advanced/BlockJsx/index.d.ts +1 -1
  27. package/dist/elements/advanced/Custom/Custom.d.ts +1 -1
  28. package/dist/elements/advanced/Custom/index.d.ts +1 -1
  29. package/dist/elements/advanced/NodeHtml/NodeHtml.d.ts +1 -1
  30. package/dist/elements/advanced/NodeHtml/declaration.d.ts +3 -3
  31. package/dist/elements/advanced/NodeHtml/index.d.ts +4 -4
  32. package/dist/elements/advanced/Reference/Reference.d.ts +2 -2
  33. package/dist/elements/advanced/Reference/Reference.mjs +1 -1
  34. package/dist/elements/advanced/Reference/index.d.ts +1 -1
  35. package/dist/elements/basic/Button/Button.d.ts +7 -2
  36. package/dist/elements/basic/Button/Button.mjs +27 -25
  37. package/dist/elements/basic/Button/Settings.mjs +1 -1
  38. package/dist/elements/basic/Button/declaration.d.ts +8 -1
  39. package/dist/elements/basic/Button/declaration.mjs +3 -0
  40. package/dist/elements/basic/Button/index.d.ts +9 -2
  41. package/dist/elements/basic/Dropdown/Dropdown.d.ts +9 -2
  42. package/dist/elements/basic/Dropdown/Dropdown.mjs +93 -74
  43. package/dist/elements/basic/Dropdown/DropdownPopup/DropdownPopup.d.ts +1 -1
  44. package/dist/elements/basic/Dropdown/DropdownPopup/index.d.ts +1 -1
  45. package/dist/elements/basic/Dropdown/declaration.d.ts +31 -0
  46. package/dist/elements/basic/Dropdown/declaration.mjs +38 -6
  47. package/dist/elements/basic/Dropdown/index.d.ts +33 -2
  48. package/dist/elements/basic/Dropdown/useDropdown.d.ts +2 -0
  49. package/dist/elements/basic/Heading/Heading.d.ts +1 -1
  50. package/dist/elements/basic/Heading/Heading.mjs +3 -2
  51. package/dist/elements/basic/Heading/declaration.d.ts +2 -0
  52. package/dist/elements/basic/Heading/declaration.mjs +2 -0
  53. package/dist/elements/basic/Heading/index.d.ts +3 -1
  54. package/dist/elements/basic/Link/Link.d.ts +1 -1
  55. package/dist/elements/basic/Link/Link.mjs +46 -45
  56. package/dist/elements/basic/Link/declaration.d.ts +1 -0
  57. package/dist/elements/basic/Link/declaration.mjs +5 -0
  58. package/dist/elements/basic/Link/index.d.ts +2 -1
  59. package/dist/elements/basic/Markdown/Markdown.d.ts +1 -1
  60. package/dist/elements/basic/Markdown/declaration.d.ts +2 -0
  61. package/dist/elements/basic/Markdown/declaration.mjs +2 -0
  62. package/dist/elements/basic/Markdown/index.d.ts +3 -1
  63. package/dist/elements/basic/Paragraph/Paragraph.d.ts +1 -1
  64. package/dist/elements/basic/Paragraph/Paragraph.mjs +3 -2
  65. package/dist/elements/basic/Paragraph/Settings.mjs +1 -1
  66. package/dist/elements/basic/Paragraph/declaration.d.ts +2 -0
  67. package/dist/elements/basic/Paragraph/declaration.mjs +2 -0
  68. package/dist/elements/basic/Paragraph/index.d.ts +3 -1
  69. package/dist/elements/basic/RichText/RichText.d.ts +1 -1
  70. package/dist/elements/basic/RichText/declaration.d.ts +1 -0
  71. package/dist/elements/basic/RichText/declaration.mjs +1 -0
  72. package/dist/elements/basic/RichText/index.d.ts +2 -1
  73. package/dist/elements/basic/Text/Settings.mjs +1 -1
  74. package/dist/elements/basic/Text/Text.d.ts +1 -1
  75. package/dist/elements/basic/Text/Text.mjs +3 -2
  76. package/dist/elements/basic/Text/declaration.d.ts +2 -0
  77. package/dist/elements/basic/Text/declaration.mjs +2 -0
  78. package/dist/elements/basic/Text/index.d.ts +3 -1
  79. package/dist/elements/basic/ThemeToggle/ThemeToggle.d.ts +2 -2
  80. package/dist/elements/basic/ThemeToggle/declaration.d.ts +1 -0
  81. package/dist/elements/basic/ThemeToggle/declaration.mjs +5 -0
  82. package/dist/elements/basic/ThemeToggle/index.d.ts +2 -1
  83. package/dist/elements/declarations/index.d.ts +322 -12
  84. package/dist/elements/declarations/index.mjs +46 -44
  85. package/dist/elements/form/Form/Form.d.ts +8 -2
  86. package/dist/elements/form/Form/Form.mjs +102 -79
  87. package/dist/elements/form/Form/declaration.d.ts +21 -3
  88. package/dist/elements/form/Form/declaration.mjs +28 -11
  89. package/dist/elements/form/Form/index.d.ts +17 -2
  90. package/dist/elements/form/FormControl/FormControl.d.ts +8 -2
  91. package/dist/elements/form/FormControl/FormControl.mjs +71 -66
  92. package/dist/elements/form/FormControl/Settings.d.ts +6 -1
  93. package/dist/elements/form/FormControl/Settings.mjs +130 -98
  94. package/dist/elements/form/FormControl/declaration.d.ts +7 -0
  95. package/dist/elements/form/FormControl/declaration.mjs +21 -1
  96. package/dist/elements/form/FormControl/helpers/useBlurValidation.d.ts +12 -0
  97. package/dist/elements/form/FormControl/helpers/useBlurValidation.mjs +20 -0
  98. package/dist/elements/form/FormControl/helpers/validateField.d.ts +8 -0
  99. package/dist/elements/form/FormControl/helpers/validateField.mjs +8 -2
  100. package/dist/elements/form/FormControl/hocs/withFieldValue.d.ts +4 -0
  101. package/dist/elements/form/FormControl/hocs/withFieldValue.mjs +49 -41
  102. package/dist/elements/form/FormControl/index.d.ts +8 -1
  103. package/dist/elements/form/FormControl/inputs/Checkbox.mjs +2 -2
  104. package/dist/elements/form/FormControl/inputs/Input.d.ts +5 -1
  105. package/dist/elements/form/FormControl/inputs/Input.mjs +42 -38
  106. package/dist/elements/form/FormControl/inputs/Select.d.ts +5 -1
  107. package/dist/elements/form/FormControl/inputs/Select.mjs +33 -28
  108. package/dist/elements/form/FormControl/inputs/Textarea.mjs +27 -26
  109. package/dist/elements/form/FormControl/inputs/useFocusWhenShown.d.ts +1 -1
  110. package/dist/elements/index.d.ts +3 -1
  111. package/dist/elements/index.mjs +32 -30
  112. package/dist/elements/internal/LayoutContainer/LayoutContainer.d.ts +1 -1
  113. package/dist/elements/internal/LayoutContainer/LayoutContainer.mjs +30 -30
  114. package/dist/elements/internal/LayoutContainer/index.d.ts +1 -1
  115. package/dist/elements/internal/LayoutContainer/mask.d.ts +13 -0
  116. package/dist/elements/internal/LayoutContainer/mask.mjs +16 -1
  117. package/dist/elements/internal/Loading/Loading.d.ts +1 -1
  118. package/dist/elements/internal/Loading/index.d.ts +1 -1
  119. package/dist/elements/internal/NotFound/NotFound.d.ts +1 -1
  120. package/dist/elements/internal/NotFound/index.d.ts +1 -1
  121. package/dist/elements/internal/Page/Page.d.ts +17 -3
  122. package/dist/elements/internal/Page/Page.mjs +32 -25
  123. package/dist/elements/internal/Page/PageHead.d.ts +11 -4
  124. package/dist/elements/internal/Page/PageHead.mjs +41 -19
  125. package/dist/elements/internal/Page/PageWithheld.d.ts +3 -2
  126. package/dist/elements/internal/Page/PageWithheld.mjs +41 -18
  127. package/dist/elements/internal/Page/Settings.d.ts +5 -1
  128. package/dist/elements/internal/Page/Settings.mjs +160 -121
  129. package/dist/elements/internal/Page/SharePreview.d.ts +13 -0
  130. package/dist/elements/internal/Page/SharePreview.mjs +53 -0
  131. package/dist/elements/internal/Page/declaration.d.ts +9 -1
  132. package/dist/elements/internal/Page/declaration.mjs +11 -4
  133. package/dist/elements/internal/Page/index.d.ts +9 -2
  134. package/dist/elements/media/Chart/Chart.d.ts +33 -0
  135. package/dist/elements/media/Chart/Chart.mjs +195 -0
  136. package/dist/elements/media/Chart/Settings.d.ts +6 -0
  137. package/dist/elements/media/Chart/Settings.mjs +92 -0
  138. package/dist/elements/media/Chart/chartGeometry.d.ts +37 -0
  139. package/dist/elements/media/Chart/chartGeometry.mjs +47 -0
  140. package/dist/elements/media/Chart/declaration.d.ts +144 -0
  141. package/dist/elements/media/Chart/declaration.mjs +107 -0
  142. package/dist/elements/media/Chart/index.d.ts +145 -0
  143. package/dist/elements/media/Chart/index.mjs +6 -0
  144. package/dist/elements/media/Embed/Embed.d.ts +1 -1
  145. package/dist/elements/media/Embed/Embed.mjs +25 -21
  146. package/dist/elements/media/Embed/declaration.d.ts +1 -0
  147. package/dist/elements/media/Embed/declaration.mjs +1 -0
  148. package/dist/elements/media/Embed/index.d.ts +2 -1
  149. package/dist/elements/media/FontAwesome/FontAwesome.d.ts +1 -1
  150. package/dist/elements/media/FontAwesome/index.d.ts +1 -1
  151. package/dist/elements/media/Image/Image.d.ts +1 -1
  152. package/dist/elements/media/Image/Image.mjs +35 -34
  153. package/dist/elements/media/Image/declaration.d.ts +2 -1
  154. package/dist/elements/media/Image/declaration.mjs +1 -0
  155. package/dist/elements/media/Image/index.d.ts +3 -2
  156. package/dist/elements/media/Svg/Svg.d.ts +1 -1
  157. package/dist/elements/media/Svg/declaration.d.ts +1 -0
  158. package/dist/elements/media/Svg/declaration.mjs +1 -0
  159. package/dist/elements/media/Svg/index.d.ts +2 -1
  160. package/dist/elements/media/Video/Video.d.ts +1 -1
  161. package/dist/elements/media/Video/declaration.d.ts +1 -0
  162. package/dist/elements/media/Video/declaration.mjs +1 -0
  163. package/dist/elements/media/Video/index.d.ts +2 -1
  164. package/dist/elements/provider/ApiContainer/ApiContainer.d.ts +1 -1
  165. package/dist/elements/provider/ApiContainer/ApiContainer.mjs +215 -185
  166. package/dist/elements/provider/ApiContainer/declaration.d.ts +9 -0
  167. package/dist/elements/provider/ApiContainer/declaration.mjs +10 -1
  168. package/dist/elements/provider/ApiContainer/hooks/useInputRefresh.d.ts +4 -4
  169. package/dist/elements/provider/ApiContainer/hooks/useProviderPagination.d.ts +2 -1
  170. package/dist/elements/provider/ApiContainer/index.d.ts +10 -1
  171. package/dist/elements/provider/Channel/Channel.d.ts +1 -1
  172. package/dist/elements/provider/Channel/declaration.d.ts +9 -0
  173. package/dist/elements/provider/Channel/declaration.mjs +11 -2
  174. package/dist/elements/provider/Channel/index.d.ts +10 -1
  175. package/dist/elements/settings.mjs +42 -40
  176. package/dist/elements/structure/Carousel/Carousel.d.ts +1 -1
  177. package/dist/elements/structure/Carousel/Carousel.mjs +147 -130
  178. package/dist/elements/structure/Carousel/CarouselContext.d.ts +3 -3
  179. package/dist/elements/structure/Carousel/CarouselTrack/CarouselTrack.d.ts +1 -1
  180. package/dist/elements/structure/Carousel/CarouselTrack/components/ScrollTrack/ScrollTrack.d.ts +6 -2
  181. package/dist/elements/structure/Carousel/CarouselTrack/components/ScrollTrack/ScrollTrack.mjs +32 -20
  182. package/dist/elements/structure/Carousel/CarouselTrack/index.d.ts +1 -1
  183. package/dist/elements/structure/Carousel/carouselIndex.d.ts +17 -0
  184. package/dist/elements/structure/Carousel/carouselIndex.mjs +17 -5
  185. package/dist/elements/structure/Carousel/declaration.d.ts +49 -2
  186. package/dist/elements/structure/Carousel/declaration.mjs +26 -4
  187. package/dist/elements/structure/Carousel/index.d.ts +51 -4
  188. package/dist/elements/structure/Container/Container.d.ts +5 -3
  189. package/dist/elements/structure/Container/Container.mjs +6 -5
  190. package/dist/elements/structure/Container/Settings.d.ts +4 -2
  191. package/dist/elements/structure/Container/Settings.mjs +19 -5
  192. package/dist/elements/structure/Container/declaration.d.ts +3 -2
  193. package/dist/elements/structure/Container/declaration.mjs +3 -1
  194. package/dist/elements/structure/Container/index.d.ts +4 -3
  195. package/dist/elements/structure/DialogContainer/DialogContainer.d.ts +1 -1
  196. package/dist/elements/structure/DialogContainer/declaration.d.ts +1 -0
  197. package/dist/elements/structure/DialogContainer/declaration.mjs +5 -0
  198. package/dist/elements/structure/DialogContainer/index.d.ts +2 -1
  199. package/dist/elements/structure/List/List.d.ts +1 -1
  200. package/dist/elements/structure/List/ListItem/ListItem.d.ts +1 -1
  201. package/dist/elements/structure/List/ListItem/index.d.ts +1 -1
  202. package/dist/elements/structure/List/declaration.d.ts +5 -0
  203. package/dist/elements/structure/List/declaration.mjs +5 -0
  204. package/dist/elements/structure/List/index.d.ts +7 -2
  205. package/dist/elements/structure/List/modes/ListControlled/ListControlled.mjs +1 -0
  206. package/dist/elements/structure/List/modes/ListControlled/ListControlledItem.d.ts +3 -1
  207. package/dist/elements/structure/List/modes/ListControlled/ListControlledItem.mjs +33 -25
  208. package/dist/elements/structure/ModalContainer/ModalContainer.d.ts +1 -1
  209. package/dist/elements/structure/ModalContainer/declaration.d.ts +2 -0
  210. package/dist/elements/structure/ModalContainer/declaration.mjs +2 -0
  211. package/dist/elements/structure/ModalContainer/index.d.ts +3 -1
  212. package/dist/elements/structure/Pagination/Pagination.d.ts +1 -1
  213. package/dist/elements/structure/Pagination/declaration.d.ts +1 -0
  214. package/dist/elements/structure/Pagination/declaration.mjs +5 -0
  215. package/dist/elements/structure/Pagination/index.d.ts +2 -1
  216. package/dist/elements/structure/TabContainer/TabContainer.d.ts +1 -1
  217. package/dist/elements/structure/TabContainer/TabContainerBody/TabContainerBody.d.ts +1 -1
  218. package/dist/elements/structure/TabContainer/TabContainerBody/index.d.ts +1 -1
  219. package/dist/elements/structure/TabContainer/TabContainerHeader/TabContainerHeader.d.ts +1 -1
  220. package/dist/elements/structure/TabContainer/TabContainerHeader/index.d.ts +1 -1
  221. package/dist/elements/structure/TabContainer/TabContainerItem/TabContainerItem.d.ts +1 -1
  222. package/dist/elements/structure/TabContainer/TabContainerItem/declaration.d.ts +6 -0
  223. package/dist/elements/structure/TabContainer/TabContainerItem/declaration.mjs +6 -0
  224. package/dist/elements/structure/TabContainer/TabContainerItem/index.d.ts +7 -1
  225. package/dist/elements/structure/TabContainer/index.d.ts +10 -4
  226. package/dist/index.d.ts +216 -51
  227. package/dist/index.mjs +39 -37
  228. package/package.json +8 -8
  229. package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.d.ts +0 -16
  230. package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.mjs +0 -4
@@ -1,228 +1,258 @@
1
- import e from "./declaration.mjs";
2
- import t from "../../../Element/hocs/withElement.mjs";
1
+ import e from "../../../Element/hooks/useElementDataSource.mjs";
2
+ import t from "./declaration.mjs";
3
+ import n from "../../../Element/hocs/withElement.mjs";
3
4
  import ee from "../../../Element/hooks/useElement.mjs";
4
5
  import te from "../../../Element/hooks/useRscData.mjs";
5
6
  import { RootElement as ne } from "../../../Element/RootElement.mjs";
6
7
  import re from "../../../dataSource/useRegisterSource.mjs";
7
- import { isEmptyAnswer as ie } from "./helpers/isEmptyAnswer.mjs";
8
- import { childrenWhile as ae } from "./helpers/loadingSlot.mjs";
9
- import oe from "./helpers/providerOutcome.mjs";
10
- import { queryInputOf as se } from "./helpers/queryInput.mjs";
11
- import { serverMock as ce } from "./helpers/serverMock.mjs";
12
- import le from "./hooks/useApi.mjs";
13
- import ue from "./hooks/useAutoRefresh.mjs";
14
- import de from "./hooks/useInputRefresh.mjs";
15
- import fe from "./hooks/useProviderPagination.mjs";
16
- import pe from "./hooks/useProviderWrite.mjs";
17
- import me from "../../../dataSource/pathFields.mjs";
18
- import he from "../../../dataSource/sourceStore.mjs";
19
- import { use as ge, useCallback as n, useEffect as _e, useMemo as r, useRef as i } from "react";
20
- import { usePlitzi as ve } from "@plitzi/sdk-shared/hooks";
21
- import { useCommonStore as ye, useSdkStore as be } from "@plitzi/sdk-shared/store";
22
- import { emptyObject as a } from "@plitzi/sdk-shared/helpers";
23
- import { StoreProvider as xe } from "@plitzi/nexus/react";
24
- import { jsx as o } from "react/jsx-runtime";
25
- import Se from "clsx";
26
- import { currentRscLocation as Ce } from "@plitzi/sdk-shared/server";
27
- import { InteractionsContext as we } from "@plitzi/sdk-interactions";
28
- import { getSourceName as Te } from "@plitzi/sdk-shared/dataSource/helpers";
29
- import { QueryBuilderEvaluator as Ee } from "@plitzi/plitzi-ui/QueryBuilder/evaluator";
30
- import { useServerQuery as De } from "@plitzi/sdk-shared/queries";
8
+ import { childrenWhile as ie } from "./helpers/loadingSlot.mjs";
9
+ import ae from "./helpers/providerOutcome.mjs";
10
+ import { queryInputOf as oe } from "./helpers/queryInput.mjs";
11
+ import { serverMock as se } from "./helpers/serverMock.mjs";
12
+ import ce from "./hooks/useApi.mjs";
13
+ import le from "./hooks/useAutoRefresh.mjs";
14
+ import ue from "./hooks/useInputRefresh.mjs";
15
+ import de from "./hooks/useProviderPagination.mjs";
16
+ import fe from "./hooks/useProviderWrite.mjs";
17
+ import pe from "../../../dataSource/pathFields.mjs";
18
+ import me from "../../../dataSource/sourceStore.mjs";
19
+ import { use as he, useCallback as r, useEffect as i, useMemo as a, useRef as o } from "react";
20
+ import { usePlitzi as ge } from "@plitzi/sdk-shared/hooks";
21
+ import { useCommonStore as _e, useSdkStore as ve } from "@plitzi/sdk-shared/store";
22
+ import { emptyObject as s, evaluateRuleGroup as ye, ruleValuesOf as be } from "@plitzi/sdk-shared/helpers";
23
+ import { browserServerInput as xe, isEmptyAnswer as Se, rscFailureOf as Ce, whenOf as we, whenPaths as Te } from "@plitzi/sdk-shared/schema";
24
+ import { StoreProvider as Ee } from "@plitzi/nexus/react";
25
+ import { jsx as De } from "react/jsx-runtime";
26
+ import Oe from "clsx";
27
+ import { currentRscLocation as ke } from "@plitzi/sdk-shared/server";
28
+ import { InteractionsContext as Ae } from "@plitzi/sdk-interactions";
29
+ import { getSourceName as je } from "@plitzi/sdk-shared/dataSource/helpers";
30
+ import { useServerQuery as Me } from "@plitzi/sdk-shared/queries";
31
31
  //#region src/elements/provider/ApiContainer/ApiContainer.tsx
32
- var s = ({ ref: t, className: s = "", children: c, query: l = "", method: u = "get", accessToken: d = "", when: f = a, headers: p = a, mockData: m = "{}", subType: Oe = "", credentials: ke = "same-origin", singleRecord: Ae = !1, pagination: je = "none", pageParam: Me = "page", renderWhileLoading: Ne = !1, loadingSlot: h = "", cache: Pe = !1, staleTime: Fe = 30, gcTime: Ie = 300, refreshSeconds: Le = 0, connector: Re = "", action: ze = "", input: Be }) => {
33
- let { id: g, visible: _, definition: { label: v = "Api Container", runtime: Ve, items: He } } = ee(), y = Ve === "server", { loaded: b, stale: x, location: S, elementData: C, refreshing: Ue, refresh: w, cancel: T } = te(), E = Te(e.sourceType, g), { settings: { previewMode: D } } = ve(), { interactionsManager: O } = ge(we), [[k, A, We]] = be([
32
+ var c = ({ ref: n, className: c = "", children: l, query: u = "", method: d = "get", accessToken: f = "", when: Ne = s, headers: p = s, mockData: m = "{}", subType: Pe = "", credentials: Fe = "same-origin", singleRecord: h = !1, pagination: Ie = "none", pageParam: Le = "page", renderWhileLoading: Re = !1, loadingSlot: g = "", cache: ze = !1, staleTime: Be = 30, gcTime: Ve = 300, refreshSeconds: He = 0, connector: Ue = "", action: We = "", input: Ge }) => {
33
+ let { id: _, visible: v, definition: { label: y = "Api Container", runtime: Ke, items: qe } } = ee(), b = Ke === "server", { loaded: x, stale: S, location: C, elementData: w, isServerElement: Je, refreshing: Ye, refresh: T, cancel: E } = te(), D = je(t.sourceType, _), { settings: { previewMode: O } } = ge(), { interactionsManager: k } = he(Ae), [[A, j, Xe]] = ve([
34
34
  "navigation.routeParams",
35
35
  "navigation.queryParams",
36
36
  "navigation.navigate"
37
- ]), Ge = r(() => d ? {
37
+ ]), Ze = a(() => f ? {
38
38
  ...p,
39
- Authorization: `Bearer ${d}`
40
- } : p, [p, d]), j = r(() => y || !_ ? !1 : !!(D && l && (f === a || Ee(f, {
41
- ...k,
42
- ...A
43
- })) || !D && (l || m && m !== "{}" && m !== a)), [
44
- y,
45
- _,
46
- D,
47
- l,
48
- f,
49
- k,
39
+ Authorization: `Bearer ${f}`
40
+ } : p, [p, f]), M = a(() => we({ attributes: { when: Ne } }), [Ne]), Qe = a(() => M ? Te(M) : [], [M]), $e = e({ sources: Qe }), N = a(() => !M || ye(M, be({
41
+ ...A,
42
+ ...j,
43
+ ...$e
44
+ })), [
45
+ M,
50
46
  A,
47
+ j,
48
+ $e
49
+ ]), et = a(() => b || !v ? !1 : !!(O && u && N || !O && (u || m && m !== "{}" && m !== s)), [
50
+ b,
51
+ v,
52
+ O,
53
+ u,
54
+ N,
51
55
  m
52
- ]), Ke = r(() => [g], [g]), { isLoading: qe, isFetching: Je, data: M, refetch: N, cancel: P, isSuccess: Ye, isError: Xe } = le({
53
- url: l,
54
- method: u,
55
- credentials: ke,
56
- mock: D ? void 0 : m,
57
- customHeaders: Ge,
58
- enabled: j,
59
- cache: Pe,
60
- staleTime: Fe,
61
- gcTime: Ie,
62
- tags: Ke
63
- }), F = y && !!S && S !== Ce(), I = y && b && !F && C === null, L = y && !Re && !ze, R = r(() => y ? C || (b ? a : ce(m, L)) : M ?? a, [
64
- y,
65
- M,
66
- C,
56
+ ]), tt = a(() => [_], [_]), { isLoading: nt, isFetching: rt, data: it, refetch: at, cancel: ot, isSuccess: st, isError: ct } = ce({
57
+ url: u,
58
+ method: d,
59
+ credentials: Fe,
60
+ mock: O ? void 0 : m,
61
+ customHeaders: Ze,
62
+ enabled: et,
63
+ cache: ze,
64
+ staleTime: Be,
65
+ gcTime: Ve,
66
+ tags: tt
67
+ }), P = b && !!C && C !== ke() && !Je, F = Ce(w), I = F === void 0 ? w : null, L = b && x && !P && I === null && N, R = b && !Ue && !We, z = a(() => b ? I || (x ? s : se(m, R)) : it ?? s, [
67
68
  b,
69
+ it,
70
+ I,
71
+ x,
68
72
  m,
69
- L
70
- ]), z = y ? F || Ue : Je, B = y ? F : qe, V = i({}), Ze = n((e, t) => w(e, {
71
- ...V.current,
73
+ R
74
+ ]), B = b ? P || Ye : rt, V = b ? P : nt, H = o({}), lt = r((e, t) => T(e, {
75
+ ...H.current,
72
76
  ...t
73
- }), [w]), H = n(async (e) => {
74
- y ? await w([g], V.current, { fresh: e }) : N();
77
+ }), [T]), U = r(async (e) => {
78
+ b ? await T([_], H.current, { fresh: e }) : at();
75
79
  }, [
76
- y,
80
+ b,
81
+ at,
82
+ T,
83
+ _
84
+ ]), W = r(() => U(!0), [U]), G = r(() => U(!1), [U]);
85
+ Me({
86
+ id: _,
87
+ url: R && u ? u : void 0,
88
+ enabled: b && x,
89
+ active: v,
90
+ refresh: W
91
+ });
92
+ let ut = o(N);
93
+ i(() => {
94
+ let e = ut.current;
95
+ ut.current = N, b && N && !e && x && !P && w === null && G();
96
+ }, [
97
+ b,
77
98
  N,
99
+ x,
100
+ P,
78
101
  w,
79
- g
80
- ]), U = n(() => H(!0), [H]), Qe = n(() => H(!1), [H]);
81
- De({
82
- id: g,
83
- url: L && l ? l : void 0,
84
- enabled: y && b,
85
- active: _,
86
- refresh: U
87
- });
88
- let W = n(async ({ input: e } = {}) => {
89
- let t = se(e);
90
- t && (V.current = t), await U();
91
- }, [U]), G = n(() => {
92
- y ? T() : P();
102
+ G
103
+ ]);
104
+ let K = r(async ({ input: e } = {}) => {
105
+ let t = oe(e);
106
+ t && (H.current = t), await W();
107
+ }, [W]), q = r(() => {
108
+ b ? E() : ot();
93
109
  }, [
94
- y,
95
- T,
96
- P
97
- ]), [$e] = ye(`schema.flat.${g}.attributes.input`, { mode: "mount" });
98
- de({
99
- enabled: y && b,
100
- input: Be,
101
- savedInput: $e,
102
- performQuery: W
103
- }), ue({
104
- seconds: Le,
105
- enabled: _ && (y ? b && !F : j),
106
- refresh: Qe
110
+ b,
111
+ E,
112
+ ot
113
+ ]), [[dt, ft, pt]] = _e([
114
+ `schema.flat.${_}`,
115
+ "schema.flat",
116
+ "rsc.data"
117
+ ], { mode: "mount" }), mt = a(() => xe(dt, ft, pt, {
118
+ routeParams: A,
119
+ queryParams: j
120
+ }), [
121
+ dt,
122
+ ft,
123
+ pt,
124
+ A,
125
+ j
126
+ ]);
127
+ ue({
128
+ enabled: b && x,
129
+ input: Ge,
130
+ savedInput: mt,
131
+ performQuery: K
132
+ }), le({
133
+ seconds: He,
134
+ enabled: v && (b ? x && !P : et),
135
+ refresh: G
107
136
  });
108
- let K = R, et = r(() => Array.isArray(K.records) ? K.records : [], [K.records]), { records: q, isLoadingMore: J, goToPage: Y, loadMore: X } = fe({
109
- elementId: g,
110
- mode: je,
111
- pageParam: Me,
112
- records: et,
113
- page: K.pageInfo?.page ?? 1,
114
- refresh: Ze,
115
- navigate: We
116
- }), Z = oe({
117
- serverMode: y,
118
- isSuccess: Ye,
119
- isError: Xe,
120
- rscResolved: b,
121
- rscPending: F,
122
- elementData: C
123
- }), Q = i(void 0);
124
- _e(() => {
125
- !z && g && Z && (Q.current?.data !== R || Q.current.outcome !== Z) && (Q.current = {
126
- data: R,
127
- outcome: Z
128
- }, O.interactionTrigger(g, Z === "success" ? "onApiSuccess" : "onApiError", {
129
- url: l,
130
- method: u,
131
- ...R
137
+ let J = z, ht = a(() => Array.isArray(J.records) ? J.records : [], [J.records]), { records: Y, isLoadingMore: gt, goToPage: _t, loadMore: vt } = de({
138
+ elementId: _,
139
+ mode: Ie,
140
+ pageParam: Le,
141
+ records: ht,
142
+ page: J.pageInfo?.page ?? 1,
143
+ refresh: lt,
144
+ navigate: Xe
145
+ }), X = ae({
146
+ serverMode: b,
147
+ isSuccess: st,
148
+ isError: ct,
149
+ rscResolved: x,
150
+ rscPending: P,
151
+ elementData: I
152
+ }), Z = o(void 0);
153
+ i(() => {
154
+ !B && _ && X && (Z.current?.data !== z || Z.current.outcome !== X) && (Z.current = {
155
+ data: z,
156
+ outcome: X
157
+ }, k.interactionTrigger(_, X === "success" ? "onApiSuccess" : "onApiError", {
158
+ url: u,
159
+ method: d,
160
+ ...z
132
161
  }));
133
162
  }, [
134
- R,
135
- g,
136
- O,
137
163
  z,
138
- u,
139
- Z,
140
- l
164
+ _,
165
+ k,
166
+ B,
167
+ d,
168
+ X,
169
+ u
141
170
  ]);
142
- let $ = r(() => ({
143
- ...R,
144
- ...Array.isArray(K.records) ? { records: q } : a,
145
- isLoading: z || J,
146
- isEmpty: ie(K, q, Ae),
147
- hasError: I,
148
- errorMessage: I ? "The data provider could not be reached" : "",
149
- isStale: y && x
171
+ let Q = a(() => ({
172
+ ...z,
173
+ ...Array.isArray(J.records) ? { records: Y } : s,
174
+ isLoading: B || gt,
175
+ isEmpty: Se(J, Y, h),
176
+ hasError: L,
177
+ errorMessage: L ? F ?? "The data provider could not be reached" : "",
178
+ isStale: b && S
150
179
  }), [
151
- R,
152
- K,
153
- q,
154
180
  z,
155
181
  J,
156
- Ae,
157
- I,
158
- y,
159
- x
160
- ]), tt = n(() => me($), [$]);
182
+ Y,
183
+ B,
184
+ gt,
185
+ h,
186
+ L,
187
+ F,
188
+ b,
189
+ S
190
+ ]), yt = r(() => pe(Q), [Q]);
161
191
  re({
162
- id: g,
163
- source: E,
164
- name: v || `API - ${g}`,
165
- fields: tt
192
+ id: _,
193
+ source: D,
194
+ name: y || `API - ${_}`,
195
+ fields: yt
166
196
  });
167
- let { writeRecord: nt } = pe({
168
- elementId: g,
169
- enabled: y,
170
- onDone: U
171
- }), rt = r(() => {
172
- let t = {
197
+ let { writeRecord: $ } = fe({
198
+ elementId: _,
199
+ enabled: b,
200
+ onDone: W
201
+ }), bt = a(() => {
202
+ let e = {
173
203
  performQuery: {
174
- ...e.callbacks.performQuery,
175
- title: `Perform Query ${v}`,
176
- callback: W
204
+ ...t.callbacks.performQuery,
205
+ title: `Perform Query ${y}`,
206
+ callback: K
177
207
  },
178
208
  cancelQuery: {
179
- ...e.callbacks.cancelQuery,
180
- title: `Cancel Query ${v}`,
181
- callback: G
209
+ ...t.callbacks.cancelQuery,
210
+ title: `Cancel Query ${y}`,
211
+ callback: q
182
212
  },
183
213
  loadMore: {
184
- ...e.callbacks.loadMore,
185
- title: `Load More ${v}`,
186
- callback: X
214
+ ...t.callbacks.loadMore,
215
+ title: `Load More ${y}`,
216
+ callback: vt
187
217
  },
188
218
  goToPage: {
189
- ...e.callbacks.goToPage,
190
- title: `Go To Page ${v}`,
191
- callback: ({ page: e }) => Y(Number(e) || 1)
219
+ ...t.callbacks.goToPage,
220
+ title: `Go To Page ${y}`,
221
+ callback: ({ page: e }) => _t(Number(e) || 1)
192
222
  }
193
223
  };
194
- return y && (t.writeRecord = {
195
- ...e.callbacks.writeRecord,
196
- title: `Write Record ${v}`,
197
- callback: nt
198
- }), t;
224
+ return b && (e.writeRecord = {
225
+ ...t.callbacks.writeRecord,
226
+ title: `Write Record ${y}`,
227
+ callback: $
228
+ }), e;
199
229
  }, [
200
- v,
201
- W,
202
- G,
203
- X,
204
- Y,
205
230
  y,
206
- nt
207
- ]), it = r(() => h && D ? ae(c, h, B) : c, [
208
- c,
209
- B,
210
- h,
211
- D
212
- ]), at = r(() => he(E, $), [$, E]);
213
- return /* @__PURE__ */ o(ne, {
214
- ref: t,
215
- tag: !D && !He?.length ? "div" : Oe,
216
- className: Se("plitzi-component__api-container", s),
217
- interactionTriggers: e.triggers,
218
- interactionCallbacks: rt,
219
- children: (!B || Ne || h) && /* @__PURE__ */ o(xe, {
231
+ K,
232
+ q,
233
+ vt,
234
+ _t,
235
+ b,
236
+ $
237
+ ]), xt = a(() => g && O ? ie(l, g, V) : l, [
238
+ l,
239
+ V,
240
+ g,
241
+ O
242
+ ]), St = a(() => me(D, Q), [Q, D]);
243
+ return /* @__PURE__ */ De(ne, {
244
+ ref: n,
245
+ tag: !O && !qe?.length ? "div" : Pe,
246
+ className: Oe("plitzi-component__api-container", c),
247
+ interactionTriggers: t.triggers,
248
+ interactionCallbacks: bt,
249
+ children: (!V || Re || g) && /* @__PURE__ */ De(Ee, {
220
250
  inherit: "live",
221
- name: `Api:${g}`,
222
- value: at,
223
- children: it
251
+ name: `Api:${_}`,
252
+ value: St,
253
+ children: xt
224
254
  })
225
255
  });
226
- }, c = t(s);
256
+ }, l = n(c);
227
257
  //#endregion
228
- export { s as ApiContainer, c as default };
258
+ export { c as ApiContainer, l as default };
@@ -11,6 +11,15 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
11
11
  readonly pagination: readonly string[];
12
12
  };
13
13
  readonly sourceType: "apiContainer";
14
+ readonly publishes: {
15
+ readonly '\u2026': "The answer's own fields, as the service sends them";
16
+ readonly records: "The rows of a paged answer, every page loaded so far";
17
+ readonly isLoading: "Whether an answer (or a next page) is on its way";
18
+ readonly isEmpty: "Whether the answer holds nothing";
19
+ readonly hasError: "Whether the service could not be reached";
20
+ readonly errorMessage: "What to tell the visitor when it could not";
21
+ readonly isStale: "A refresh from the server failed: what shows is from before";
22
+ };
14
23
  readonly serverTemplates: readonly ["notFound"];
15
24
  readonly triggers: {
16
25
  readonly onApiError: {
@@ -35,6 +35,15 @@ var n = e()({
35
35
  ])
36
36
  },
37
37
  sourceType: "apiContainer",
38
+ publishes: {
39
+ "…": "The answer's own fields, as the service sends them",
40
+ records: "The rows of a paged answer, every page loaded so far",
41
+ isLoading: "Whether an answer (or a next page) is on its way",
42
+ isEmpty: "Whether the answer holds nothing",
43
+ hasError: "Whether the service could not be reached",
44
+ errorMessage: "What to tell the visitor when it could not",
45
+ isStale: "A refresh from the server failed: what shows is from before"
46
+ },
38
47
  serverTemplates: ["notFound"],
39
48
  triggers: {
40
49
  onApiError: {
@@ -141,7 +150,7 @@ var n = e()({
141
150
  },
142
151
  definition: {
143
152
  label: "Api Container",
144
- description: "Fetches data from a backend HTTP API (its `query`/`method`/`credentials`) and exposes the response as a data source ITS DESCENDANTS bind to (source `apiContainer_<id>.data`; only elements inside it can consume it). This is how you get backend data into the frontend. Its `mockData` prop is builder-only sample data — the published runtime fetches the real `query`, so always set a real query for production. With `cache: true` a browser request is kept for `staleTime` seconds (default 30) and shared with every provider asking the same thing; it is off unless set. A flow refreshes it with `performQuery` or the global `invalidateQueries` step, and `refreshSeconds` makes it ask again on its own every N seconds (either runtime; paused while the tab is hidden) — the way to keep a queue, feed or status board current without a plugin. A server provider (`runtime: \"server\"`) whose answer means the address shows nothing — a record not found — says so in `notFound`, a template against its answer (`{{ source.found == false }}`): the page is sent with status 404, rendered as written. Its `subType` (container tag) is empty by default, and then it renders NO element of its own: its children lay out directly in its parent, and any class, variant or style binding on it applies to nothing. To style the provider itself give it a tag (`subType: \"div\"`, `section`, …); otherwise style its parent or a child.",
153
+ description: "Fetches data from a backend HTTP API (its `query`/`method`/`credentials`) and exposes the response as a data source ITS DESCENDANTS bind to (source `apiContainer_<id>.data`; only elements inside it can consume it). This is how you get backend data into the frontend. Its `mockData` prop is builder-only sample data — the published runtime fetches the real `query`, so always set a real query for production. With `cache: true` a browser request is kept for `staleTime` seconds (default 30) and shared with every provider asking the same thing; it is off unless set. A flow refreshes it with `performQuery` or the global `invalidateQueries` step, and `refreshSeconds` makes it ask again on its own every N seconds (either runtime; paused while the tab is hidden) — the way to keep a queue, feed or status board current without a plugin. `when` (a rule group over sources — `auth.isAuthenticated`, `roomData.room.closed != true`) makes it wait: it asks nothing until the rules hold — the page server holds a server one too, so a page that has nothing to ask for (a closed room, a guest) asks nothing, in either runtime. An `action` or a `connector` is resolved only by the page server: a provider naming one needs `runtime: \"server\"` — in the browser it never asks; a browser flow that changes data calls the action with the `runServerAction` step, then `performQuery` or `invalidateQueries` reads it again. `onApiSuccess` and `onApiError` say `url`, `method`, `status` and `data` (the answer) to their flow. A server provider (`runtime: \"server\"`) whose answer means the address shows nothing — a record not found — says so in `notFound`, a template against its answer (`{{ source.found == false }}`): the page is sent with status 404, rendered as written. Its `subType` (container tag) is empty by default, and then it renders NO element of its own: its children lay out directly in its parent, and any class, variant or style binding on it applies to nothing. To style the provider itself give it a tag (`subType: \"div\"`, `section`, …); otherwise style its parent or a child.",
145
154
  items: []
146
155
  },
147
156
  market: {
@@ -3,7 +3,7 @@ export type UseInputRefreshProps = {
3
3
  enabled: boolean;
4
4
  /** The input as it resolves now — bound to state, it changes as the visitor does. */
5
5
  input: unknown;
6
- /** The input the element was saved with: what the page server resolved the first paint with. */
6
+ /** What the page server resolved the first paint with: the saved input, and its bindings on the address (`serverInputOf`). */
7
7
  savedInput: unknown;
8
8
  performQuery: (options: {
9
9
  input?: unknown;
@@ -12,9 +12,9 @@ export type UseInputRefreshProps = {
12
12
  /**
13
13
  * A bound `input` asks again when what it says changes.
14
14
  *
15
- * The first paint was resolved by the page server with the input the element was SAVED with — bindings to the
16
- * visitor's state are not the server's to read — so that is what the first value is compared against: a binding that
17
- * already says something else (a state kept from the last visit) asks at once.
15
+ * The first paint was resolved by the page server with the input the element was saved with and its bindings on the
16
+ * address — bindings to the visitor's state are not the server's to read — so that is what the first value is compared
17
+ * against: a binding that already says something else (a state kept from the last visit) asks at once.
18
18
  */
19
19
  declare const useInputRefresh: ({ enabled, input, savedInput, performQuery }: UseInputRefreshProps) => void;
20
20
  export default useInputRefresh;
@@ -1,3 +1,4 @@
1
+ import { NavigateHow } from '@plitzi/sdk-shared';
1
2
  export type ProviderPagination = 'none' | 'url' | 'append';
2
3
  export type UseProviderPaginationProps = {
3
4
  elementId: string;
@@ -9,7 +10,7 @@ export type UseProviderPaginationProps = {
9
10
  /** Page the resolved window belongs to, as reported by the server. */
10
11
  page: number;
11
12
  refresh?: (ids?: string[], params?: Record<string, string>) => Promise<void>;
12
- navigate?: (url: string, isExternal?: boolean) => void;
13
+ navigate?: (url: string, how?: NavigateHow) => void;
13
14
  };
14
15
  /**
15
16
  * Drives a provider's window, in the two shapes a content site needs.
@@ -1,5 +1,5 @@
1
1
  declare const ApiContainer: {
2
- (props: import('../../..').WithElementProps<import('./ApiContainer').ApiContainerProps>): import('react').JSX.Element;
2
+ (props: import('../../..').WithElementProps<import('./ApiContainer').ApiContainerProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
3
3
  displayName: string;
4
4
  } & {
5
5
  readonly type: "apiContainer";
@@ -10,6 +10,15 @@ declare const ApiContainer: {
10
10
  readonly pagination: readonly string[];
11
11
  };
12
12
  readonly sourceType: "apiContainer";
13
+ readonly publishes: {
14
+ readonly '\u2026': "The answer's own fields, as the service sends them";
15
+ readonly records: "The rows of a paged answer, every page loaded so far";
16
+ readonly isLoading: "Whether an answer (or a next page) is on its way";
17
+ readonly isEmpty: "Whether the answer holds nothing";
18
+ readonly hasError: "Whether the service could not be reached";
19
+ readonly errorMessage: "What to tell the visitor when it could not";
20
+ readonly isStale: "A refresh from the server failed: what shows is from before";
21
+ };
13
22
  readonly serverTemplates: readonly ["notFound"];
14
23
  readonly triggers: {
15
24
  readonly onApiError: {
@@ -19,7 +19,7 @@ export type ChannelProps = {
19
19
  };
20
20
  declare const Channel: ({ ref, className, children, topic, grant, presence, keep, subType }: ChannelProps) => import('react').JSX.Element;
21
21
  declare const _default: {
22
- (props: import('../../..').WithElementProps<ChannelProps>): import('react').JSX.Element;
22
+ (props: import('../../..').WithElementProps<ChannelProps>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
23
23
  displayName: string;
24
24
  };
25
25
  export default _default;
@@ -8,6 +8,14 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
8
8
  readonly subType: readonly string[];
9
9
  };
10
10
  readonly sourceType: "channel";
11
+ readonly publishes: {
12
+ readonly connected: "Whether the channel is connected now";
13
+ readonly me: "This visitor's own member id";
14
+ readonly members: "Who is on the channel now";
15
+ readonly messages: "What was said on it since the page opened";
16
+ readonly last: "The last of them, or null";
17
+ readonly retained: "What the channel keeps for whoever joins";
18
+ };
11
19
  readonly triggers: {
12
20
  readonly onMessage: {
13
21
  readonly action: "onMessage";
@@ -21,6 +29,7 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
21
29
  readonly user: "";
22
30
  readonly at: "";
23
31
  readonly echo: false;
32
+ readonly replayed: false;
24
33
  };
25
34
  };
26
35
  readonly onJoin: {
@@ -10,6 +10,14 @@ var n = e()({
10
10
  "main"
11
11
  ]) },
12
12
  sourceType: "channel",
13
+ publishes: {
14
+ connected: "Whether the channel is connected now",
15
+ me: "This visitor's own member id",
16
+ members: "Who is on the channel now",
17
+ messages: "What was said on it since the page opened",
18
+ last: "The last of them, or null",
19
+ retained: "What the channel keeps for whoever joins"
20
+ },
13
21
  triggers: {
14
22
  onMessage: {
15
23
  action: "onMessage",
@@ -22,7 +30,8 @@ var n = e()({
22
30
  from: "",
23
31
  user: "",
24
32
  at: "",
25
- echo: !1
33
+ echo: !1,
34
+ replayed: !1
26
35
  }
27
36
  },
28
37
  onJoin: {
@@ -93,7 +102,7 @@ var n = e()({
93
102
  },
94
103
  definition: {
95
104
  label: "Channel",
96
- description: "A realtime channel: every OTHER page on the same `topic` hears what one publishes, within milliseconds — the page that sent it too with `echo` (its `from` is then the `me` of the channel). The topic must match a channel the space declares in its settings (`channels`), e.g. `board:{{ id }}` under `board:{id}`. A topic of a private channel (`grant: true`) opens only with `grant`, bound to the grant the action that let this visitor in returned (its `realtime.grant` step). ITS DESCENDANTS bind to its source `channel_<id>`: `connected`, `members` (with the state each announced), `messages` (the last `keep`), `last` and — on a `retain: true` channel — `retained`, the latest data the server said of each type, there as the page joins (`retained.lists`). It fires `onMessage`; `onJoin` when somebody who came after this page has announced who they are, and `onLeave` when somebody goes — each with `from`, `user` and the `state` they announced; and answers `publish({ type, data, echo })` and `setPresence({ data })`; `presence` is the state this page announces (a name, a colour). Closed in the builder and anywhere without a server.",
105
+ description: "A realtime channel: every OTHER page on the same `topic` hears what one publishes, within milliseconds — the page that sent it too with `echo` (its `from` is then the `me` of the channel). Hidden, it stays joined and runs its flows — its `loadStrategy` defers only its children: to leave the topic while hidden, put it inside a container that carries the condition and `loadStrategy: 'visible'`. The topic must match a channel the space declares in its settings (`channels`), e.g. `board:{{ id }}` under `board:{id}`. A topic of a private channel (`grant: true`) opens only with `grant`, bound to the grant the action that let this visitor in returned (its `realtime.grant` step). ITS DESCENDANTS bind to its source `channel_<id>`: `connected`, `members` (with the state each announced), `messages` (the last `keep`), `last` and — on a `retain: true` channel — `retained`, the latest data the server said of each type, there as the page joins (`retained.lists`). It fires `onMessage`; `onJoin` when somebody who came after this page has announced who they are, and `onLeave` when somebody goes — each with `from`, `user` and the `state` they announced; and answers `publish({ type, data, echo })` and `setPresence({ data })`; `presence` is the state this page announces (a name, a colour). Closed in the builder and anywhere without a server.",
97
106
  items: []
98
107
  },
99
108
  market: {