@plitzi/sdk-elements 0.39.12 → 0.39.14
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 +28 -0
- package/dist/Element/PluginManager.mjs +13 -13
- package/dist/Element/hooks/useElementState.d.ts +1 -1
- package/dist/Element/hooks/useFullscreenInteractions.d.ts +11 -0
- package/dist/Element/hooks/useFullscreenInteractions.mjs +14 -0
- package/dist/Element/hooks/useRootElementInteractions.mjs +93 -87
- package/dist/builder/ruleFields.d.ts +1 -1
- package/dist/builder/ruleFields.mjs +5 -0
- package/dist/dataSource/GlobalSources.mjs +121 -104
- package/dist/dataSource/useAudienceScope.mjs +2 -1
- package/dist/dataSource/usePageClock.d.ts +12 -0
- package/dist/dataSource/usePageClock.mjs +19 -0
- package/dist/elements/basic/Countdown/Countdown.d.ts +23 -0
- package/dist/elements/basic/Countdown/Countdown.mjs +58 -0
- package/dist/elements/basic/Countdown/Settings.d.ts +12 -0
- package/dist/elements/basic/Countdown/Settings.mjs +94 -0
- package/dist/elements/basic/Countdown/declaration.d.ts +72 -0
- package/dist/elements/basic/Countdown/declaration.mjs +58 -0
- package/dist/elements/basic/Countdown/index.d.ts +69 -0
- package/dist/elements/basic/Countdown/index.mjs +5 -0
- package/dist/elements/declarations/index.d.ts +508 -7
- package/dist/elements/declarations/index.mjs +84 -72
- package/dist/elements/index.d.ts +13 -3
- package/dist/elements/index.mjs +76 -66
- package/dist/elements/media/Image/Image.d.ts +6 -1
- package/dist/elements/media/Image/Image.mjs +44 -35
- package/dist/elements/media/Image/Settings.d.ts +2 -1
- package/dist/elements/media/Image/Settings.mjs +26 -19
- package/dist/elements/media/Image/declaration.d.ts +2 -0
- package/dist/elements/media/Image/declaration.mjs +2 -1
- package/dist/elements/media/Image/index.d.ts +2 -0
- package/dist/elements/settings.mjs +92 -80
- package/dist/elements/structure/Container/Container.d.ts +2 -4
- package/dist/elements/structure/Container/Container.mjs +5 -6
- package/dist/elements/structure/Container/Settings.d.ts +1 -2
- package/dist/elements/structure/Container/Settings.mjs +5 -19
- package/dist/elements/structure/Container/declaration.d.ts +1 -2
- package/dist/elements/structure/Container/declaration.mjs +1 -3
- package/dist/elements/structure/Container/index.d.ts +1 -2
- package/dist/elements/structure/Disclosure/Disclosure.d.ts +26 -0
- package/dist/elements/structure/Disclosure/Disclosure.mjs +49 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/DisclosureSummary.d.ts +16 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/DisclosureSummary.mjs +19 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/Settings.d.ts +7 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/Settings.mjs +20 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/declaration.d.ts +59 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/declaration.mjs +47 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/index.d.ts +57 -0
- package/dist/elements/structure/Disclosure/DisclosureSummary/index.mjs +5 -0
- package/dist/elements/structure/Disclosure/Settings.d.ts +10 -0
- package/dist/elements/structure/Disclosure/Settings.mjs +47 -0
- package/dist/elements/structure/Disclosure/declaration.d.ts +66 -0
- package/dist/elements/structure/Disclosure/declaration.mjs +55 -0
- package/dist/elements/structure/Disclosure/index.d.ts +121 -0
- package/dist/elements/structure/Disclosure/index.mjs +9 -0
- package/dist/elements/structure/Disclosure/useDetails.d.ts +27 -0
- package/dist/elements/structure/Disclosure/useDetails.mjs +49 -0
- package/dist/elements/structure/TimeWindow/TimeWindow.mjs +29 -25
- package/dist/elements/structure/TimeWindow/TimeWindowContext.d.ts +6 -0
- package/dist/elements/structure/TimeWindow/TimeWindowContext.mjs +4 -0
- package/dist/elements/{testing → structure}/Variants/Settings.mjs +1 -1
- package/dist/elements/{testing → structure}/Variants/VariantItem/Settings.mjs +1 -1
- package/dist/elements/{testing → structure}/Variants/VariantItem/VariantItem.mjs +1 -1
- package/dist/elements/{testing → structure}/Variants/VariantItem/declaration.d.ts +1 -1
- package/dist/elements/{testing → structure}/Variants/VariantItem/declaration.mjs +2 -2
- package/dist/elements/{testing → structure}/Variants/VariantItem/index.d.ts +1 -1
- package/dist/elements/{testing → structure}/Variants/VariantItem/index.mjs +1 -1
- package/dist/elements/{testing → structure}/Variants/Variants.mjs +12 -12
- package/dist/elements/{testing → structure/Variants}/childOfItem.mjs +1 -1
- package/dist/elements/{testing → structure}/Variants/declaration.d.ts +1 -1
- package/dist/elements/{testing → structure}/Variants/declaration.mjs +3 -3
- package/dist/elements/{testing → structure}/Variants/index.d.ts +2 -2
- package/dist/elements/{testing → structure}/Variants/index.mjs +1 -1
- package/dist/elements/user/Account/Account.d.ts +25 -0
- package/dist/elements/user/Account/Account.mjs +104 -0
- package/dist/elements/user/Account/Settings.d.ts +10 -0
- package/dist/elements/user/Account/Settings.mjs +47 -0
- package/dist/elements/user/Account/declaration.d.ts +143 -0
- package/dist/elements/user/Account/declaration.mjs +123 -0
- package/dist/elements/user/Account/index.d.ts +141 -0
- package/dist/elements/user/Account/index.mjs +5 -0
- package/dist/elements/user/Avatar/Avatar.d.ts +19 -0
- package/dist/elements/user/Avatar/Avatar.mjs +26 -0
- package/dist/elements/user/Avatar/AvatarFace.d.ts +15 -0
- package/dist/elements/user/Avatar/AvatarFace.mjs +28 -0
- package/dist/elements/user/Avatar/Settings.d.ts +9 -0
- package/dist/elements/user/Avatar/Settings.mjs +38 -0
- package/dist/elements/user/Avatar/declaration.d.ts +65 -0
- package/dist/elements/user/Avatar/declaration.mjs +53 -0
- package/dist/elements/user/Avatar/faces.d.ts +10 -0
- package/dist/elements/user/Avatar/faces.mjs +10 -0
- package/dist/elements/user/Avatar/index.d.ts +63 -0
- package/dist/elements/user/Avatar/index.mjs +5 -0
- package/dist/elements/user/SignInForm/Settings.d.ts +16 -0
- package/dist/elements/user/SignInForm/Settings.mjs +64 -0
- package/dist/elements/user/SignInForm/SignInForm.d.ts +34 -0
- package/dist/elements/user/SignInForm/SignInForm.mjs +112 -0
- package/dist/elements/user/SignInForm/declaration.d.ts +120 -0
- package/dist/elements/user/SignInForm/declaration.mjs +99 -0
- package/dist/elements/user/SignInForm/index.d.ts +118 -0
- package/dist/elements/user/SignInForm/index.mjs +5 -0
- package/dist/index.d.ts +514 -6
- package/dist/index.mjs +84 -74
- package/package.json +7 -7
- /package/dist/elements/{testing → structure}/Variants/Settings.d.ts +0 -0
- /package/dist/elements/{testing → structure}/Variants/VariantItem/Settings.d.ts +0 -0
- /package/dist/elements/{testing → structure}/Variants/VariantItem/VariantItem.d.ts +0 -0
- /package/dist/elements/{testing → structure}/Variants/Variants.d.ts +0 -0
- /package/dist/elements/{testing → structure/Variants}/childOfItem.d.ts +0 -0
|
@@ -5,95 +5,107 @@ import r from "../advanced/NodeHtml/declaration.mjs";
|
|
|
5
5
|
import i from "../advanced/PlitziSdk/declaration.mjs";
|
|
6
6
|
import a from "../advanced/Reference/declaration.mjs";
|
|
7
7
|
import o from "../basic/Button/declaration.mjs";
|
|
8
|
-
import s from "../basic/
|
|
9
|
-
import c from "../basic/Dropdown/
|
|
10
|
-
import l from "../basic/
|
|
11
|
-
import u from "../basic/
|
|
12
|
-
import d from "../basic/
|
|
13
|
-
import f from "../basic/
|
|
14
|
-
import p from "../basic/
|
|
15
|
-
import m from "../basic/
|
|
16
|
-
import h from "../basic/
|
|
17
|
-
import g from "../
|
|
18
|
-
import _ from "../form/
|
|
19
|
-
import v from "../
|
|
20
|
-
import y from "../internal/
|
|
21
|
-
import b from "../internal/
|
|
22
|
-
import x
|
|
8
|
+
import s from "../basic/Countdown/declaration.mjs";
|
|
9
|
+
import c from "../basic/Dropdown/declaration.mjs";
|
|
10
|
+
import l from "../basic/Dropdown/DropdownPopup/declaration.mjs";
|
|
11
|
+
import u from "../basic/Heading/declaration.mjs";
|
|
12
|
+
import d from "../basic/Link/declaration.mjs";
|
|
13
|
+
import f from "../basic/Markdown/declaration.mjs";
|
|
14
|
+
import p from "../basic/Paragraph/declaration.mjs";
|
|
15
|
+
import m from "../basic/RichText/declaration.mjs";
|
|
16
|
+
import h from "../basic/Text/declaration.mjs";
|
|
17
|
+
import g from "../basic/ThemeToggle/declaration.mjs";
|
|
18
|
+
import _ from "../form/Form/declaration.mjs";
|
|
19
|
+
import v from "../form/FormControl/declaration.mjs";
|
|
20
|
+
import y from "../internal/LayoutContainer/declaration.mjs";
|
|
21
|
+
import b from "../internal/Loading/declaration.mjs";
|
|
22
|
+
import x from "../internal/NotFound/declaration.mjs";
|
|
23
|
+
import S, { DOCUMENT_SCROLLS as ee, isDocumentScroll as te } from "../internal/Page/declaration.mjs";
|
|
23
24
|
import C from "../media/Chart/declaration.mjs";
|
|
24
25
|
import w from "../media/Embed/declaration.mjs";
|
|
25
26
|
import T from "../media/FontAwesome/declaration.mjs";
|
|
26
27
|
import E from "../media/Image/declaration.mjs";
|
|
27
28
|
import D from "../media/Svg/declaration.mjs";
|
|
28
29
|
import O from "../media/Video/declaration.mjs";
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
30
|
+
import ne from "../provider/ApiContainer/declaration.mjs";
|
|
31
|
+
import k from "../provider/Channel/declaration.mjs";
|
|
32
|
+
import A from "../structure/Carousel/CarouselTrack/declaration.mjs";
|
|
33
|
+
import j from "../structure/Carousel/declaration.mjs";
|
|
34
|
+
import M, { NAMEABLE_CONTAINER_TAGS as re } from "../structure/Container/declaration.mjs";
|
|
35
|
+
import N from "../structure/DialogContainer/declaration.mjs";
|
|
36
|
+
import P from "../structure/Disclosure/declaration.mjs";
|
|
37
|
+
import F from "../structure/Disclosure/DisclosureSummary/declaration.mjs";
|
|
38
|
+
import I from "../structure/FocusGroup/declaration.mjs";
|
|
39
|
+
import L from "../structure/List/declaration.mjs";
|
|
40
|
+
import R from "../structure/List/ListItem/declaration.mjs";
|
|
41
|
+
import z from "../structure/ModalContainer/declaration.mjs";
|
|
42
|
+
import B from "../structure/Pagination/declaration.mjs";
|
|
43
|
+
import V from "../structure/TabContainer/declaration.mjs";
|
|
44
|
+
import H from "../structure/TabContainer/TabContainerBody/declaration.mjs";
|
|
45
|
+
import U from "../structure/TabContainer/TabContainerHeader/declaration.mjs";
|
|
46
|
+
import W from "../structure/TabContainer/TabContainerItem/declaration.mjs";
|
|
47
|
+
import G from "../structure/TimeWindow/declaration.mjs";
|
|
48
|
+
import K from "../structure/Variants/declaration.mjs";
|
|
49
|
+
import q from "../structure/Variants/VariantItem/declaration.mjs";
|
|
50
|
+
import J from "../user/Account/declaration.mjs";
|
|
51
|
+
import Y from "../user/Avatar/declaration.mjs";
|
|
52
|
+
import X from "../user/SignInForm/declaration.mjs";
|
|
53
|
+
import { interactionBasicTriggers as ie } from "../../Element/helpers/elementConstants.mjs";
|
|
54
|
+
import { HTML_TAG_PARTS as ae } from "../basic/RichText/classHtmlParts.mjs";
|
|
55
|
+
import { isSvgMarkup as oe } from "../media/Svg/sanitizeSvg.mjs";
|
|
50
56
|
// src/elements/declarations/index.ts
|
|
51
|
-
var
|
|
52
|
-
ApiContainer:
|
|
57
|
+
var Z = {
|
|
58
|
+
ApiContainer: ne,
|
|
53
59
|
BlockHtml: e,
|
|
54
60
|
BlockJsx: t,
|
|
55
61
|
Button: o,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
Countdown: s,
|
|
63
|
+
Carousel: j,
|
|
64
|
+
CarouselTrack: A,
|
|
65
|
+
Channel: k,
|
|
66
|
+
Container: M,
|
|
60
67
|
Custom: n,
|
|
61
|
-
DialogContainer:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
DialogContainer: N,
|
|
69
|
+
Disclosure: P,
|
|
70
|
+
DisclosureSummary: F,
|
|
71
|
+
FocusGroup: I,
|
|
72
|
+
Dropdown: c,
|
|
73
|
+
DropdownPopup: l,
|
|
65
74
|
Embed: w,
|
|
66
75
|
FontAwesome: T,
|
|
67
|
-
Form:
|
|
68
|
-
FormControl:
|
|
69
|
-
Heading:
|
|
76
|
+
Form: _,
|
|
77
|
+
FormControl: v,
|
|
78
|
+
Heading: u,
|
|
70
79
|
Image: E,
|
|
71
|
-
LayoutContainer:
|
|
72
|
-
Link:
|
|
73
|
-
List:
|
|
74
|
-
ListItem:
|
|
75
|
-
Loading:
|
|
76
|
-
Markdown:
|
|
77
|
-
ModalContainer:
|
|
80
|
+
LayoutContainer: y,
|
|
81
|
+
Link: d,
|
|
82
|
+
List: L,
|
|
83
|
+
ListItem: R,
|
|
84
|
+
Loading: b,
|
|
85
|
+
Markdown: f,
|
|
86
|
+
ModalContainer: z,
|
|
78
87
|
NodeHtml: r,
|
|
79
|
-
NotFound:
|
|
80
|
-
Page:
|
|
81
|
-
Pagination:
|
|
82
|
-
Paragraph:
|
|
88
|
+
NotFound: x,
|
|
89
|
+
Page: S,
|
|
90
|
+
Pagination: B,
|
|
91
|
+
Paragraph: p,
|
|
83
92
|
PlitziSdk: i,
|
|
84
93
|
Reference: a,
|
|
85
|
-
RichText:
|
|
94
|
+
RichText: m,
|
|
86
95
|
Chart: C,
|
|
87
96
|
Svg: D,
|
|
88
|
-
TabContainer:
|
|
89
|
-
TabContainerBody:
|
|
90
|
-
TabContainerHeader:
|
|
91
|
-
TabContainerItem:
|
|
92
|
-
Text:
|
|
93
|
-
ThemeToggle:
|
|
94
|
-
TimeWindow:
|
|
95
|
-
Variants:
|
|
96
|
-
VariantItem:
|
|
97
|
+
TabContainer: V,
|
|
98
|
+
TabContainerBody: H,
|
|
99
|
+
TabContainerHeader: U,
|
|
100
|
+
TabContainerItem: W,
|
|
101
|
+
Text: h,
|
|
102
|
+
ThemeToggle: g,
|
|
103
|
+
TimeWindow: G,
|
|
104
|
+
Variants: K,
|
|
105
|
+
VariantItem: q,
|
|
106
|
+
Account: J,
|
|
107
|
+
Avatar: Y,
|
|
108
|
+
SignInForm: X,
|
|
97
109
|
Video: O
|
|
98
|
-
},
|
|
99
|
-
export {
|
|
110
|
+
}, se = Object.fromEntries(Object.values(Z).flatMap((e) => "serverTemplates" in e ? [[e.type, e.serverTemplates]] : [])), Q = Object.fromEntries(Object.values(Z).flatMap((e) => "contentAttributes" in e ? [[e.type, e.contentAttributes]] : [])), ce = (e) => Q[e] ?? [], $ = Object.fromEntries(Object.values(Z).flatMap((e) => "ancestorType" in e ? [[e.type, e.ancestorType]] : [])), le = (e) => $[e];
|
|
111
|
+
export { J as AccountDeclaration, ne as ApiContainerDeclaration, Y as AvatarDeclaration, e as BlockHtmlDeclaration, t as BlockJsxDeclaration, o as ButtonDeclaration, j as CarouselDeclaration, A as CarouselTrackDeclaration, k as ChannelDeclaration, C as ChartDeclaration, M as ContainerDeclaration, s as CountdownDeclaration, n as CustomDeclaration, ee as DOCUMENT_SCROLLS, N as DialogContainerDeclaration, P as DisclosureDeclaration, F as DisclosureSummaryDeclaration, c as DropdownDeclaration, l as DropdownPopupDeclaration, w as EmbedDeclaration, I as FocusGroupDeclaration, T as FontAwesomeDeclaration, v as FormControlDeclaration, _ as FormDeclaration, ae as HTML_TAG_PARTS, u as HeadingDeclaration, E as ImageDeclaration, y as LayoutContainerDeclaration, d as LinkDeclaration, L as ListDeclaration, R as ListItemDeclaration, b as LoadingDeclaration, f as MarkdownDeclaration, z as ModalContainerDeclaration, re as NAMEABLE_CONTAINER_TAGS, r as NodeHtmlDeclaration, x as NotFoundDeclaration, S as PageDeclaration, B as PaginationDeclaration, p as ParagraphDeclaration, i as PlitziSdkDeclaration, a as ReferenceDeclaration, m as RichTextDeclaration, X as SignInFormDeclaration, D as SvgDeclaration, H as TabContainerBodyDeclaration, V as TabContainerDeclaration, U as TabContainerHeaderDeclaration, W as TabContainerItemDeclaration, h as TextDeclaration, g as ThemeToggleDeclaration, G as TimeWindowDeclaration, q as VariantItemDeclaration, K as VariantsDeclaration, O as VideoDeclaration, $ as ancestorTypeByType, le as ancestorTypeOf, Q as contentAttributesByType, ce as contentAttributesOf, Z as elementDeclarations, ie as interactionBasicTriggers, te as isDocumentScroll, oe as isSvgMarkup, se as serverTemplatesByType };
|
package/dist/elements/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { default as Custom } from './advanced/Custom';
|
|
|
4
4
|
import { default as NodeHtml } from './advanced/NodeHtml';
|
|
5
5
|
import { default as Reference } from './advanced/Reference';
|
|
6
6
|
import { default as Button } from './basic/Button';
|
|
7
|
+
import { default as Countdown } from './basic/Countdown';
|
|
7
8
|
import { default as Dropdown } from './basic/Dropdown';
|
|
8
9
|
import { default as Heading } from './basic/Heading';
|
|
9
10
|
import { default as Link } from './basic/Link';
|
|
@@ -29,19 +30,24 @@ import { default as Channel } from './provider/Channel';
|
|
|
29
30
|
import { default as Carousel } from './structure/Carousel';
|
|
30
31
|
import { default as Container } from './structure/Container';
|
|
31
32
|
import { default as DialogContainer } from './structure/DialogContainer';
|
|
33
|
+
import { default as Disclosure } from './structure/Disclosure';
|
|
32
34
|
import { default as FocusGroup } from './structure/FocusGroup';
|
|
33
35
|
import { default as List } from './structure/List';
|
|
34
36
|
import { default as ModalContainer } from './structure/ModalContainer';
|
|
35
37
|
import { default as Pagination } from './structure/Pagination';
|
|
36
38
|
import { default as TabContainer } from './structure/TabContainer';
|
|
37
39
|
import { default as TimeWindow } from './structure/TimeWindow';
|
|
38
|
-
import { default as Variants } from './
|
|
40
|
+
import { default as Variants } from './structure/Variants';
|
|
41
|
+
import { default as Account } from './user/Account';
|
|
42
|
+
import { default as Avatar } from './user/Avatar';
|
|
43
|
+
import { default as SignInForm } from './user/SignInForm';
|
|
39
44
|
export * from './advanced/BlockHtml';
|
|
40
45
|
export * from './advanced/BlockJsx';
|
|
41
46
|
export * from './advanced/Custom';
|
|
42
47
|
export * from './advanced/Reference';
|
|
43
48
|
export * from './advanced/NodeHtml';
|
|
44
49
|
export * from './basic/Button';
|
|
50
|
+
export * from './basic/Countdown';
|
|
45
51
|
export * from './basic/Dropdown';
|
|
46
52
|
export * from './basic/Heading';
|
|
47
53
|
export * from './basic/Link';
|
|
@@ -65,6 +71,7 @@ export * from './provider/ApiContainer';
|
|
|
65
71
|
export * from './provider/Channel';
|
|
66
72
|
export * from './structure/Container';
|
|
67
73
|
export * from './structure/DialogContainer';
|
|
74
|
+
export * from './structure/Disclosure';
|
|
68
75
|
export * from './structure/FocusGroup';
|
|
69
76
|
export * from './structure/List';
|
|
70
77
|
export * from './structure/ModalContainer';
|
|
@@ -72,5 +79,8 @@ export * from './structure/Pagination';
|
|
|
72
79
|
export * from './structure/Carousel';
|
|
73
80
|
export * from './structure/TabContainer';
|
|
74
81
|
export * from './structure/TimeWindow';
|
|
75
|
-
export * from './
|
|
76
|
-
export
|
|
82
|
+
export * from './structure/Variants';
|
|
83
|
+
export * from './user/Account';
|
|
84
|
+
export * from './user/Avatar';
|
|
85
|
+
export * from './user/SignInForm';
|
|
86
|
+
export { NodeHtml, Dropdown, NotFound, Loading, Custom, Reference, BlockHtml, BlockJsx, Page, Container, FocusGroup, LayoutContainer, DialogContainer, Disclosure, ModalContainer, TabContainer, TimeWindow, Variants, Account, Avatar, SignInForm, Carousel, Heading, Image, Video, Embed, Chart, Svg, FontAwesome, Button, Countdown, Paragraph, RichText, Text, ThemeToggle, List, Link, Markdown, Pagination, Form, FormControl, ApiContainer, Channel };
|
package/dist/elements/index.mjs
CHANGED
|
@@ -5,77 +5,87 @@ import r from "./advanced/Custom/index.mjs";
|
|
|
5
5
|
import i from "./advanced/NodeHtml/index.mjs";
|
|
6
6
|
import a from "./advanced/Reference/index.mjs";
|
|
7
7
|
import o from "./basic/Button/index.mjs";
|
|
8
|
-
import s from "./basic/
|
|
9
|
-
import c from "./basic/
|
|
10
|
-
import l from "./basic/
|
|
11
|
-
import u from "./basic/
|
|
12
|
-
import d from "./basic/
|
|
13
|
-
import f from "./basic/
|
|
14
|
-
import p from "./basic/
|
|
15
|
-
import m from "./basic/
|
|
16
|
-
import h from "./
|
|
17
|
-
import g from "./form/
|
|
18
|
-
import _ from "./
|
|
19
|
-
import v from "./internal/
|
|
20
|
-
import
|
|
21
|
-
import b from "./internal/
|
|
22
|
-
import x from "./
|
|
23
|
-
import S from "./media/
|
|
24
|
-
import C from "./media/
|
|
25
|
-
import w from "./media/
|
|
26
|
-
import T from "./media/
|
|
27
|
-
import E from "./media/
|
|
28
|
-
import D from "./
|
|
29
|
-
import O from "./provider/
|
|
30
|
-
import k from "./
|
|
31
|
-
import A from "./structure/
|
|
32
|
-
import j from "./structure/
|
|
33
|
-
import M from "./structure/
|
|
34
|
-
import N from "./structure/
|
|
35
|
-
import P from "./structure/
|
|
36
|
-
import F from "./structure/
|
|
37
|
-
import I from "./structure/
|
|
38
|
-
import L from "./structure/
|
|
39
|
-
import R from "./
|
|
8
|
+
import s from "./basic/Countdown/index.mjs";
|
|
9
|
+
import c from "./basic/Dropdown/index.mjs";
|
|
10
|
+
import l from "./basic/Heading/index.mjs";
|
|
11
|
+
import u from "./basic/Link/index.mjs";
|
|
12
|
+
import d from "./basic/Markdown/index.mjs";
|
|
13
|
+
import f from "./basic/Paragraph/index.mjs";
|
|
14
|
+
import p from "./basic/RichText/index.mjs";
|
|
15
|
+
import m from "./basic/Text/index.mjs";
|
|
16
|
+
import h from "./basic/ThemeToggle/index.mjs";
|
|
17
|
+
import g from "./form/Form/index.mjs";
|
|
18
|
+
import _ from "./form/FormControl/index.mjs";
|
|
19
|
+
import v from "./internal/LayoutContainer/index.mjs";
|
|
20
|
+
import y from "./internal/Loading/index.mjs";
|
|
21
|
+
import { NotFound as b } from "./internal/NotFound/index.mjs";
|
|
22
|
+
import x from "./internal/Page/index.mjs";
|
|
23
|
+
import S from "./media/Chart/index.mjs";
|
|
24
|
+
import C from "./media/Embed/index.mjs";
|
|
25
|
+
import w from "./media/FontAwesome/index.mjs";
|
|
26
|
+
import T from "./media/Image/index.mjs";
|
|
27
|
+
import E from "./media/Svg/index.mjs";
|
|
28
|
+
import D from "./media/Video/index.mjs";
|
|
29
|
+
import O from "./provider/ApiContainer/index.mjs";
|
|
30
|
+
import k from "./provider/Channel/index.mjs";
|
|
31
|
+
import A from "./structure/Carousel/index.mjs";
|
|
32
|
+
import j from "./structure/Container/index.mjs";
|
|
33
|
+
import M from "./structure/DialogContainer/index.mjs";
|
|
34
|
+
import N from "./structure/Disclosure/index.mjs";
|
|
35
|
+
import P from "./structure/FocusGroup/index.mjs";
|
|
36
|
+
import F from "./structure/List/index.mjs";
|
|
37
|
+
import I from "./structure/ModalContainer/index.mjs";
|
|
38
|
+
import L from "./structure/Pagination/index.mjs";
|
|
39
|
+
import R from "./structure/TabContainer/index.mjs";
|
|
40
|
+
import z from "./structure/TimeWindow/index.mjs";
|
|
41
|
+
import B from "./structure/Variants/index.mjs";
|
|
42
|
+
import V from "./user/Account/index.mjs";
|
|
43
|
+
import H from "./user/Avatar/index.mjs";
|
|
44
|
+
import U from "./user/SignInForm/index.mjs";
|
|
40
45
|
// src/elements/index.ts
|
|
41
|
-
var
|
|
42
|
-
|
|
46
|
+
var W = /* @__PURE__ */ e({
|
|
47
|
+
Account: () => V,
|
|
48
|
+
ApiContainer: () => O,
|
|
49
|
+
Avatar: () => H,
|
|
43
50
|
BlockHtml: () => t,
|
|
44
51
|
BlockJsx: () => n,
|
|
45
52
|
Button: () => o,
|
|
46
|
-
Carousel: () =>
|
|
47
|
-
Channel: () =>
|
|
48
|
-
Chart: () =>
|
|
49
|
-
Container: () =>
|
|
53
|
+
Carousel: () => A,
|
|
54
|
+
Channel: () => k,
|
|
55
|
+
Chart: () => S,
|
|
56
|
+
Container: () => j,
|
|
57
|
+
Countdown: () => s,
|
|
50
58
|
Custom: () => r,
|
|
51
|
-
DialogContainer: () =>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
DialogContainer: () => M,
|
|
60
|
+
Disclosure: () => N,
|
|
61
|
+
Dropdown: () => c,
|
|
62
|
+
Embed: () => C,
|
|
63
|
+
FocusGroup: () => P,
|
|
64
|
+
FontAwesome: () => w,
|
|
65
|
+
Form: () => g,
|
|
66
|
+
FormControl: () => _,
|
|
67
|
+
Heading: () => l,
|
|
68
|
+
Image: () => T,
|
|
69
|
+
LayoutContainer: () => v,
|
|
70
|
+
Link: () => u,
|
|
71
|
+
List: () => F,
|
|
72
|
+
Loading: () => y,
|
|
73
|
+
Markdown: () => d,
|
|
74
|
+
ModalContainer: () => I,
|
|
66
75
|
NodeHtml: () => i,
|
|
67
|
-
NotFound: () =>
|
|
68
|
-
Page: () =>
|
|
69
|
-
Pagination: () =>
|
|
70
|
-
Paragraph: () =>
|
|
76
|
+
NotFound: () => b,
|
|
77
|
+
Page: () => x,
|
|
78
|
+
Pagination: () => L,
|
|
79
|
+
Paragraph: () => f,
|
|
71
80
|
Reference: () => a,
|
|
72
|
-
RichText: () =>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
RichText: () => p,
|
|
82
|
+
SignInForm: () => U,
|
|
83
|
+
Svg: () => E,
|
|
84
|
+
TabContainer: () => R,
|
|
85
|
+
Text: () => m,
|
|
86
|
+
ThemeToggle: () => h,
|
|
87
|
+
TimeWindow: () => z,
|
|
88
|
+
Variants: () => B,
|
|
89
|
+
Video: () => D
|
|
80
90
|
});
|
|
81
|
-
export {
|
|
91
|
+
export { V as Account, O as ApiContainer, H as Avatar, t as BlockHtml, n as BlockJsx, o as Button, A as Carousel, k as Channel, S as Chart, j as Container, s as Countdown, r as Custom, M as DialogContainer, N as Disclosure, c as Dropdown, C as Embed, P as FocusGroup, w as FontAwesome, g as Form, _ as FormControl, l as Heading, T as Image, v as LayoutContainer, u as Link, F as List, y as Loading, d as Markdown, I as ModalContainer, i as NodeHtml, b as NotFound, x as Page, L as Pagination, f as Paragraph, a as Reference, p as RichText, U as SignInForm, E as Svg, R as TabContainer, m as Text, h as ThemeToggle, z as TimeWindow, B as Variants, D as Video, W as elements_exports };
|
|
@@ -3,6 +3,11 @@ export type ImageProps = {
|
|
|
3
3
|
ref?: RefObject<HTMLElement>;
|
|
4
4
|
className?: string;
|
|
5
5
|
src?: string;
|
|
6
|
+
/**
|
|
7
|
+
* What is shown when `src` is empty or does not load — the brand's placeholder for a product, a generic portrait. When
|
|
8
|
+
* that fails too, or none is given, the SDK's own placeholder.
|
|
9
|
+
*/
|
|
10
|
+
fallbackSrc?: string;
|
|
6
11
|
/**
|
|
7
12
|
* What the picture shows, in words — read by screen readers and browser agents in its place, and shown when it
|
|
8
13
|
* cannot load. Say what it is for on this page, not what file it is: "Maya presenting the roadmap", not "photo".
|
|
@@ -34,7 +39,7 @@ export type ImageProps = {
|
|
|
34
39
|
*/
|
|
35
40
|
resize?: boolean;
|
|
36
41
|
};
|
|
37
|
-
declare const Image: ({ ref, className, src: srcProp, alt: altProp, decorative, fetchPriority, loadMode, sizes, width, height, resize }: ImageProps) => import('react').JSX.Element;
|
|
42
|
+
declare const Image: ({ ref, className, src: srcProp, fallbackSrc, alt: altProp, decorative, fetchPriority, loadMode, sizes, width, height, resize }: ImageProps) => import('react').JSX.Element;
|
|
38
43
|
declare const _default: import('react').FC<import('../../..').WithElementProps<ImageProps>>;
|
|
39
44
|
export default _default;
|
|
40
45
|
export { Image };
|
|
@@ -2,46 +2,55 @@ import { getFallbackSVGBase64 as e } from "./ImageHelper.mjs";
|
|
|
2
2
|
import t from "../../../Element/hocs/withElement.mjs";
|
|
3
3
|
import { emptyMark as n } from "../../../Element/hooks/useEditableContent.mjs";
|
|
4
4
|
import { RootElement as r } from "../../../Element/RootElement.mjs";
|
|
5
|
-
import { useCallback as i,
|
|
6
|
-
import { usePlitzi as
|
|
7
|
-
import { imageSrcSet as
|
|
8
|
-
import { useCommonStore as
|
|
9
|
-
import { jsx as
|
|
10
|
-
import
|
|
5
|
+
import { useCallback as i, useEffect as a, useRef as o, useState as s } from "react";
|
|
6
|
+
import { usePlitzi as c } from "@plitzi/sdk-shared/hooks";
|
|
7
|
+
import { imageSrcSet as l, imageUrl as u, isResizableImage as d } from "@plitzi/sdk-shared/helpers";
|
|
8
|
+
import { useCommonStore as f } from "@plitzi/sdk-shared/store";
|
|
9
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
10
|
+
import m from "clsx";
|
|
11
11
|
// src/elements/media/Image/Image.tsx
|
|
12
|
-
var
|
|
13
|
-
let { settings: { previewMode:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
var h = 1280, g = e(), _ = ({ ref: e, className: t = "", src: _, fallbackSrc: v = "", alt: y = "", decorative: b = !1, fetchPriority: x = "auto", loadMode: S, sizes: C = "100vw", width: w, height: T, resize: E = !0 }) => {
|
|
13
|
+
let { settings: { previewMode: D } } = c(), O = b ? "" : y, [k, A] = s([]), j = [_, v].find((e) => e && !k.includes(e)) ?? g, M = !!_ && k.includes(_ ?? ""), N = j === g, P = i(() => A((e) => e.includes(j) ? e : [...e, j]), [j]), F = o(null), I = e ?? F;
|
|
14
|
+
a(() => {
|
|
15
|
+
let e = I.current, t = e instanceof HTMLImageElement ? e : e?.querySelector("img");
|
|
16
|
+
t?.complete && t.naturalWidth === 0 && !N && P();
|
|
17
|
+
}, [
|
|
18
|
+
I,
|
|
19
|
+
P,
|
|
20
|
+
N
|
|
21
|
+
]);
|
|
22
|
+
let L = M ? { "data-plitzi-failed": _ } : n(D === !0 && !_), R = S === "auto" ? void 0 : S, [z] = f("images.endpoint"), B = D && z && E && !N && d(j) ? {
|
|
23
|
+
src: u(z, j, h),
|
|
24
|
+
srcSet: l(z, j),
|
|
25
|
+
sizes: C
|
|
26
|
+
} : { src: j }, V = {
|
|
27
|
+
...w ? { width: w } : {},
|
|
28
|
+
...T ? { height: T } : {}
|
|
20
29
|
};
|
|
21
|
-
return
|
|
30
|
+
return D ? /* @__PURE__ */ p(r, {
|
|
22
31
|
tag: "img",
|
|
23
32
|
draggable: !1,
|
|
24
|
-
ref:
|
|
25
|
-
className:
|
|
26
|
-
...
|
|
27
|
-
...
|
|
28
|
-
alt:
|
|
29
|
-
loading:
|
|
30
|
-
fetchPriority:
|
|
31
|
-
onError:
|
|
32
|
-
...
|
|
33
|
-
}) : /* @__PURE__ */
|
|
34
|
-
ref:
|
|
35
|
-
className:
|
|
36
|
-
children: /* @__PURE__ */
|
|
33
|
+
ref: I,
|
|
34
|
+
className: m("plitzi-component__image", t),
|
|
35
|
+
...B,
|
|
36
|
+
...V,
|
|
37
|
+
alt: O,
|
|
38
|
+
loading: R,
|
|
39
|
+
fetchPriority: x,
|
|
40
|
+
onError: N ? void 0 : P,
|
|
41
|
+
...L
|
|
42
|
+
}) : /* @__PURE__ */ p(r, {
|
|
43
|
+
ref: I,
|
|
44
|
+
className: m("plitzi-component__image image--edit-mode", t),
|
|
45
|
+
children: /* @__PURE__ */ p("img", {
|
|
37
46
|
draggable: !1,
|
|
38
47
|
src: j,
|
|
39
|
-
alt:
|
|
40
|
-
loading:
|
|
41
|
-
fetchPriority:
|
|
42
|
-
onError:
|
|
43
|
-
...
|
|
48
|
+
alt: O,
|
|
49
|
+
loading: R,
|
|
50
|
+
fetchPriority: x,
|
|
51
|
+
onError: N ? void 0 : P,
|
|
52
|
+
...L
|
|
44
53
|
})
|
|
45
54
|
});
|
|
46
|
-
},
|
|
47
|
-
export {
|
|
55
|
+
}, v = t(_);
|
|
56
|
+
export { _ as Image, v as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type SettingsProps = {
|
|
2
2
|
src?: string;
|
|
3
|
+
fallbackSrc?: string;
|
|
3
4
|
alt?: string;
|
|
4
5
|
decorative?: boolean;
|
|
5
6
|
fetchPriority?: 'high' | 'low' | 'auto';
|
|
@@ -10,5 +11,5 @@ type SettingsProps = {
|
|
|
10
11
|
variables?: Record<string, string>;
|
|
11
12
|
onUpdate?: (key: string, value: string | boolean | number) => void;
|
|
12
13
|
};
|
|
13
|
-
declare const Settings: ({ src, alt, decorative, variables, fetchPriority, loadMode, sizes, width, height, onUpdate }: SettingsProps) => import('react').JSX.Element;
|
|
14
|
+
declare const Settings: ({ src, fallbackSrc, alt, decorative, variables, fetchPriority, loadMode, sizes, width, height, onUpdate }: SettingsProps) => import('react').JSX.Element;
|
|
14
15
|
export default Settings;
|