@plitzi/sdk-elements 0.38.9 → 0.38.11

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 (47) hide show
  1. package/CHANGELOG.md +271 -0
  2. package/dist/Element/hooks/useElementInternal.mjs +67 -59
  3. package/dist/elements/advanced/BlockHtml/index.mjs +3 -3
  4. package/dist/elements/advanced/BlockJsx/index.mjs +3 -3
  5. package/dist/elements/advanced/Custom/index.mjs +3 -3
  6. package/dist/elements/basic/Button/index.mjs +3 -3
  7. package/dist/elements/basic/ThemeToggle/ThemeToggle.mjs +13 -13
  8. package/dist/elements/declarations/index.d.ts +28 -16
  9. package/dist/elements/declarations/index.mjs +6 -6
  10. package/dist/elements/form/Form/Form.mjs +19 -19
  11. package/dist/elements/form/FormControl/FormControl.mjs +10 -10
  12. package/dist/elements/form/FormControl/declaration.mjs +1 -1
  13. package/dist/elements/internal/NotFound/index.mjs +3 -3
  14. package/dist/elements/internal/Page/Page.d.ts +5 -0
  15. package/dist/elements/internal/Page/Page.mjs +26 -25
  16. package/dist/elements/internal/Page/PageHead.d.ts +12 -0
  17. package/dist/elements/internal/Page/PageHead.mjs +29 -0
  18. package/dist/elements/internal/Page/declaration.d.ts +2 -0
  19. package/dist/elements/internal/Page/declaration.mjs +5 -0
  20. package/dist/elements/internal/Page/index.d.ts +2 -0
  21. package/dist/elements/provider/ApiContainer/ApiContainer.mjs +187 -187
  22. package/dist/elements/provider/ApiContainer/declaration.d.ts +10 -9
  23. package/dist/elements/provider/ApiContainer/declaration.mjs +1 -0
  24. package/dist/elements/provider/ApiContainer/index.d.ts +10 -9
  25. package/dist/elements/provider/Channel/Channel.mjs +58 -57
  26. package/dist/elements/provider/Channel/declaration.d.ts +7 -1
  27. package/dist/elements/provider/Channel/declaration.mjs +8 -2
  28. package/dist/elements/provider/Channel/index.d.ts +7 -1
  29. package/dist/elements/structure/Carousel/Carousel.mjs +72 -72
  30. package/dist/elements/structure/Carousel/CarouselTrack/index.mjs +3 -3
  31. package/dist/elements/structure/Carousel/declaration.d.ts +1 -1
  32. package/dist/elements/structure/Carousel/index.d.ts +1 -1
  33. package/dist/elements/structure/Container/Container.mjs +8 -8
  34. package/dist/elements/structure/DialogContainer/DialogContainer.mjs +14 -14
  35. package/dist/elements/structure/DialogContainer/declaration.d.ts +1 -2
  36. package/dist/elements/structure/DialogContainer/declaration.mjs +1 -2
  37. package/dist/elements/structure/DialogContainer/index.d.ts +1 -2
  38. package/dist/elements/structure/List/modes/ListControlled/ListControlled.mjs +8 -8
  39. package/dist/elements/structure/ModalContainer/ModalContainer.mjs +16 -16
  40. package/dist/elements/structure/ModalContainer/declaration.d.ts +2 -3
  41. package/dist/elements/structure/ModalContainer/declaration.mjs +2 -3
  42. package/dist/elements/structure/ModalContainer/index.d.ts +2 -3
  43. package/dist/elements/structure/Pagination/Pagination.mjs +10 -10
  44. package/dist/index.d.ts +23 -16
  45. package/dist/realtime/useChannel.d.ts +4 -3
  46. package/dist/realtime/useChannel.mjs +36 -36
  47. package/package.json +12 -8
@@ -1,8 +1,8 @@
1
- import e from "../../../Element/hocs/withElement.mjs";
2
- import t from "../../../Element/hooks/useElement.mjs";
3
- import { RootElement as n } from "../../../Element/RootElement.mjs";
4
- import r from "../../../dataSource/pathFields.mjs";
5
- import i from "./declaration.mjs";
1
+ import e from "./declaration.mjs";
2
+ import t from "../../../Element/hocs/withElement.mjs";
3
+ import n from "../../../Element/hooks/useElement.mjs";
4
+ import { RootElement as r } from "../../../Element/RootElement.mjs";
5
+ import i from "../../../dataSource/pathFields.mjs";
6
6
  import a from "../../../realtime/useChannel.mjs";
7
7
  import { use as o, useCallback as s, useMemo as c, useState as l } from "react";
8
8
  import u from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
@@ -12,81 +12,82 @@ import { jsx as p } from "react/jsx-runtime";
12
12
  import m from "clsx";
13
13
  import h from "@plitzi/sdk-shared/dataSource/helpers/getSourceName";
14
14
  import g from "@plitzi/sdk-shared/dataSource/hooks/useRegisterSource";
15
- import { JOIN_TYPE as _, LEAVE_TYPE as v, PRESENCE_TYPE as y } from "@plitzi/sdk-shared/realtime";
15
+ import { isTrue as _ } from "@plitzi/sdk-shared/dataSource/utility/truthiness";
16
+ import { JOIN_TYPE as v, LEAVE_TYPE as y, PRESENCE_TYPE as b } from "@plitzi/sdk-shared/realtime";
16
17
  //#region src/elements/provider/Channel/Channel.tsx
17
- var b = (e) => {
18
+ var x = (e) => {
18
19
  if (typeof e != "string") return e;
19
20
  try {
20
21
  return JSON.parse(e);
21
22
  } catch {
22
23
  return e;
23
24
  }
24
- }, x = /* @__PURE__ */ new Set([
25
- y,
26
- _,
27
- v
28
- ]), S = ({ ref: e, className: _, children: v, topic: y = "", grant: S = "", presence: C, keep: w = 20, subType: T = "" }) => {
29
- let { id: E, definition: { label: D = "Channel" } } = t(), { settings: { previewMode: O }, contexts: { InteractionsContext: k } } = u(), { interactionsManager: A } = o(k), j = Math.max(0, Number(w) || 0), [M, N] = l([]), P = s((e) => {
30
- x.has(e.type) || (j > 0 && N((t) => [...t, e].slice(-j)), A.interactionTrigger(E, "onMessage", { ...e }));
25
+ }, S = /* @__PURE__ */ new Set([
26
+ b,
27
+ v,
28
+ y
29
+ ]), C = ({ ref: t, className: v, children: y, topic: b = "", grant: C = "", presence: w, keep: T = 20, subType: E = "" }) => {
30
+ let { id: D, definition: { label: O = "Channel" } } = n(), { settings: { previewMode: k }, contexts: { InteractionsContext: A } } = u(), { interactionsManager: j } = o(A), M = Math.max(0, Number(T) || 0), [N, P] = l([]), F = s((e) => {
31
+ S.has(e.type) || (M > 0 && P((t) => [...t, e].slice(-M)), j.interactionTrigger(D, "onMessage", { ...e }));
31
32
  }, [
32
- E,
33
- A,
34
- j
35
- ]), F = s(({ from: e, user: t, state: n }) => void A.interactionTrigger(E, "onJoin", {
33
+ D,
34
+ j,
35
+ M
36
+ ]), I = s(({ from: e, user: t, state: n }) => void j.interactionTrigger(D, "onJoin", {
36
37
  from: e,
37
38
  user: t ?? "",
38
39
  state: n
39
- }), [E, A]), I = s(({ from: e, user: t, state: n }) => void A.interactionTrigger(E, "onLeave", {
40
+ }), [D, j]), L = s(({ from: e, user: t, state: n }) => void j.interactionTrigger(D, "onLeave", {
40
41
  from: e,
41
42
  user: t ?? "",
42
43
  state: n
43
- }), [E, A]), L = a(O && y ? y : void 0, {
44
- grant: S || void 0,
45
- presence: C === void 0 || C === "" ? void 0 : b(C),
46
- onMessage: P,
47
- onJoin: F,
48
- onLeave: I
49
- }), R = c(() => ({
44
+ }), [D, j]), R = a(k && b ? b : void 0, {
45
+ grant: C || void 0,
46
+ presence: w === void 0 || w === "" ? void 0 : x(w),
47
+ onMessage: F,
48
+ onJoin: I,
49
+ onLeave: L
50
+ }), z = c(() => ({
50
51
  publish: {
51
- ...i.callbacks.publish,
52
- callback: ({ type: e, data: t }) => typeof e == "string" && e ? L.publish(e, b(t)) : Promise.resolve(!1)
52
+ ...e.callbacks.publish,
53
+ callback: ({ type: e, data: t, echo: n }) => typeof e == "string" && e ? R.publish(e, x(t), { echo: _(n) }) : Promise.resolve(!1)
53
54
  },
54
55
  setPresence: {
55
- ...i.callbacks.setPresence,
56
- callback: ({ data: e }) => L.setPresence(b(e))
56
+ ...e.callbacks.setPresence,
57
+ callback: ({ data: e }) => R.setPresence(x(e))
57
58
  }
58
- }), [L]), z = h(i.sourceType, E), B = c(() => ({
59
- connected: L.connected,
60
- me: L.me ?? "",
61
- members: L.members,
62
- messages: M,
63
- last: M.at(-1) ?? null
59
+ }), [R]), B = h(e.sourceType, D), V = c(() => ({
60
+ connected: R.connected,
61
+ me: R.me ?? "",
62
+ members: R.members,
63
+ messages: N,
64
+ last: N.at(-1) ?? null
64
65
  }), [
65
- L.connected,
66
- L.me,
67
- L.members,
68
- M
69
- ]), V = s(() => r(B), [B]);
66
+ R.connected,
67
+ R.me,
68
+ R.members,
69
+ N
70
+ ]), H = s(() => i(V), [V]);
70
71
  g({
71
- id: E,
72
- source: z,
73
- name: D || `Channel - ${E}`,
74
- fields: V
72
+ id: D,
73
+ source: B,
74
+ name: O || `Channel - ${D}`,
75
+ fields: H
75
76
  });
76
- let H = c(() => z ? { runtime: { sources: { [z]: B } } } : f, [B, z]);
77
- return /* @__PURE__ */ p(n, {
78
- ref: e,
79
- tag: T,
80
- className: m("plitzi-component__channel", _),
81
- interactionTriggers: i.triggers,
82
- interactionCallbacks: R,
77
+ let U = c(() => B ? { runtime: { sources: { [B]: V } } } : f, [V, B]);
78
+ return /* @__PURE__ */ p(r, {
79
+ ref: t,
80
+ tag: E,
81
+ className: m("plitzi-component__channel", v),
82
+ interactionTriggers: e.triggers,
83
+ interactionCallbacks: z,
83
84
  children: /* @__PURE__ */ p(d, {
84
85
  inherit: "live",
85
- name: `Channel:${E}`,
86
- value: H,
87
- children: v
86
+ name: `Channel:${D}`,
87
+ value: U,
88
+ children: y
88
89
  })
89
90
  });
90
- }, C = e(S);
91
+ }, w = t(C);
91
92
  //#endregion
92
- export { S as Channel, C as default };
93
+ export { C as Channel, w as default };
@@ -20,6 +20,7 @@ declare const declaration: {
20
20
  readonly from: "";
21
21
  readonly user: "";
22
22
  readonly at: "";
23
+ readonly echo: false;
23
24
  };
24
25
  };
25
26
  readonly onJoin: {
@@ -62,6 +63,11 @@ declare const declaration: {
62
63
  readonly defaultValue: "";
63
64
  readonly type: "text";
64
65
  };
66
+ readonly echo: {
67
+ readonly label: "Heard on this page too";
68
+ readonly defaultValue: false;
69
+ readonly type: "boolean";
70
+ };
65
71
  };
66
72
  };
67
73
  readonly setPresence: {
@@ -130,9 +136,9 @@ declare const declaration: {
130
136
  };
131
137
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
132
138
  subType?: "" | "div" | "section" | "aside" | "main" | undefined;
133
- topic?: string | undefined;
134
139
  grant?: string | undefined;
135
140
  presence?: unknown;
141
+ topic?: string | undefined;
136
142
  keep?: number | string | undefined;
137
143
  }>>;
138
144
  export default declaration;
@@ -21,7 +21,8 @@ var n = e()({
21
21
  data: "",
22
22
  from: "",
23
23
  user: "",
24
- at: ""
24
+ at: "",
25
+ echo: !1
25
26
  }
26
27
  },
27
28
  onJoin: {
@@ -63,6 +64,11 @@ var n = e()({
63
64
  label: "Data (JSON or a template)",
64
65
  defaultValue: "",
65
66
  type: "text"
67
+ },
68
+ echo: {
69
+ label: "Heard on this page too",
70
+ defaultValue: !1,
71
+ type: "boolean"
66
72
  }
67
73
  }
68
74
  },
@@ -88,7 +94,7 @@ var n = e()({
88
94
  definition: {
89
95
  label: "Channel",
90
96
  type: "channel",
91
- description: "A realtime channel: every page on the same `topic` hears what any of them publishes, within milliseconds. 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`) and `last`. 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 })` and `setPresence({ data })`; `presence` is the state this page announces (a name, a colour). Closed in the builder and anywhere without a server.",
97
+ 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 channel's `me`). 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`) and `last`. 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.",
92
98
  items: [],
93
99
  bindings: {},
94
100
  styleSelectors: { base: "" },
@@ -19,6 +19,7 @@ declare const Channel: {
19
19
  readonly from: "";
20
20
  readonly user: "";
21
21
  readonly at: "";
22
+ readonly echo: false;
22
23
  };
23
24
  };
24
25
  readonly onJoin: {
@@ -61,6 +62,11 @@ declare const Channel: {
61
62
  readonly defaultValue: "";
62
63
  readonly type: "text";
63
64
  };
65
+ readonly echo: {
66
+ readonly label: "Heard on this page too";
67
+ readonly defaultValue: false;
68
+ readonly type: "boolean";
69
+ };
64
70
  };
65
71
  };
66
72
  readonly setPresence: {
@@ -129,9 +135,9 @@ declare const Channel: {
129
135
  };
130
136
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
131
137
  subType?: "" | "div" | "section" | "aside" | "main" | undefined;
132
- topic?: string | undefined;
133
138
  grant?: string | undefined;
134
139
  presence?: unknown;
140
+ topic?: string | undefined;
135
141
  keep?: number | string | undefined;
136
142
  }>>;
137
143
  export default Channel;
@@ -1,27 +1,27 @@
1
- import e from "../../../Element/hocs/withElement.mjs";
2
- import t from "../../../Element/hooks/useElement.mjs";
3
- import { RootElement as n } from "../../../Element/RootElement.mjs";
4
- import r from "../../../dataSource/pathFields.mjs";
5
- import i from "./CarouselContext.mjs";
6
- import { clampIndex as a, directionOf as o, slideStep as s, stepIndex as c } from "./carouselIndex.mjs";
7
- import l from "./declaration.mjs";
8
- import u from "./useAutoplay.mjs";
9
- import { rowKeys as ee } from "../List/modes/ListControlled/rowKeys.mjs";
10
- import { use as te, useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
11
- import ne from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
12
- import { StoreProvider as re } from "@plitzi/nexus/react";
13
- import { emptyObject as g } from "@plitzi/sdk-shared/helpers/utils";
14
- import { jsx as _ } from "react/jsx-runtime";
15
- import ie from "clsx";
16
- import ae from "@plitzi/sdk-shared/dataSource/helpers/getSourceName";
17
- import oe from "@plitzi/sdk-shared/dataSource/hooks/useRegisterSource";
1
+ import e from "./declaration.mjs";
2
+ import t from "../../../Element/hocs/withElement.mjs";
3
+ import n from "../../../Element/hooks/useElement.mjs";
4
+ import { RootElement as ee } from "../../../Element/RootElement.mjs";
5
+ import te from "../../../dataSource/pathFields.mjs";
6
+ import ne from "./CarouselContext.mjs";
7
+ import { clampIndex as r, directionOf as i, slideStep as a, stepIndex as o } from "./carouselIndex.mjs";
8
+ import re from "./useAutoplay.mjs";
9
+ import { rowKeys as s } from "../List/modes/ListControlled/rowKeys.mjs";
10
+ import { use as ie, useCallback as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
11
+ import p from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
12
+ import { StoreProvider as m } from "@plitzi/nexus/react";
13
+ import { emptyObject as h } from "@plitzi/sdk-shared/helpers/utils";
14
+ import { jsx as g } from "react/jsx-runtime";
15
+ import ae from "clsx";
16
+ import oe from "@plitzi/sdk-shared/dataSource/helpers/getSourceName";
17
+ import se from "@plitzi/sdk-shared/dataSource/hooks/useRegisterSource";
18
18
  //#region src/elements/structure/Carousel/Carousel.tsx
19
- var v = ({ ref: e, className: v = "", children: y, items: b = [], mode: x = "slide", autoplay: S = 0, pauseOnHover: C = !0, loop: w = !0, transition: T = "slide", speed: E = 30, itemKey: D, label: se = "" }) => {
20
- let { id: O, definition: { label: k = "Carousel" } } = t(), A = ae(l.sourceType, O), { settings: { previewMode: ce }, contexts: { InteractionsContext: le } } = ne(), { interactionsManager: j } = te(le), M = p(() => Array.isArray(b) ? b : [], [b]), N = p(() => ee(M, D), [M, D]), P = M.length, F = !!ce, [I, L] = h(0), [R, z] = h("next"), [B, V] = h(!1), [H, U] = h(S > 0), ue = m(null), W = e ?? ue, G = m(null), K = a(I, P);
21
- f(() => {
19
+ var _ = ({ ref: t, className: _ = "", children: v, items: y = [], mode: b = "slide", autoplay: x = 0, pauseOnHover: S = !0, loop: C = !0, transition: w = "slide", speed: T = 30, itemKey: E, label: D = "" }) => {
20
+ let { id: O, definition: { label: k = "Carousel" } } = n(), A = oe(e.sourceType, O), { settings: { previewMode: ce }, contexts: { InteractionsContext: le } } = p(), { interactionsManager: j } = ie(le), M = u(() => Array.isArray(y) ? y : [], [y]), N = u(() => s(M, E), [M, E]), P = M.length, F = !!ce, [I, L] = f(0), [R, z] = f("next"), [B, V] = f(!1), [H, U] = f(x > 0), ue = d(null), W = t ?? ue, G = d(null), K = r(I, P);
21
+ l(() => {
22
22
  I !== K && L(K);
23
23
  }, [I, K]);
24
- let q = d((e, t) => {
24
+ let q = c((e, t) => {
25
25
  P !== 0 && e !== K && (z(t), V(!0), L(e), j.interactionTrigger(O, "onChange", {
26
26
  index: e,
27
27
  item: M[e]
@@ -32,117 +32,117 @@ var v = ({ ref: e, className: v = "", children: y, items: b = [], mode: x = "sli
32
32
  O,
33
33
  j,
34
34
  M
35
- ]), J = d((e) => {
36
- let t = G.current, n = t ? s(t) : 0;
35
+ ]), J = c((e) => {
36
+ let t = G.current, n = t ? a(t) : 0;
37
37
  t && n > 0 && t.scrollBy({
38
38
  left: e * n,
39
39
  behavior: "smooth"
40
40
  });
41
- }, []), Y = d(() => {
42
- if (x === "scroll") {
41
+ }, []), Y = c(() => {
42
+ if (b === "scroll") {
43
43
  J(1);
44
44
  return;
45
45
  }
46
- q(c(K, P, 1, w), "next");
46
+ q(o(K, P, 1, C), "next");
47
47
  }, [
48
48
  P,
49
49
  K,
50
- w,
51
- x,
50
+ C,
51
+ b,
52
52
  q,
53
53
  J
54
- ]), X = d(() => {
55
- if (x === "scroll") {
54
+ ]), X = c(() => {
55
+ if (b === "scroll") {
56
56
  J(-1);
57
57
  return;
58
58
  }
59
- q(c(K, P, -1, w), "previous");
59
+ q(o(K, P, -1, C), "previous");
60
60
  }, [
61
61
  P,
62
62
  K,
63
- w,
64
- x,
63
+ C,
64
+ b,
65
65
  q,
66
66
  J
67
- ]), Z = d((e) => {
68
- let t = a(e.index, P);
69
- if (x === "scroll") {
67
+ ]), Z = c((e) => {
68
+ let t = r(e.index, P);
69
+ if (b === "scroll") {
70
70
  J(t - K);
71
71
  return;
72
72
  }
73
- q(t, o(K, t));
73
+ q(t, i(K, t));
74
74
  }, [
75
75
  P,
76
76
  K,
77
- x,
77
+ b,
78
78
  q,
79
79
  J
80
- ]), Q = d((e) => {
81
- e !== K && q(e, o(K, e));
80
+ ]), Q = c((e) => {
81
+ e !== K && q(e, i(K, e));
82
82
  }, [K, q]);
83
- u({
84
- delay: x === "slide" ? S : 0,
83
+ re({
84
+ delay: b === "slide" ? x : 0,
85
85
  active: F && H && P > 1,
86
86
  rootRef: W,
87
- pauseOnHover: C,
87
+ pauseOnHover: S,
88
88
  position: K,
89
89
  onTick: Y
90
90
  });
91
- let de = p(() => ({
91
+ let de = u(() => ({
92
92
  next: {
93
- ...l.callbacks.next,
93
+ ...e.callbacks.next,
94
94
  callback: Y
95
95
  },
96
96
  previous: {
97
- ...l.callbacks.previous,
97
+ ...e.callbacks.previous,
98
98
  callback: X
99
99
  },
100
100
  goTo: {
101
- ...l.callbacks.goTo,
101
+ ...e.callbacks.goTo,
102
102
  callback: Z
103
103
  },
104
104
  play: {
105
- ...l.callbacks.play,
105
+ ...e.callbacks.play,
106
106
  callback: () => U(!0)
107
107
  },
108
108
  pause: {
109
- ...l.callbacks.pause,
109
+ ...e.callbacks.pause,
110
110
  callback: () => U(!1)
111
111
  }
112
112
  }), [
113
113
  Z,
114
114
  Y,
115
115
  X
116
- ]), $ = p(() => ({
116
+ ]), $ = u(() => ({
117
117
  items: M,
118
118
  count: P,
119
119
  index: K,
120
120
  item: M[K],
121
- playing: H && S > 0
121
+ playing: H && x > 0
122
122
  }), [
123
- S,
123
+ x,
124
124
  P,
125
125
  K,
126
126
  M,
127
127
  H
128
- ]), fe = d(() => r($), [$]);
129
- oe({
128
+ ]), fe = c(() => te($), [$]);
129
+ se({
130
130
  id: O,
131
131
  source: A,
132
132
  name: k || `Carousel - ${O}`,
133
133
  fields: fe
134
134
  });
135
- let pe = p(() => A ? { runtime: { sources: { [A]: $ } } } : g, [A, $]), me = p(() => ({
135
+ let pe = u(() => A ? { runtime: { sources: { [A]: $ } } } : h, [A, $]), me = u(() => ({
136
136
  source: A,
137
137
  items: M,
138
138
  keys: N,
139
139
  index: K,
140
140
  direction: R,
141
141
  moved: B,
142
- mode: x,
143
- transition: T,
144
- speed: E,
145
- pauseOnHover: C,
142
+ mode: b,
143
+ transition: w,
144
+ speed: T,
145
+ pauseOnHover: S,
146
146
  live: F,
147
147
  scrollerRef: G,
148
148
  onScrolledTo: Q
@@ -152,32 +152,32 @@ var v = ({ ref: e, className: v = "", children: y, items: b = [], mode: x = "sli
152
152
  N,
153
153
  M,
154
154
  F,
155
- x,
155
+ b,
156
156
  B,
157
157
  Q,
158
- C,
158
+ S,
159
159
  A,
160
- E,
161
- T
160
+ T,
161
+ w
162
162
  ]);
163
- return /* @__PURE__ */ _(n, {
163
+ return /* @__PURE__ */ g(ee, {
164
164
  ref: W,
165
- className: ie("plitzi-component__carousel", `carousel--${x}`, v),
165
+ className: ae("plitzi-component__carousel", `carousel--${b}`, _),
166
166
  role: "region",
167
167
  "aria-roledescription": "carousel",
168
- "aria-label": se || void 0,
169
- interactionTriggers: l.triggers,
168
+ "aria-label": D || void 0,
169
+ interactionTriggers: e.triggers,
170
170
  interactionCallbacks: de,
171
- children: /* @__PURE__ */ _(re, {
171
+ children: /* @__PURE__ */ g(m, {
172
172
  inherit: "live",
173
173
  name: `Carousel:${O}`,
174
174
  value: pe,
175
- children: /* @__PURE__ */ _(i, {
175
+ children: /* @__PURE__ */ g(ne, {
176
176
  value: me,
177
- children: y
177
+ children: v
178
178
  })
179
179
  })
180
180
  });
181
- }, y = e(v);
181
+ }, v = t(_);
182
182
  //#endregion
183
- export { v as Carousel, y as default };
183
+ export { _ as Carousel, v as default };
@@ -1,6 +1,6 @@
1
- import e from "./CarouselTrack.mjs";
2
- import t from "./declaration.mjs";
1
+ import e from "./declaration.mjs";
2
+ import t from "./CarouselTrack.mjs";
3
3
  //#region src/elements/structure/Carousel/CarouselTrack/index.ts
4
- var n = Object.assign(e, t);
4
+ var n = Object.assign(t, e);
5
5
  //#endregion
6
6
  export { n as default };
@@ -123,8 +123,8 @@ declare const declaration: {
123
123
  items?: unknown[] | undefined;
124
124
  speed?: number | undefined;
125
125
  loop?: boolean | undefined;
126
- autoplay?: number | undefined;
127
126
  pauseOnHover?: boolean | undefined;
127
+ autoplay?: number | undefined;
128
128
  transition?: import('./CarouselContext').CarouselTransition | undefined;
129
129
  itemKey?: string | undefined;
130
130
  }>>;
@@ -178,8 +178,8 @@ declare const Carousel: {
178
178
  items?: unknown[] | undefined;
179
179
  speed?: number | undefined;
180
180
  loop?: boolean | undefined;
181
- autoplay?: number | undefined;
182
181
  pauseOnHover?: boolean | undefined;
182
+ autoplay?: number | undefined;
183
183
  transition?: import('./CarouselContext').CarouselTransition | undefined;
184
184
  itemKey?: string | undefined;
185
185
  }>;
@@ -1,16 +1,16 @@
1
- import e from "../../../Element/hocs/withElement.mjs";
2
- import { RootElement as t } from "../../../Element/RootElement.mjs";
3
- import { NAMEABLE_CONTAINER_TAGS as n } from "./declaration.mjs";
1
+ import { NAMEABLE_CONTAINER_TAGS as e } from "./declaration.mjs";
2
+ import t from "../../../Element/hocs/withElement.mjs";
3
+ import { RootElement as n } from "../../../Element/RootElement.mjs";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  import i from "clsx";
6
6
  //#region src/elements/structure/Container/Container.tsx
7
- var a = ({ ref: e, className: a = "", subType: o = "div", label: s = "", decorative: c = !1, live: l = "", title: u = "", children: d }) => {
8
- let f = !c && s && n.includes(o) ? {
7
+ var a = ({ ref: t, className: a = "", subType: o = "div", label: s = "", decorative: c = !1, live: l = "", title: u = "", children: d }) => {
8
+ let f = !c && s && e.includes(o) ? {
9
9
  "aria-label": s,
10
10
  ...o === "div" ? { role: "group" } : {}
11
11
  } : {}, p = c ? { "aria-hidden": !0 } : {}, m = l ? { "aria-live": l } : {};
12
- return /* @__PURE__ */ r(t, {
13
- ref: e,
12
+ return /* @__PURE__ */ r(n, {
13
+ ref: t,
14
14
  tag: o,
15
15
  className: i(`plitzi-component__container plitzi-component__container-${o}`, a),
16
16
  title: u || void 0,
@@ -19,6 +19,6 @@ var a = ({ ref: e, className: a = "", subType: o = "div", label: s = "", decorat
19
19
  ...m,
20
20
  children: d
21
21
  });
22
- }, o = e(a);
22
+ }, o = t(a);
23
23
  //#endregion
24
24
  export { a as Container, o as default };
@@ -1,8 +1,8 @@
1
- import e from "../../../Element/hocs/withElement.mjs";
2
- import t from "../../../Element/hooks/useElement.mjs";
3
- import { RootElement as n } from "../../../Element/RootElement.mjs";
4
- import r from "../../../dataSource/pathFields.mjs";
5
- import i from "./declaration.mjs";
1
+ import e from "./declaration.mjs";
2
+ import t from "../../../Element/hocs/withElement.mjs";
3
+ import n from "../../../Element/hooks/useElement.mjs";
4
+ import { RootElement as r } from "../../../Element/RootElement.mjs";
5
+ import i from "../../../dataSource/pathFields.mjs";
6
6
  import a from "../ModalContainer/useModalDialog.mjs";
7
7
  import { use as o, useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
8
8
  import f from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
@@ -13,8 +13,8 @@ import _ from "clsx";
13
13
  import v from "@plitzi/sdk-shared/dataSource/helpers/getSourceName";
14
14
  import y from "@plitzi/sdk-shared/dataSource/hooks/useRegisterSource";
15
15
  //#region src/elements/structure/DialogContainer/DialogContainer.tsx
16
- var b = ({ ref: e, className: b = "", children: x, headerLabel: S = "Dialog Header", acceptButtonLabel: C = "Accept", acceptButtonLabelLoading: w = "Loading...", rejectButtonLabel: T = "Cancel", autoHideAfterClick: E = !0 }) => {
17
- let { id: D, rootId: O, visible: k, setElementState: A, definition: { styleSelectors: j, label: M = "Dialog" }, elementState: N } = t(), P = v(i.sourceType, D), { settings: { previewMode: F }, contexts: { InteractionsContext: I } } = f(), { interactionsManager: L } = o(I), [R, z] = d({}), [B, V] = d(!1), H = u(null), U = `${O}_${D}_title`, W = s((e) => {
16
+ var b = ({ ref: t, className: b = "", children: x, headerLabel: S = "Dialog Header", acceptButtonLabel: C = "Accept", acceptButtonLabelLoading: w = "Loading...", rejectButtonLabel: T = "Cancel", autoHideAfterClick: E = !0 }) => {
17
+ let { id: D, rootId: O, visible: k, setElementState: A, definition: { styleSelectors: j, label: M = "Dialog" }, elementState: N } = n(), P = v(e.sourceType, D), { settings: { previewMode: F }, contexts: { InteractionsContext: I } } = f(), { interactionsManager: L } = o(I), [R, z] = d({}), [B, V] = d(!1), H = u(null), U = `${O}_${D}_title`, W = s((e) => {
18
18
  let { metadata: t } = e;
19
19
  if (t && typeof t == "object") z(t);
20
20
  else if (typeof t == "string") try {
@@ -72,12 +72,12 @@ var b = ({ ref: e, className: b = "", children: x, headerLabel: S = "Dialog Head
72
72
  A
73
73
  ]), Y = l(() => ({
74
74
  openDialog: {
75
- ...i.callbacks.openDialog,
75
+ ...e.callbacks.openDialog,
76
76
  title: `Open ${M}`,
77
77
  callback: W
78
78
  },
79
79
  closeDialog: {
80
- ...i.callbacks.closeDialog,
80
+ ...e.callbacks.closeDialog,
81
81
  title: `Close ${M}`,
82
82
  callback: G
83
83
  }
@@ -98,7 +98,7 @@ var b = ({ ref: e, className: b = "", children: x, headerLabel: S = "Dialog Head
98
98
  R,
99
99
  N.visibility
100
100
  ]);
101
- let X = s(() => r(R), [R]);
101
+ let X = s(() => i(R), [R]);
102
102
  y({
103
103
  id: D,
104
104
  source: P,
@@ -106,10 +106,10 @@ var b = ({ ref: e, className: b = "", children: x, headerLabel: S = "Dialog Head
106
106
  fields: X
107
107
  });
108
108
  let Z = l(() => P ? { runtime: { sources: { [P]: R } } } : m, [P, R]);
109
- return /* @__PURE__ */ g(n, {
110
- ref: e,
109
+ return /* @__PURE__ */ g(r, {
110
+ ref: t,
111
111
  className: _("plitzi-component__dialog-container", b),
112
- interactionTriggers: i.triggers,
112
+ interactionTriggers: e.triggers,
113
113
  interactionCallbacks: Y,
114
114
  children: [/* @__PURE__ */ h("div", {
115
115
  className: _("dialog-container__background", j.backgroundContainer),
@@ -175,6 +175,6 @@ var b = ({ ref: e, className: b = "", children: x, headerLabel: S = "Dialog Head
175
175
  ]
176
176
  })]
177
177
  });
178
- }, x = e(b);
178
+ }, x = t(b);
179
179
  //#endregion
180
180
  export { b as DialogContainer, x as default };
@@ -156,8 +156,7 @@ declare const declaration: {
156
156
  readonly top: "0";
157
157
  readonly position: "absolute";
158
158
  readonly 'z-index': "210";
159
- readonly 'background-color': "black";
160
- readonly opacity: "0.5";
159
+ readonly 'background-color': "rgb(0 0 0 / 50%)";
161
160
  };
162
161
  };
163
162
  readonly rootContainer: {