@plitzi/sdk-elements 0.38.23 → 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.
- package/CHANGELOG.md +180 -1
- package/dist/Element/RootElement.d.ts +1 -1
- package/dist/Element/RootElement.mjs +62 -61
- package/dist/Element/RowAnchor.d.ts +15 -0
- package/dist/Element/RowAnchor.mjs +8 -0
- package/dist/Element/helpers/elementConstants.mjs +12 -0
- package/dist/Element/hocs/withElement.d.ts +1 -1
- package/dist/Element/hocs/withElement.mjs +96 -88
- package/dist/Element/hooks/useEditableContent.d.ts +11 -0
- package/dist/Element/hooks/useEditableContent.mjs +11 -10
- package/dist/Element/hooks/useElement.mjs +1 -1
- package/dist/Element/hooks/useElementDataSource.mjs +11 -10
- package/dist/Element/hooks/useFocusInteractions.d.ts +12 -0
- package/dist/Element/hooks/useFocusInteractions.mjs +9 -0
- package/dist/Element/hooks/useInternalClassName.mjs +22 -21
- package/dist/Element/hooks/useRootElementInteractions.mjs +48 -42
- package/dist/Element/hooks/useScrollInteractions.d.ts +1 -1
- package/dist/Element/hooks/useScrollInteractions.mjs +61 -30
- package/dist/dataSource/PluginSource.d.ts +22 -0
- package/dist/dataSource/PluginSource.mjs +27 -0
- package/dist/dataSource/index.d.ts +2 -0
- package/dist/dataSource/index.mjs +5 -4
- package/dist/elements/advanced/BlockHtml/BlockHtml.d.ts +1 -1
- package/dist/elements/advanced/BlockHtml/index.d.ts +1 -1
- package/dist/elements/advanced/BlockJsx/BlockJsx.d.ts +1 -1
- package/dist/elements/advanced/BlockJsx/index.d.ts +1 -1
- package/dist/elements/advanced/Custom/Custom.d.ts +1 -1
- package/dist/elements/advanced/Custom/index.d.ts +1 -1
- package/dist/elements/advanced/NodeHtml/NodeHtml.d.ts +1 -1
- package/dist/elements/advanced/NodeHtml/declaration.d.ts +3 -3
- package/dist/elements/advanced/NodeHtml/index.d.ts +4 -4
- package/dist/elements/advanced/Reference/Reference.d.ts +2 -2
- package/dist/elements/advanced/Reference/Reference.mjs +1 -1
- package/dist/elements/advanced/Reference/index.d.ts +1 -1
- package/dist/elements/basic/Button/Button.d.ts +7 -2
- package/dist/elements/basic/Button/Button.mjs +27 -25
- package/dist/elements/basic/Button/Settings.mjs +1 -1
- package/dist/elements/basic/Button/declaration.d.ts +8 -1
- package/dist/elements/basic/Button/declaration.mjs +3 -0
- package/dist/elements/basic/Button/index.d.ts +9 -2
- package/dist/elements/basic/Dropdown/Dropdown.d.ts +9 -2
- package/dist/elements/basic/Dropdown/Dropdown.mjs +93 -74
- package/dist/elements/basic/Dropdown/DropdownPopup/DropdownPopup.d.ts +1 -1
- package/dist/elements/basic/Dropdown/DropdownPopup/index.d.ts +1 -1
- package/dist/elements/basic/Dropdown/declaration.d.ts +31 -0
- package/dist/elements/basic/Dropdown/declaration.mjs +38 -6
- package/dist/elements/basic/Dropdown/index.d.ts +33 -2
- package/dist/elements/basic/Dropdown/useDropdown.d.ts +2 -0
- package/dist/elements/basic/Heading/Heading.d.ts +1 -1
- package/dist/elements/basic/Heading/Heading.mjs +3 -2
- package/dist/elements/basic/Heading/declaration.d.ts +2 -0
- package/dist/elements/basic/Heading/declaration.mjs +2 -0
- package/dist/elements/basic/Heading/index.d.ts +3 -1
- package/dist/elements/basic/Link/Link.d.ts +1 -1
- package/dist/elements/basic/Link/Link.mjs +46 -45
- package/dist/elements/basic/Link/declaration.d.ts +1 -0
- package/dist/elements/basic/Link/declaration.mjs +5 -0
- package/dist/elements/basic/Link/index.d.ts +2 -1
- package/dist/elements/basic/Markdown/Markdown.d.ts +1 -1
- package/dist/elements/basic/Markdown/declaration.d.ts +2 -0
- package/dist/elements/basic/Markdown/declaration.mjs +2 -0
- package/dist/elements/basic/Markdown/index.d.ts +3 -1
- package/dist/elements/basic/Paragraph/Paragraph.d.ts +1 -1
- package/dist/elements/basic/Paragraph/Paragraph.mjs +3 -2
- package/dist/elements/basic/Paragraph/Settings.mjs +1 -1
- package/dist/elements/basic/Paragraph/declaration.d.ts +2 -0
- package/dist/elements/basic/Paragraph/declaration.mjs +2 -0
- package/dist/elements/basic/Paragraph/index.d.ts +3 -1
- package/dist/elements/basic/RichText/RichText.d.ts +1 -1
- package/dist/elements/basic/RichText/declaration.d.ts +1 -0
- package/dist/elements/basic/RichText/declaration.mjs +1 -0
- package/dist/elements/basic/RichText/index.d.ts +2 -1
- package/dist/elements/basic/Text/Settings.mjs +1 -1
- package/dist/elements/basic/Text/Text.d.ts +1 -1
- package/dist/elements/basic/Text/Text.mjs +3 -2
- package/dist/elements/basic/Text/declaration.d.ts +2 -0
- package/dist/elements/basic/Text/declaration.mjs +2 -0
- package/dist/elements/basic/Text/index.d.ts +3 -1
- package/dist/elements/basic/ThemeToggle/ThemeToggle.d.ts +2 -2
- package/dist/elements/basic/ThemeToggle/declaration.d.ts +1 -0
- package/dist/elements/basic/ThemeToggle/declaration.mjs +5 -0
- package/dist/elements/basic/ThemeToggle/index.d.ts +2 -1
- package/dist/elements/declarations/index.d.ts +322 -12
- package/dist/elements/declarations/index.mjs +46 -44
- package/dist/elements/form/Form/Form.d.ts +8 -2
- package/dist/elements/form/Form/Form.mjs +102 -79
- package/dist/elements/form/Form/declaration.d.ts +21 -3
- package/dist/elements/form/Form/declaration.mjs +28 -11
- package/dist/elements/form/Form/index.d.ts +17 -2
- package/dist/elements/form/FormControl/FormControl.d.ts +8 -2
- package/dist/elements/form/FormControl/FormControl.mjs +71 -66
- package/dist/elements/form/FormControl/Settings.d.ts +6 -1
- package/dist/elements/form/FormControl/Settings.mjs +130 -98
- package/dist/elements/form/FormControl/declaration.d.ts +7 -0
- package/dist/elements/form/FormControl/declaration.mjs +21 -1
- package/dist/elements/form/FormControl/helpers/useBlurValidation.d.ts +12 -0
- package/dist/elements/form/FormControl/helpers/useBlurValidation.mjs +20 -0
- package/dist/elements/form/FormControl/helpers/validateField.d.ts +8 -0
- package/dist/elements/form/FormControl/helpers/validateField.mjs +8 -2
- package/dist/elements/form/FormControl/hocs/withFieldValue.d.ts +4 -0
- package/dist/elements/form/FormControl/hocs/withFieldValue.mjs +49 -41
- package/dist/elements/form/FormControl/index.d.ts +8 -1
- package/dist/elements/form/FormControl/inputs/Checkbox.mjs +2 -2
- package/dist/elements/form/FormControl/inputs/Input.d.ts +5 -1
- package/dist/elements/form/FormControl/inputs/Input.mjs +42 -38
- package/dist/elements/form/FormControl/inputs/Select.d.ts +5 -1
- package/dist/elements/form/FormControl/inputs/Select.mjs +33 -28
- package/dist/elements/form/FormControl/inputs/Textarea.mjs +27 -26
- package/dist/elements/form/FormControl/inputs/useFocusWhenShown.d.ts +1 -1
- package/dist/elements/index.d.ts +3 -1
- package/dist/elements/index.mjs +32 -30
- package/dist/elements/internal/LayoutContainer/LayoutContainer.d.ts +1 -1
- package/dist/elements/internal/LayoutContainer/LayoutContainer.mjs +30 -30
- package/dist/elements/internal/LayoutContainer/index.d.ts +1 -1
- package/dist/elements/internal/LayoutContainer/mask.d.ts +13 -0
- package/dist/elements/internal/LayoutContainer/mask.mjs +16 -1
- package/dist/elements/internal/Loading/Loading.d.ts +1 -1
- package/dist/elements/internal/Loading/index.d.ts +1 -1
- package/dist/elements/internal/NotFound/NotFound.d.ts +1 -1
- package/dist/elements/internal/NotFound/index.d.ts +1 -1
- package/dist/elements/internal/Page/Page.d.ts +17 -3
- package/dist/elements/internal/Page/Page.mjs +32 -25
- package/dist/elements/internal/Page/PageHead.d.ts +11 -4
- package/dist/elements/internal/Page/PageHead.mjs +41 -19
- package/dist/elements/internal/Page/PageWithheld.d.ts +3 -2
- package/dist/elements/internal/Page/PageWithheld.mjs +41 -18
- package/dist/elements/internal/Page/Settings.d.ts +5 -1
- package/dist/elements/internal/Page/Settings.mjs +160 -121
- package/dist/elements/internal/Page/SharePreview.d.ts +13 -0
- package/dist/elements/internal/Page/SharePreview.mjs +53 -0
- package/dist/elements/internal/Page/declaration.d.ts +9 -1
- package/dist/elements/internal/Page/declaration.mjs +11 -4
- package/dist/elements/internal/Page/index.d.ts +9 -2
- package/dist/elements/media/Chart/Chart.d.ts +33 -0
- package/dist/elements/media/Chart/Chart.mjs +195 -0
- package/dist/elements/media/Chart/Settings.d.ts +6 -0
- package/dist/elements/media/Chart/Settings.mjs +92 -0
- package/dist/elements/media/Chart/chartGeometry.d.ts +37 -0
- package/dist/elements/media/Chart/chartGeometry.mjs +47 -0
- package/dist/elements/media/Chart/declaration.d.ts +144 -0
- package/dist/elements/media/Chart/declaration.mjs +107 -0
- package/dist/elements/media/Chart/index.d.ts +145 -0
- package/dist/elements/media/Chart/index.mjs +6 -0
- package/dist/elements/media/Embed/Embed.d.ts +1 -1
- package/dist/elements/media/Embed/Embed.mjs +25 -21
- package/dist/elements/media/Embed/declaration.d.ts +1 -0
- package/dist/elements/media/Embed/declaration.mjs +1 -0
- package/dist/elements/media/Embed/index.d.ts +2 -1
- package/dist/elements/media/FontAwesome/FontAwesome.d.ts +1 -1
- package/dist/elements/media/FontAwesome/index.d.ts +1 -1
- package/dist/elements/media/Image/Image.d.ts +1 -1
- package/dist/elements/media/Image/Image.mjs +35 -34
- package/dist/elements/media/Image/declaration.d.ts +2 -1
- package/dist/elements/media/Image/declaration.mjs +1 -0
- package/dist/elements/media/Image/index.d.ts +3 -2
- package/dist/elements/media/Svg/Svg.d.ts +1 -1
- package/dist/elements/media/Svg/declaration.d.ts +1 -0
- package/dist/elements/media/Svg/declaration.mjs +1 -0
- package/dist/elements/media/Svg/index.d.ts +2 -1
- package/dist/elements/media/Video/Video.d.ts +1 -1
- package/dist/elements/media/Video/declaration.d.ts +1 -0
- package/dist/elements/media/Video/declaration.mjs +1 -0
- package/dist/elements/media/Video/index.d.ts +2 -1
- package/dist/elements/provider/ApiContainer/ApiContainer.d.ts +1 -1
- package/dist/elements/provider/ApiContainer/ApiContainer.mjs +215 -185
- package/dist/elements/provider/ApiContainer/declaration.d.ts +9 -0
- package/dist/elements/provider/ApiContainer/declaration.mjs +10 -1
- package/dist/elements/provider/ApiContainer/hooks/useInputRefresh.d.ts +4 -4
- package/dist/elements/provider/ApiContainer/hooks/useProviderPagination.d.ts +2 -1
- package/dist/elements/provider/ApiContainer/index.d.ts +10 -1
- package/dist/elements/provider/Channel/Channel.d.ts +1 -1
- package/dist/elements/provider/Channel/declaration.d.ts +9 -0
- package/dist/elements/provider/Channel/declaration.mjs +11 -2
- package/dist/elements/provider/Channel/index.d.ts +10 -1
- package/dist/elements/settings.mjs +42 -40
- package/dist/elements/structure/Carousel/Carousel.d.ts +1 -1
- package/dist/elements/structure/Carousel/Carousel.mjs +147 -130
- package/dist/elements/structure/Carousel/CarouselContext.d.ts +3 -3
- package/dist/elements/structure/Carousel/CarouselTrack/CarouselTrack.d.ts +1 -1
- package/dist/elements/structure/Carousel/CarouselTrack/components/ScrollTrack/ScrollTrack.d.ts +6 -2
- package/dist/elements/structure/Carousel/CarouselTrack/components/ScrollTrack/ScrollTrack.mjs +32 -20
- package/dist/elements/structure/Carousel/CarouselTrack/index.d.ts +1 -1
- package/dist/elements/structure/Carousel/carouselIndex.d.ts +17 -0
- package/dist/elements/structure/Carousel/carouselIndex.mjs +17 -5
- package/dist/elements/structure/Carousel/declaration.d.ts +49 -2
- package/dist/elements/structure/Carousel/declaration.mjs +26 -4
- package/dist/elements/structure/Carousel/index.d.ts +51 -4
- package/dist/elements/structure/Container/Container.d.ts +5 -3
- package/dist/elements/structure/Container/Container.mjs +6 -5
- package/dist/elements/structure/Container/Settings.d.ts +4 -2
- package/dist/elements/structure/Container/Settings.mjs +19 -5
- package/dist/elements/structure/Container/declaration.d.ts +3 -2
- package/dist/elements/structure/Container/declaration.mjs +3 -1
- package/dist/elements/structure/Container/index.d.ts +4 -3
- package/dist/elements/structure/DialogContainer/DialogContainer.d.ts +1 -1
- package/dist/elements/structure/DialogContainer/declaration.d.ts +1 -0
- package/dist/elements/structure/DialogContainer/declaration.mjs +5 -0
- package/dist/elements/structure/DialogContainer/index.d.ts +2 -1
- package/dist/elements/structure/List/List.d.ts +1 -1
- package/dist/elements/structure/List/ListItem/ListItem.d.ts +1 -1
- package/dist/elements/structure/List/ListItem/index.d.ts +1 -1
- package/dist/elements/structure/List/declaration.d.ts +5 -0
- package/dist/elements/structure/List/declaration.mjs +5 -0
- package/dist/elements/structure/List/index.d.ts +7 -2
- package/dist/elements/structure/List/modes/ListControlled/ListControlled.mjs +1 -0
- package/dist/elements/structure/List/modes/ListControlled/ListControlledItem.d.ts +3 -1
- package/dist/elements/structure/List/modes/ListControlled/ListControlledItem.mjs +33 -25
- package/dist/elements/structure/ModalContainer/ModalContainer.d.ts +1 -1
- package/dist/elements/structure/ModalContainer/declaration.d.ts +2 -0
- package/dist/elements/structure/ModalContainer/declaration.mjs +2 -0
- package/dist/elements/structure/ModalContainer/index.d.ts +3 -1
- package/dist/elements/structure/Pagination/Pagination.d.ts +1 -1
- package/dist/elements/structure/Pagination/declaration.d.ts +1 -0
- package/dist/elements/structure/Pagination/declaration.mjs +5 -0
- package/dist/elements/structure/Pagination/index.d.ts +2 -1
- package/dist/elements/structure/TabContainer/TabContainer.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerBody/TabContainerBody.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerBody/index.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerHeader/TabContainerHeader.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerHeader/index.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerItem/TabContainerItem.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerItem/declaration.d.ts +6 -0
- package/dist/elements/structure/TabContainer/TabContainerItem/declaration.mjs +6 -0
- package/dist/elements/structure/TabContainer/TabContainerItem/index.d.ts +7 -1
- package/dist/elements/structure/TabContainer/index.d.ts +10 -4
- package/dist/index.d.ts +216 -51
- package/dist/index.mjs +39 -37
- package/package.json +8 -8
- package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.d.ts +0 -16
- package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.mjs +0 -4
|
@@ -3,19 +3,20 @@ import { use as t, useCallback as n, useMemo as r } from "react";
|
|
|
3
3
|
import { usePlitzi as i } from "@plitzi/sdk-shared/hooks";
|
|
4
4
|
import { BuilderContext as a } from "@plitzi/sdk-shared/builder/contexts";
|
|
5
5
|
//#region src/Element/hooks/useEditableContent.ts
|
|
6
|
-
var o = (e) => typeof e == "string" ? e : typeof e == "number" ? `${e}` : e == null ? "" : JSON.stringify(e), s = (
|
|
7
|
-
let { id:
|
|
6
|
+
var o = (e) => typeof e == "string" ? e : typeof e == "number" ? `${e}` : e == null ? "" : JSON.stringify(e), s = (e) => e ? { "data-plitzi-empty": "" } : {}, c = (c) => {
|
|
7
|
+
let { id: l } = e(), { settings: { previewMode: u } } = i(), d = t(a), f = r(() => o(c), [c]);
|
|
8
8
|
return {
|
|
9
|
-
previewMode:
|
|
10
|
-
text:
|
|
9
|
+
previewMode: u,
|
|
10
|
+
text: f,
|
|
11
11
|
handleChange: n((e) => {
|
|
12
|
-
|
|
12
|
+
u || d.updateElement(l, "content", e);
|
|
13
13
|
}, [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
])
|
|
14
|
+
d,
|
|
15
|
+
l,
|
|
16
|
+
u
|
|
17
|
+
]),
|
|
18
|
+
emptyMark: s(u === !0 && f === "")
|
|
18
19
|
};
|
|
19
20
|
};
|
|
20
21
|
//#endregion
|
|
21
|
-
export { o as contentText,
|
|
22
|
+
export { o as contentText, c as default, s as emptyMark };
|
|
@@ -3,7 +3,7 @@ import { use as t } from "react";
|
|
|
3
3
|
//#region src/Element/hooks/useElement.ts
|
|
4
4
|
var n = () => {
|
|
5
5
|
let n = t(e);
|
|
6
|
-
if (n === void 0) throw Error("Element data not found. Make sure the element is rendered under withElement.");
|
|
6
|
+
if (n === void 0) throw Error("Element data not found. Make sure the element is rendered under withElement — a plugin’s component is, inside a space: rendered alone (a test in Node), test what it works out in a .ts module beside it and what it draws in the browser (page play, page check, a Playwright spec).");
|
|
7
7
|
return n;
|
|
8
8
|
};
|
|
9
9
|
//#endregion
|
|
@@ -2,12 +2,13 @@ import { useMemo as e } from "react";
|
|
|
2
2
|
import { useCommonStore as t } from "@plitzi/sdk-shared/store";
|
|
3
3
|
import { isRecord as n } from "@plitzi/sdk-shared/helpers";
|
|
4
4
|
import { templatePaths as r } from "@plitzi/sdk-shared/helpers/twigWrapper";
|
|
5
|
+
import { whenPaths as i } from "@plitzi/sdk-shared/schema";
|
|
5
6
|
//#region src/Element/hooks/useElementDataSource.ts
|
|
6
|
-
var
|
|
7
|
-
let
|
|
8
|
-
for (let { action: e, params: n } of t ?? []) e === "twigTemplate" && typeof n.template == "string" && n.template &&
|
|
9
|
-
return n &&
|
|
10
|
-
},
|
|
7
|
+
var a = ({ source: e, transformers: t, when: n }) => {
|
|
8
|
+
let a = e ? [e] : [];
|
|
9
|
+
for (let { action: e, params: n } of t ?? []) e === "twigTemplate" && typeof n.template == "string" && n.template && a.push(...r(n.template).filter((e) => e !== "source" && !e.startsWith("source.")));
|
|
10
|
+
return n && a.push(...i(n)), a;
|
|
11
|
+
}, o = (e) => {
|
|
11
12
|
let t = [];
|
|
12
13
|
for (let n of [...new Set(e)].filter(Boolean).sort((e, t) => e.length - t.length)) t.some((e) => n.startsWith(`${e}.`)) || t.push(n);
|
|
13
14
|
return t;
|
|
@@ -19,17 +20,17 @@ var i = ({ source: e, transformers: t, when: n }) => {
|
|
|
19
20
|
}
|
|
20
21
|
a[i[i.length - 1]] = r;
|
|
21
22
|
}, c = ({ bindings: n, sources: r }) => {
|
|
22
|
-
let
|
|
23
|
+
let i = e(() => {
|
|
23
24
|
let e = new Set(r ?? []);
|
|
24
|
-
for (let t of Object.values(n ?? {})) if (Array.isArray(t)) for (let n of t) for (let t of
|
|
25
|
+
for (let t of Object.values(n ?? {})) if (Array.isArray(t)) for (let n of t) for (let t of a(n)) e.add(t);
|
|
25
26
|
return e.size > 0 && e.add("variables"), o(e);
|
|
26
|
-
}, [n, r]), c = e(() =>
|
|
27
|
+
}, [n, r]), c = e(() => i.map((e) => `runtime.sources.${e}`), [i]), [l] = t(c);
|
|
27
28
|
return e(() => {
|
|
28
29
|
let e = {};
|
|
29
|
-
return
|
|
30
|
+
return i.forEach((t, n) => {
|
|
30
31
|
l[n] !== void 0 && s(e, t, l[n]);
|
|
31
32
|
}), e;
|
|
32
|
-
}, [
|
|
33
|
+
}, [i, l]);
|
|
33
34
|
};
|
|
34
35
|
//#endregion
|
|
35
36
|
export { c as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InteractionCallback } from '@plitzi/sdk-shared';
|
|
2
|
+
import { RefObject } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* The element's `focus` step: the node itself when it takes focus, else the first of its descendants that does — a
|
|
5
|
+
* form control's input sits inside its wrapper. Read when the step runs, so a node rendered after the flow is wired is
|
|
6
|
+
* the one focused.
|
|
7
|
+
*/
|
|
8
|
+
declare const useFocusInteractions: ({ label, nodeRef }: {
|
|
9
|
+
label: string;
|
|
10
|
+
nodeRef: RefObject<HTMLElement | null>;
|
|
11
|
+
}) => Record<string, InteractionCallback>;
|
|
12
|
+
export default useFocusInteractions;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useMemo as e } from "react";
|
|
2
|
+
import { FOCUS_CALLBACKS as t, toInteractionCallbacks as n } from "@plitzi/sdk-shared/authoring";
|
|
3
|
+
//#region src/Element/hooks/useFocusInteractions.ts
|
|
4
|
+
var r = "input:not([disabled]):not([type=\"hidden\"]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), a[href], [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]", i = ({ label: i, nodeRef: a }) => e(() => n(t, { focus: () => {
|
|
5
|
+
let e = a.current;
|
|
6
|
+
((e?.matches(r) ? e : e?.querySelector(r)) ?? e)?.focus();
|
|
7
|
+
} }, { focus: { title: `Focus ${i}` } }), [i, a]);
|
|
8
|
+
//#endregion
|
|
9
|
+
export { i as default };
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { isVisible as e } from "../helpers/isVisible.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import n from "
|
|
4
|
-
import
|
|
2
|
+
import { useLayoutBody as t } from "../LayoutBody.mjs";
|
|
3
|
+
import { useMemo as n } from "react";
|
|
4
|
+
import r from "clsx";
|
|
5
|
+
import { HIDDEN_CLASS as i } from "@plitzi/sdk-shared/style";
|
|
5
6
|
//#region src/Element/hooks/useInternalClassName.ts
|
|
6
|
-
var
|
|
7
|
-
let { items:
|
|
8
|
-
return
|
|
9
|
-
[
|
|
10
|
-
"plitzi-component": !
|
|
11
|
-
"plitzi-component--layout": !
|
|
12
|
-
with__container: !
|
|
13
|
-
"container--empty": !
|
|
14
|
-
"container--base-element": !
|
|
15
|
-
"plitzi-component--layout-body":
|
|
16
|
-
},
|
|
17
|
-
a,
|
|
18
|
-
f,
|
|
7
|
+
var a = ({ id: a, className: o, previewMode: s, baseElementId: c, plitziElementLayout: l, definition: u, elementState: d }) => {
|
|
8
|
+
let { items: f } = u, p = l?.type === "component" && l.slots.includes(a), m = t(p ? a : void 0), h = p && s === !0 && (f ?? []).length === 0 && m === null, g = e(d.visibility) && !h;
|
|
9
|
+
return n(() => r(o, {
|
|
10
|
+
[i]: !g,
|
|
11
|
+
"plitzi-component": !s && !l,
|
|
12
|
+
"plitzi-component--layout": !s && !!l,
|
|
13
|
+
with__container: !s && !!f,
|
|
14
|
+
"container--empty": !s && !!f && f.length === 0 && !l,
|
|
15
|
+
"container--base-element": !s && !!f && c === a,
|
|
16
|
+
"plitzi-component--layout-body": l?.slots.includes(a)
|
|
17
|
+
}, u.styleSelectors.base), [
|
|
19
18
|
o,
|
|
20
|
-
|
|
21
|
-
d,
|
|
19
|
+
g,
|
|
22
20
|
s,
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
l,
|
|
22
|
+
f,
|
|
23
|
+
c,
|
|
24
|
+
a,
|
|
25
|
+
u.styleSelectors.base
|
|
25
26
|
]);
|
|
26
27
|
};
|
|
27
28
|
//#endregion
|
|
28
|
-
export {
|
|
29
|
+
export { a as default };
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { interactionBasicTriggers as e, nativeEventsList as t } from "../helpers/elementConstants.mjs";
|
|
2
2
|
import n from "./useElementInteractions.mjs";
|
|
3
|
-
import r from "./
|
|
4
|
-
import i from "./
|
|
5
|
-
import a from "./
|
|
6
|
-
import o from "./
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import y from "
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
3
|
+
import r from "./useFocusInteractions.mjs";
|
|
4
|
+
import i from "./useInternalClassName.mjs";
|
|
5
|
+
import a from "./useIntervalTriggers.mjs";
|
|
6
|
+
import o from "./useKeyTriggers.mjs";
|
|
7
|
+
import s from "./useScrollInteractions.mjs";
|
|
8
|
+
import { use as c, useCallback as l, useContext as u, useEffect as d, useEffectEvent as f, useMemo as p, useRef as m } from "react";
|
|
9
|
+
import { emptyObject as h, isRecord as g } from "@plitzi/sdk-shared/helpers";
|
|
10
|
+
import { get as _ } from "@plitzi/plitzi-ui/helpers";
|
|
11
|
+
import { liveSources as v } from "@plitzi/sdk-shared/dataSource";
|
|
12
|
+
import { StoreContext as y } from "@plitzi/nexus/react";
|
|
13
|
+
import b from "clsx";
|
|
14
|
+
import { InteractionsContext as x } from "@plitzi/sdk-interactions";
|
|
15
|
+
import { pConsole as S } from "@plitzi/sdk-shared/devTools";
|
|
15
16
|
//#region src/Element/hooks/useRootElementInteractions.ts
|
|
16
|
-
var
|
|
17
|
-
let { id: N, className: P, attributes: F, definition: I, definition: { interactions: L }, plitziElementLayout: R, elementState: z, setElementState: B } =
|
|
17
|
+
var C = /* @__PURE__ */ new WeakSet(), w = (e) => "nativeEvent" in e && g(e.nativeEvent) ? e.nativeEvent : e, T = ({ elementContext: T, previewMode: E, debugMode: D, baseElementId: O, className: ee, interactionTriggers: k, interactionCallbacks: A, otherProps: j, ref: M }) => {
|
|
18
|
+
let { id: N, className: P, attributes: F, definition: I, definition: { interactions: L }, plitziElementLayout: R, elementState: z, setElementState: B } = T, { interactionsManager: V, useInteractions: H } = c(x), U = l((e, t, n, r, i = !1) => {
|
|
18
19
|
i || e.preventDefault(), r && r(e);
|
|
19
|
-
let a =
|
|
20
|
-
|
|
21
|
-
}, [V]), W =
|
|
22
|
-
let n =
|
|
20
|
+
let a = w(e);
|
|
21
|
+
C.has(a) || (i || C.add(a), V.interactionTrigger(t, n, { event: e }));
|
|
22
|
+
}, [V]), W = p(() => !E || !L ? {} : Object.values(L).filter((e) => e.type === "trigger" && e.action && t.includes(e.action) && e.enabled).reduce((e, t) => {
|
|
23
|
+
let n = _(t, "params.propagateEvent", !1);
|
|
23
24
|
return {
|
|
24
25
|
...e,
|
|
25
26
|
[t.action]: (e) => U(e, N, t.action, j[t.action], n)
|
|
@@ -28,53 +29,58 @@ var S = /* @__PURE__ */ new WeakSet(), C = (e) => "nativeEvent" in e && h(e.nati
|
|
|
28
29
|
N,
|
|
29
30
|
L,
|
|
30
31
|
j,
|
|
31
|
-
|
|
32
|
+
E,
|
|
32
33
|
U
|
|
33
|
-
]), G =
|
|
34
|
+
]), G = u(y), K = l(() => {
|
|
34
35
|
let e = G?.getPath("runtime.sources");
|
|
35
|
-
return
|
|
36
|
-
}, [G]), q =
|
|
36
|
+
return v(g(e) ? e : h, G?.getPath("runtime.state"), G?.getPath("schema.settings.computed"));
|
|
37
|
+
}, [G]), q = l(() => ({ dataSource: K() }), [K]), J = p(() => ({
|
|
37
38
|
...e,
|
|
38
39
|
...k
|
|
39
|
-
}), [k]), Y =
|
|
40
|
+
}), [k]), Y = m(null), X = M ?? Y, Z = n({
|
|
40
41
|
attributes: F,
|
|
41
42
|
definition: I,
|
|
42
43
|
setElementState: B
|
|
43
|
-
}), Q =
|
|
44
|
+
}), Q = s({
|
|
44
45
|
id: N,
|
|
45
46
|
label: I.label,
|
|
46
47
|
nodeRef: X,
|
|
47
48
|
interactions: L,
|
|
48
|
-
previewMode:
|
|
49
|
+
previewMode: E,
|
|
49
50
|
interactionsManager: V
|
|
51
|
+
}), $ = r({
|
|
52
|
+
label: I.label,
|
|
53
|
+
nodeRef: X
|
|
50
54
|
});
|
|
51
55
|
H({
|
|
52
56
|
id: N,
|
|
53
57
|
interactions: L,
|
|
54
58
|
triggers: J,
|
|
55
|
-
callbacks:
|
|
59
|
+
callbacks: p(() => ({
|
|
56
60
|
...A,
|
|
57
61
|
...Q,
|
|
62
|
+
...$,
|
|
58
63
|
...Z
|
|
59
64
|
}), [
|
|
60
65
|
A,
|
|
61
66
|
Q,
|
|
67
|
+
$,
|
|
62
68
|
Z
|
|
63
69
|
]),
|
|
64
70
|
getAdditionalParams: q
|
|
65
|
-
}),
|
|
71
|
+
}), o({
|
|
66
72
|
id: N,
|
|
67
73
|
interactions: L,
|
|
68
|
-
previewMode:
|
|
74
|
+
previewMode: E,
|
|
69
75
|
interactionsManager: V
|
|
70
|
-
}),
|
|
76
|
+
}), a({
|
|
71
77
|
id: N,
|
|
72
78
|
interactions: L,
|
|
73
|
-
previewMode:
|
|
79
|
+
previewMode: E,
|
|
74
80
|
interactionsManager: V
|
|
75
81
|
});
|
|
76
|
-
let
|
|
77
|
-
if (!
|
|
82
|
+
let te = f(() => {
|
|
83
|
+
if (!E || !L || !Object.keys(L).length) return;
|
|
78
84
|
let e = !1;
|
|
79
85
|
return queueMicrotask(() => {
|
|
80
86
|
e || V.interactionTrigger(N, "onLoad", {});
|
|
@@ -82,29 +88,29 @@ var S = /* @__PURE__ */ new WeakSet(), C = (e) => "nativeEvent" in e && h(e.nati
|
|
|
82
88
|
e = !0;
|
|
83
89
|
};
|
|
84
90
|
});
|
|
85
|
-
|
|
86
|
-
if (
|
|
87
|
-
|
|
91
|
+
d(() => te(), []), d(() => {
|
|
92
|
+
if (D) return S.addProviderMethod(`getElementDataSource-${N}`, K), () => {
|
|
93
|
+
S.removeProviderMethod(`getElementDataSource-${N}`);
|
|
88
94
|
};
|
|
89
95
|
}, [
|
|
90
|
-
|
|
96
|
+
D,
|
|
91
97
|
K,
|
|
92
98
|
N
|
|
93
99
|
]);
|
|
94
|
-
let
|
|
100
|
+
let ne = i({
|
|
95
101
|
id: N,
|
|
96
|
-
className:
|
|
97
|
-
previewMode:
|
|
98
|
-
baseElementId:
|
|
102
|
+
className: ee,
|
|
103
|
+
previewMode: E,
|
|
104
|
+
baseElementId: O,
|
|
99
105
|
definition: I,
|
|
100
106
|
elementState: z,
|
|
101
107
|
plitziElementLayout: R
|
|
102
108
|
});
|
|
103
109
|
return {
|
|
104
|
-
className:
|
|
110
|
+
className: b(P, ne),
|
|
105
111
|
events: W,
|
|
106
112
|
nodeRef: X
|
|
107
113
|
};
|
|
108
114
|
};
|
|
109
115
|
//#endregion
|
|
110
|
-
export {
|
|
116
|
+
export { T as default };
|
|
@@ -9,7 +9,7 @@ export type UseScrollInteractionsProps = {
|
|
|
9
9
|
interactionsManager: InteractionsManagerApi;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* The element's scroll steps, and its `
|
|
12
|
+
* The element's scroll steps, its `onScroll` trigger, and its `onView` trigger.
|
|
13
13
|
*
|
|
14
14
|
* The steps move the element's own box — a row of cards with `overflow: auto` — or, `scrollIntoView`, the page to it;
|
|
15
15
|
* the node is read when a step runs, so one rendered after the flow was wired is still the one moved. `onScroll` fires
|
|
@@ -1,44 +1,49 @@
|
|
|
1
1
|
import { useEffect as e, useMemo as t } from "react";
|
|
2
|
-
import { SCROLL_BEHAVIORS as n, SCROLL_POSITIONS as r, SCROLL_TRIGGER as i,
|
|
3
|
-
import { SCROLL_CALLBACKS as
|
|
2
|
+
import { SCROLL_BEHAVIORS as n, SCROLL_POSITIONS as r, SCROLL_TRIGGER as i, VIEW_TRIGGER as a, scrollDistance as o, scrollPosition as s, scrollState as c } from "@plitzi/sdk-shared/helpers";
|
|
3
|
+
import { SCROLL_CALLBACKS as l, toInteractionCallbacks as u } from "@plitzi/sdk-shared/authoring";
|
|
4
4
|
//#region src/Element/hooks/useScrollInteractions.ts
|
|
5
|
-
var
|
|
6
|
-
let
|
|
5
|
+
var d = (e) => n.find((t) => t === e) ?? "smooth", f = (e, t) => r.find((t) => t === e) ?? t, p = 20, m = async (e) => {
|
|
6
|
+
if (typeof window < "u") for (let t = 0; t < p; t += 1) {
|
|
7
|
+
if (e.scrollHeight > e.clientHeight || e.scrollWidth > e.clientWidth) return;
|
|
8
|
+
await new Promise((e) => window.requestAnimationFrame(e));
|
|
9
|
+
}
|
|
10
|
+
}, h = ({ id: n, label: r, nodeRef: p, interactions: h, previewMode: g, interactionsManager: _ }) => {
|
|
11
|
+
let v = t(() => u(l, {
|
|
7
12
|
scrollBy: (e) => {
|
|
8
|
-
let t =
|
|
13
|
+
let t = p.current;
|
|
9
14
|
t?.scrollBy({
|
|
10
|
-
left:
|
|
11
|
-
top:
|
|
12
|
-
behavior:
|
|
15
|
+
left: o(e.x, t.clientWidth) ?? 0,
|
|
16
|
+
top: o(e.y, t.clientHeight) ?? 0,
|
|
17
|
+
behavior: d(e.behavior)
|
|
13
18
|
});
|
|
14
19
|
},
|
|
15
|
-
scrollTo: (e) => {
|
|
16
|
-
let t =
|
|
17
|
-
t && t.scrollTo({
|
|
18
|
-
left:
|
|
19
|
-
top:
|
|
20
|
-
behavior:
|
|
21
|
-
});
|
|
20
|
+
scrollTo: async (e) => {
|
|
21
|
+
let t = p.current;
|
|
22
|
+
t && (await m(t), t.scrollTo({
|
|
23
|
+
left: s(e.x, t.scrollWidth, t.clientWidth) ?? t.scrollLeft,
|
|
24
|
+
top: s(e.y, t.scrollHeight, t.clientHeight) ?? t.scrollTop,
|
|
25
|
+
behavior: d(e.behavior)
|
|
26
|
+
}));
|
|
22
27
|
},
|
|
23
28
|
scrollIntoView: (e) => {
|
|
24
|
-
|
|
25
|
-
block:
|
|
26
|
-
inline:
|
|
27
|
-
behavior:
|
|
29
|
+
p.current?.scrollIntoView({
|
|
30
|
+
block: f(e.block, "start"),
|
|
31
|
+
inline: f(e.inline, "nearest"),
|
|
32
|
+
behavior: d(e.behavior)
|
|
28
33
|
});
|
|
29
34
|
}
|
|
30
35
|
}, {
|
|
31
36
|
scrollBy: { title: `Scroll ${r} by` },
|
|
32
37
|
scrollTo: { title: `Scroll ${r} to` },
|
|
33
38
|
scrollIntoView: { title: `Scroll to ${r}` }
|
|
34
|
-
}), [r,
|
|
35
|
-
|
|
36
|
-
let e =
|
|
37
|
-
if (!
|
|
39
|
+
}), [r, p]), y = t(() => Object.values(h ?? {}).some((e) => e.type === "trigger" && e.action === i && e.enabled), [h]);
|
|
40
|
+
e(() => {
|
|
41
|
+
let e = p.current;
|
|
42
|
+
if (!g || !y || !e || typeof window > "u") return;
|
|
38
43
|
let t = 0, r = () => {
|
|
39
44
|
t = 0;
|
|
40
|
-
let r =
|
|
41
|
-
|
|
45
|
+
let r = c(e);
|
|
46
|
+
_.interactionTrigger(n, i, r);
|
|
42
47
|
}, a = () => {
|
|
43
48
|
t === 0 && (t = window.requestAnimationFrame(r));
|
|
44
49
|
};
|
|
@@ -47,11 +52,37 @@ var u = (e) => n.find((t) => t === e) ?? "smooth", d = (e, t) => r.find((t) => t
|
|
|
47
52
|
};
|
|
48
53
|
}, [
|
|
49
54
|
n,
|
|
50
|
-
h,
|
|
51
55
|
_,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
y,
|
|
57
|
+
p,
|
|
58
|
+
g
|
|
59
|
+
]);
|
|
60
|
+
let b = t(() => {
|
|
61
|
+
let e = Object.values(h ?? {}).find((e) => e.type === "trigger" && e.action === a && e.enabled);
|
|
62
|
+
if (!e) return;
|
|
63
|
+
let t = Number(e.params?.margin ?? 0);
|
|
64
|
+
return Number.isFinite(t) ? t : 0;
|
|
65
|
+
}, [h]);
|
|
66
|
+
return e(() => {
|
|
67
|
+
let e = p.current;
|
|
68
|
+
if (!g || b === void 0 || !e || typeof window > "u" || typeof IntersectionObserver > "u") return;
|
|
69
|
+
let t, r = new IntersectionObserver((e) => {
|
|
70
|
+
let r = e.some((e) => e.isIntersecting);
|
|
71
|
+
if (r === t) return;
|
|
72
|
+
t = r;
|
|
73
|
+
let i = { inView: r };
|
|
74
|
+
_.interactionTrigger(n, a, i);
|
|
75
|
+
}, { rootMargin: `${String(b)}px` });
|
|
76
|
+
return r.observe(e), () => {
|
|
77
|
+
r.disconnect();
|
|
78
|
+
};
|
|
79
|
+
}, [
|
|
80
|
+
n,
|
|
81
|
+
_,
|
|
82
|
+
p,
|
|
83
|
+
g,
|
|
84
|
+
b
|
|
85
|
+
]), v;
|
|
55
86
|
};
|
|
56
87
|
//#endregion
|
|
57
|
-
export {
|
|
88
|
+
export { h as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** What `PluginSource` reads of a declaration: the name its source is published under, which authoring checks too. */
|
|
3
|
+
export type PluginSourceDeclaration = {
|
|
4
|
+
type: string;
|
|
5
|
+
sourceType: string;
|
|
6
|
+
};
|
|
7
|
+
export type PluginSourceProps<Data extends Record<string, unknown>> = {
|
|
8
|
+
declaration: PluginSourceDeclaration;
|
|
9
|
+
/** What the elements inside it bind to: `{{ <sourceType>_<id>.<field> }}`. */
|
|
10
|
+
data: Data;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A plugin's own data source, for the elements put inside it: a player's track and whether it plays, read by the
|
|
15
|
+
* space's own buttons and text — what a list, a form or a carousel publishes, under the name its declaration's
|
|
16
|
+
* `sourceType` gives, so `plitzi explain` and the binding checks know it. A run's player had none, and kept its state
|
|
17
|
+
* in `runtime.state` for every page to see instead.
|
|
18
|
+
*
|
|
19
|
+
* Only what is inside it reads it: a source is the elements' scope, not the page's.
|
|
20
|
+
*/
|
|
21
|
+
declare const PluginSource: <Data extends Record<string, unknown>>({ declaration, data, children }: PluginSourceProps<Data>) => import('react').JSX.Element;
|
|
22
|
+
export default PluginSource;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import e from "../Element/hooks/useElement.mjs";
|
|
2
|
+
import t from "./useRegisterSource.mjs";
|
|
3
|
+
import n from "./pathFields.mjs";
|
|
4
|
+
import r from "./sourceStore.mjs";
|
|
5
|
+
import { useCallback as i, useMemo as a } from "react";
|
|
6
|
+
import { StoreProvider as o } from "@plitzi/nexus/react";
|
|
7
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
8
|
+
import { getSourceName as c } from "@plitzi/sdk-shared/dataSource/helpers";
|
|
9
|
+
//#region src/dataSource/PluginSource.tsx
|
|
10
|
+
var l = ({ declaration: l, data: u, children: d }) => {
|
|
11
|
+
let { id: f, definition: { label: p = "" } } = e(), m = c(l.sourceType, f), h = i(() => n(u), [u]);
|
|
12
|
+
t({
|
|
13
|
+
id: f,
|
|
14
|
+
source: m,
|
|
15
|
+
name: p || `${l.type} - ${f}`,
|
|
16
|
+
fields: h
|
|
17
|
+
});
|
|
18
|
+
let g = a(() => r(m, u), [m, u]);
|
|
19
|
+
return /* @__PURE__ */ s(o, {
|
|
20
|
+
inherit: "live",
|
|
21
|
+
name: `${l.type}:${f}`,
|
|
22
|
+
value: g,
|
|
23
|
+
children: d
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { l as default };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { default as GlobalSources } from './GlobalSources';
|
|
2
2
|
export { default as getSourcesByElementId } from './getSourcesByElementId';
|
|
3
3
|
export { default as useFlag } from './useFlag';
|
|
4
|
+
export { default as PluginSource } from './PluginSource';
|
|
5
|
+
export type { PluginSourceDeclaration, PluginSourceProps } from './PluginSource';
|
|
4
6
|
export { default as useRegisterSource } from './useRegisterSource';
|
|
5
7
|
export { default as useResolvedVariables } from './useResolvedVariables';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import e from "./useRegisterSource.mjs";
|
|
2
2
|
import t from "./useFlag.mjs";
|
|
3
|
-
import n from "./
|
|
4
|
-
import r from "./
|
|
5
|
-
import i from "./
|
|
6
|
-
|
|
3
|
+
import n from "./PluginSource.mjs";
|
|
4
|
+
import r from "./useResolvedVariables.mjs";
|
|
5
|
+
import i from "./GlobalSources.mjs";
|
|
6
|
+
import a from "./getSourcesByElementId.mjs";
|
|
7
|
+
export { i as GlobalSources, n as PluginSource, a as getSourcesByElementId, t as useFlag, e as useRegisterSource, r as useResolvedVariables };
|
|
@@ -6,7 +6,7 @@ export type BlockHtmlProps = {
|
|
|
6
6
|
};
|
|
7
7
|
declare const BlockHtml: ({ ref, content, className }: BlockHtmlProps) => import('react').JSX.Element;
|
|
8
8
|
declare const _default: {
|
|
9
|
-
(props: import('../../..').WithElementProps<BlockHtmlProps>): import('react').JSX.Element;
|
|
9
|
+
(props: import('../../..').WithElementProps<BlockHtmlProps>): 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;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const BlockHtml: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./BlockHtml').BlockHtmlProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./BlockHtml').BlockHtmlProps>): 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: "blockHtml";
|
|
@@ -7,7 +7,7 @@ export type BlockJsxProps = {
|
|
|
7
7
|
};
|
|
8
8
|
declare const BlockJsx: ({ ref, className, props: componentProps, contentCache, ...otherProps }: BlockJsxProps) => import('react').JSX.Element;
|
|
9
9
|
declare const _default: {
|
|
10
|
-
(props: import('../../..').WithElementProps<BlockJsxProps>): import('react').JSX.Element;
|
|
10
|
+
(props: import('../../..').WithElementProps<BlockJsxProps>): 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;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const BlockJsx: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./BlockJsx').BlockJsxProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./BlockJsx').BlockJsxProps>): 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: "blockJsx";
|
|
@@ -10,7 +10,7 @@ export type CustomProps = {
|
|
|
10
10
|
};
|
|
11
11
|
declare const Custom: ({ ref, className, renderType, settings, isPlugin, assets, scriptUrl }: CustomProps) => import('react').JSX.Element;
|
|
12
12
|
declare const _default: {
|
|
13
|
-
(props: import('../../..').WithElementProps<CustomProps>): import('react').JSX.Element;
|
|
13
|
+
(props: import('../../..').WithElementProps<CustomProps>): 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;
|
|
14
14
|
displayName: string;
|
|
15
15
|
};
|
|
16
16
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const Custom: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./Custom').CustomProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./Custom').CustomProps>): 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: "custom";
|
|
@@ -7,7 +7,7 @@ export type NodeHtmlProps<T extends keyof JSX.IntrinsicElements = 'span'> = {
|
|
|
7
7
|
} & Omit<HTMLAttributes<T>, 'class'>;
|
|
8
8
|
declare const NodeHtml: ({ ref, className, subType, children, ...otherProps }: NodeHtmlProps) => JSX.Element;
|
|
9
9
|
declare const _default: {
|
|
10
|
-
(props: import('../../..').WithElementProps<NodeHtmlProps<"span">>): JSX.Element;
|
|
10
|
+
(props: import('../../..').WithElementProps<NodeHtmlProps<"span">>): 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> | JSX.Element | null | undefined;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
export default _default;
|
|
@@ -49,9 +49,11 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
49
49
|
content?: string | undefined | undefined;
|
|
50
50
|
style?: import('react').CSSProperties | undefined;
|
|
51
51
|
color?: string | undefined | undefined;
|
|
52
|
-
slot?: string | undefined | undefined;
|
|
53
52
|
title?: string | undefined | undefined;
|
|
53
|
+
property?: string | undefined | undefined;
|
|
54
|
+
slot?: string | undefined | undefined;
|
|
54
55
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
56
|
+
dir?: string | undefined | undefined;
|
|
55
57
|
hidden?: boolean | undefined | undefined;
|
|
56
58
|
onScroll?: import('react').UIEventHandler<"span"> | undefined;
|
|
57
59
|
onLoad?: import('react').ReactEventHandler<"span"> | undefined;
|
|
@@ -290,7 +292,6 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
290
292
|
autoFocus?: boolean | undefined | undefined;
|
|
291
293
|
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
292
294
|
contextMenu?: string | undefined | undefined;
|
|
293
|
-
dir?: string | undefined | undefined;
|
|
294
295
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
295
296
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
296
297
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
@@ -300,7 +301,6 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
300
301
|
datatype?: string | undefined | undefined;
|
|
301
302
|
inlist?: any;
|
|
302
303
|
prefix?: string | undefined | undefined;
|
|
303
|
-
property?: string | undefined | undefined;
|
|
304
304
|
rel?: string | undefined | undefined;
|
|
305
305
|
resource?: string | undefined | undefined;
|
|
306
306
|
rev?: string | undefined | undefined;
|