@frontify/fondue 12.0.0-beta.16 → 12.0.0-beta.18

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 (41) hide show
  1. package/dist/components/RichTextEditor/Plugins/CheckboxListPlugin/CheckboxListButton/CheckboxListToolbarButton.es.js +8 -8
  2. package/dist/components/RichTextEditor/Plugins/CheckboxListPlugin/CheckboxListButton/CheckboxListToolbarButton.es.js.map +1 -1
  3. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js +4 -2
  4. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js.map +1 -1
  5. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js +32 -27
  6. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js.map +1 -1
  7. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/FloatingLink.es.js +13 -6
  8. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/FloatingLink.es.js.map +1 -1
  9. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/InsertLinkModal/index.d.ts +1 -0
  10. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.d.ts +2 -0
  11. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js +38 -0
  12. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js.map +1 -0
  13. package/dist/components/Slider/Slider.d.ts +1 -1
  14. package/dist/components/Slider/Slider.es.js.map +1 -1
  15. package/dist/index.cjs.js +10 -4
  16. package/dist/index.cjs.js.map +1 -1
  17. package/dist/index.umd.js +10 -4
  18. package/dist/index.umd.js.map +1 -1
  19. package/dist/node_modules/@udecode/plate-core/dist/index.es.es.js +1482 -0
  20. package/dist/node_modules/@udecode/plate-core/dist/index.es.es.js.map +1 -0
  21. package/dist/node_modules/@udecode/plate-floating/dist/index.es.es.js +21 -0
  22. package/dist/node_modules/@udecode/plate-floating/dist/index.es.es.js.map +1 -0
  23. package/dist/node_modules/@udecode/zustood/dist/index.es.es.js +439 -0
  24. package/dist/node_modules/@udecode/zustood/dist/index.es.es.js.map +1 -0
  25. package/dist/node_modules/@udecode/zustood/node_modules/react-tracked/dist/index.modern.es.js +21 -0
  26. package/dist/node_modules/@udecode/zustood/node_modules/react-tracked/dist/index.modern.es.js.map +1 -0
  27. package/dist/node_modules/hotkeys-js/dist/hotkeys.esm.es.js +275 -0
  28. package/dist/node_modules/hotkeys-js/dist/hotkeys.esm.es.js.map +1 -0
  29. package/dist/node_modules/jotai/esm/index.es.js +418 -0
  30. package/dist/node_modules/jotai/esm/index.es.js.map +1 -0
  31. package/dist/node_modules/proxy-compare/dist/index.modern.es.js +74 -0
  32. package/dist/node_modules/proxy-compare/dist/index.modern.es.js.map +1 -0
  33. package/dist/node_modules/react-hotkeys-hook/dist/react-hotkeys-hook.esm.es.js +7 -0
  34. package/dist/node_modules/react-hotkeys-hook/dist/react-hotkeys-hook.esm.es.js.map +1 -0
  35. package/dist/node_modules/zustand/esm/index.es.js +62 -0
  36. package/dist/node_modules/zustand/esm/index.es.js.map +1 -0
  37. package/dist/node_modules/zustand/esm/middleware.es.js +219 -0
  38. package/dist/node_modules/zustand/esm/middleware.es.js.map +1 -0
  39. package/dist/node_modules/zustand/esm/vanilla.es.js +26 -0
  40. package/dist/node_modules/zustand/esm/vanilla.es.js.map +1 -0
  41. package/package.json +3 -3
@@ -0,0 +1,62 @@
1
+ import { useReducer as E, useRef as d, useDebugValue as x, useEffect as y, useLayoutEffect as j } from "react";
2
+ function D(S) {
3
+ let e;
4
+ const n = /* @__PURE__ */ new Set(), c = (r, s) => {
5
+ const t = typeof r == "function" ? r(e) : r;
6
+ if (t !== e) {
7
+ const u = e;
8
+ e = s ? t : Object.assign({}, e, t), n.forEach((i) => i(e, u));
9
+ }
10
+ }, o = () => e, l = (r, s = o, t = Object.is) => {
11
+ console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");
12
+ let u = s(e);
13
+ function i() {
14
+ const g = s(e);
15
+ if (!t(u, g)) {
16
+ const w = u;
17
+ r(u = g, w);
18
+ }
19
+ }
20
+ return n.add(i), () => n.delete(i);
21
+ }, f = { setState: c, getState: o, subscribe: (r, s, t) => s || t ? l(r, s, t) : (n.add(r), () => n.delete(r)), destroy: () => n.clear() };
22
+ return e = S(c, o, f), f;
23
+ }
24
+ const O = typeof window > "u" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent), h = O ? y : j;
25
+ function T(S) {
26
+ const e = typeof S == "function" ? D(S) : S, n = (c = e.getState, o = Object.is) => {
27
+ const [, l] = E((p) => p + 1, 0), a = e.getState(), b = d(a), f = d(c), r = d(o), s = d(!1), t = d();
28
+ t.current === void 0 && (t.current = c(a));
29
+ let u, i = !1;
30
+ (b.current !== a || f.current !== c || r.current !== o || s.current) && (u = c(a), i = !o(t.current, u)), h(() => {
31
+ i && (t.current = u), b.current = a, f.current = c, r.current = o, s.current = !1;
32
+ });
33
+ const g = d(a);
34
+ h(() => {
35
+ const p = () => {
36
+ try {
37
+ const R = e.getState(), v = f.current(R);
38
+ r.current(t.current, v) || (b.current = R, t.current = v, l());
39
+ } catch {
40
+ s.current = !0, l();
41
+ }
42
+ }, m = e.subscribe(p);
43
+ return e.getState() !== g.current && p(), m;
44
+ }, []);
45
+ const w = i ? u : t.current;
46
+ return x(w), w;
47
+ };
48
+ return Object.assign(n, e), n[Symbol.iterator] = function() {
49
+ console.warn("[useStore, api] = create() is deprecated and will be removed in v4");
50
+ const c = [n, e];
51
+ return {
52
+ next() {
53
+ const o = c.length <= 0;
54
+ return { value: c.shift(), done: o };
55
+ }
56
+ };
57
+ }, n;
58
+ }
59
+ export {
60
+ T as default
61
+ };
62
+ //# sourceMappingURL=index.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../../../../node_modules/zustand/esm/index.js"],"sourcesContent":["import { useReducer, useRef, useDebugValue, useEffect, useLayoutEffect } from 'react';\n\nfunction createStore(createState) {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (nextState !== state) {\n const previousState = state;\n state = replace ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const subscribeWithSelector = (listener, selector = getState, equalityFn = Object.is) => {\n console.warn(\"[DEPRECATED] Please use `subscribeWithSelector` middleware\");\n let currentSlice = selector(state);\n function listenerToAdd() {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n listener(currentSlice = nextSlice, previousSlice);\n }\n }\n listeners.add(listenerToAdd);\n return () => listeners.delete(listenerToAdd);\n };\n const subscribe = (listener, selector, equalityFn) => {\n if (selector || equalityFn) {\n return subscribeWithSelector(listener, selector, equalityFn);\n }\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const destroy = () => listeners.clear();\n const api = { setState, getState, subscribe, destroy };\n state = createState(setState, getState, api);\n return api;\n}\n\nconst isSSR = typeof window === \"undefined\" || !window.navigator || /ServerSideRendering|^Deno\\//.test(window.navigator.userAgent);\nconst useIsomorphicLayoutEffect = isSSR ? useEffect : useLayoutEffect;\nfunction create(createState) {\n const api = typeof createState === \"function\" ? createStore(createState) : createState;\n const useStore = (selector = api.getState, equalityFn = Object.is) => {\n const [, forceUpdate] = useReducer((c) => c + 1, 0);\n const state = api.getState();\n const stateRef = useRef(state);\n const selectorRef = useRef(selector);\n const equalityFnRef = useRef(equalityFn);\n const erroredRef = useRef(false);\n const currentSliceRef = useRef();\n if (currentSliceRef.current === void 0) {\n currentSliceRef.current = selector(state);\n }\n let newStateSlice;\n let hasNewStateSlice = false;\n if (stateRef.current !== state || selectorRef.current !== selector || equalityFnRef.current !== equalityFn || erroredRef.current) {\n newStateSlice = selector(state);\n hasNewStateSlice = !equalityFn(currentSliceRef.current, newStateSlice);\n }\n useIsomorphicLayoutEffect(() => {\n if (hasNewStateSlice) {\n currentSliceRef.current = newStateSlice;\n }\n stateRef.current = state;\n selectorRef.current = selector;\n equalityFnRef.current = equalityFn;\n erroredRef.current = false;\n });\n const stateBeforeSubscriptionRef = useRef(state);\n useIsomorphicLayoutEffect(() => {\n const listener = () => {\n try {\n const nextState = api.getState();\n const nextStateSlice = selectorRef.current(nextState);\n if (!equalityFnRef.current(currentSliceRef.current, nextStateSlice)) {\n stateRef.current = nextState;\n currentSliceRef.current = nextStateSlice;\n forceUpdate();\n }\n } catch (error) {\n erroredRef.current = true;\n forceUpdate();\n }\n };\n const unsubscribe = api.subscribe(listener);\n if (api.getState() !== stateBeforeSubscriptionRef.current) {\n listener();\n }\n return unsubscribe;\n }, []);\n const sliceToReturn = hasNewStateSlice ? newStateSlice : currentSliceRef.current;\n useDebugValue(sliceToReturn);\n return sliceToReturn;\n };\n Object.assign(useStore, api);\n useStore[Symbol.iterator] = function() {\n console.warn(\"[useStore, api] = create() is deprecated and will be removed in v4\");\n const items = [useStore, api];\n return {\n next() {\n const done = items.length <= 0;\n return { value: items.shift(), done };\n }\n };\n };\n return useStore;\n}\n\nexport { create as default };\n"],"names":[],"mappings":";AAEA,WAAqB,GAAa;AAChC,MAAI;AACJ,QAAM,IAA4B,oBAAI,OAChC,IAAW,CAAC,GAAS,MAAY;AACrC,UAAM,IAAY,OAAO,KAAY,aAAa,EAAQ,CAAK,IAAI;AACnE,QAAI,MAAc,GAAO;AACvB,YAAM,IAAgB;AACtB,UAAQ,IAAU,IAAY,OAAO,OAAO,IAAI,GAAO,CAAS,GAChE,EAAU,QAAQ,CAAC,MAAa,EAAS,GAAO,CAAa,CAAC;AAAA,IAC/D;AAAA,EACL,GACQ,IAA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AAgB,SAAS,CAAa,IAEvE,EAA0B,MAAM;AAC9B,MAAI,KACF,GAAgB,UAAU,IAE5B,EAAS,UAAU,GACnB,EAAY,UAAU,GACtB,EAAc,UAAU,GACxB,EAAW,UAAU;AAAA,IAC3B,CAAK;AACD,UAAM,IAA6B,EAAO,CAAK;AAC/C,MAA0B,MAAM;AAC9B,YAAM,IAAW,MAAM;AACrB,YAAI;AACF,gBAAM,IAAY,EAAI,YAChB,IAAiB,EAAY,QAAQ,CAAS;AACpD,UAAK,EAAc,QAAQ,EAAgB,SAAS,CAAc,KAChE,GAAS,UAAU,GACnB,EAAgB,UAAU,GAC1B;QAEH,QAAC;AACA,YAAW,UAAU,IACrB;QACD;AAAA,MACT,GACY,IAAc,EAAI,UAAU,CAAQ;AAC1C,aAAI,EAAI,eAAe,EAA2B,WAChD,KAEK;AAAA,IACR,GAAE,CAAE,CAAA;AACL,UAAM,IAAgB,IAAmB,IAAgB,EAAgB;AACzE,aAAc,CAAa,GACpB;AAAA,EACX;AACE,gBAAO,OAAO,GAAU,CAAG,GAC3B,EAAS,OAAO,YAAY,WAAW;AACrC,YAAQ,KAAK,oEAAoE;AACjF,UAAM,IAAQ,CAAC,GAAU,CAAG;AAC5B,WAAO;AAAA,MACL,OAAO;AACL,cAAM,IAAO,EAAM,UAAU;AAC7B,eAAO,EAAE,OAAO,EAAM,MAAO,GAAE,QAAI;AAAA,MACpC;AAAA,IACP;AAAA,EACA,GACS;AACT;"}
@@ -0,0 +1,219 @@
1
+ function R(c, n) {
2
+ return (o, d, i) => {
3
+ var r;
4
+ let w = !1;
5
+ typeof n == "string" && !w && (console.warn("[zustand devtools middleware]: passing `name` as directly will be not allowed in next majorpass the `name` in an object `{ name: ... }` instead"), w = !0);
6
+ const f = n === void 0 ? { name: void 0, anonymousActionType: void 0 } : typeof n == "string" ? { name: n } : n;
7
+ typeof ((r = f == null ? void 0 : f.serialize) == null ? void 0 : r.options) < "u" && console.warn("[zustand devtools middleware]: `serialize.options` is deprecated, just use `serialize`");
8
+ let y;
9
+ try {
10
+ y = window.__REDUX_DEVTOOLS_EXTENSION__ || window.top.__REDUX_DEVTOOLS_EXTENSION__;
11
+ } catch {
12
+ }
13
+ if (!y)
14
+ return ({ BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0 } && "production") !== "production" && typeof window < "u" && console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"), c(o, d, i);
15
+ let a = Object.create(y.connect(f)), _ = !1;
16
+ Object.defineProperty(i, "devtools", {
17
+ get: () => (_ || (console.warn("[zustand devtools middleware] `devtools` property on the store is deprecated it will be removed in the next major.\nYou shouldn't interact with the extension directly. But in case you still want to you can patch `window.__REDUX_DEVTOOLS_EXTENSION__` directly"), _ = !0), a),
18
+ set: (l) => {
19
+ _ || (console.warn("[zustand devtools middleware] `api.devtools` is deprecated, it will be removed in the next major.\nYou shouldn't interact with the extension directly. But in case you still want to you can patch `window.__REDUX_DEVTOOLS_EXTENSION__` directly"), _ = !0), a = l;
20
+ }
21
+ });
22
+ let v = !1;
23
+ Object.defineProperty(a, "prefix", {
24
+ get: () => (v || (console.warn("[zustand devtools middleware] along with `api.devtools`, `api.devtools.prefix` is deprecated.\nWe no longer prefix the actions/names" + f.name === void 0 ? ", pass the `name` option to create a separate instance of devtools for each store." : ", because the `name` option already creates a separate instance of devtools for each store."), v = !0), ""),
25
+ set: () => {
26
+ v || (console.warn("[zustand devtools middleware] along with `api.devtools`, `api.devtools.prefix` is deprecated.\nWe no longer prefix the actions/names" + f.name === void 0 ? ", pass the `name` option to create a separate instance of devtools for each store." : ", because the `name` option already creates a separate instance of devtools for each store."), v = !0);
27
+ }
28
+ });
29
+ let h = !0;
30
+ i.setState = (l, e, t) => {
31
+ o(l, e), h && a.send(t === void 0 ? { type: f.anonymousActionType || "anonymous" } : typeof t == "string" ? { type: t } : t, d());
32
+ };
33
+ const m = (...l) => {
34
+ const e = h;
35
+ h = !1, o(...l), h = e;
36
+ }, p = c(i.setState, d, i);
37
+ if (a.init(p), i.dispatchFromDevtools && typeof i.dispatch == "function") {
38
+ let l = !1;
39
+ const e = i.dispatch;
40
+ i.dispatch = (...t) => {
41
+ t[0].type === "__setState" && !l && (console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'), l = !0), e(...t);
42
+ };
43
+ }
44
+ return a.subscribe((l) => {
45
+ var e;
46
+ switch (l.type) {
47
+ case "ACTION":
48
+ if (typeof l.payload != "string") {
49
+ console.error("[zustand devtools middleware] Unsupported action format");
50
+ return;
51
+ }
52
+ return b(l.payload, (t) => {
53
+ if (t.type === "__setState") {
54
+ m(t.state);
55
+ return;
56
+ }
57
+ !i.dispatchFromDevtools || typeof i.dispatch == "function" && i.dispatch(t);
58
+ });
59
+ case "DISPATCH":
60
+ switch (l.payload.type) {
61
+ case "RESET":
62
+ return m(p), a.init(i.getState());
63
+ case "COMMIT":
64
+ return a.init(i.getState());
65
+ case "ROLLBACK":
66
+ return b(l.state, (t) => {
67
+ m(t), a.init(i.getState());
68
+ });
69
+ case "JUMP_TO_STATE":
70
+ case "JUMP_TO_ACTION":
71
+ return b(l.state, (t) => {
72
+ m(t);
73
+ });
74
+ case "IMPORT_STATE": {
75
+ const { nextLiftedState: t } = l.payload, s = (e = t.computedStates.slice(-1)[0]) == null ? void 0 : e.state;
76
+ if (!s)
77
+ return;
78
+ m(s), a.send(null, t);
79
+ return;
80
+ }
81
+ case "PAUSE_RECORDING":
82
+ return h = !h;
83
+ }
84
+ return;
85
+ }
86
+ }), p;
87
+ };
88
+ }
89
+ const b = (c, n) => {
90
+ let o;
91
+ try {
92
+ o = JSON.parse(c);
93
+ } catch (d) {
94
+ console.error("[zustand devtools middleware] Could not parse the received json", d);
95
+ }
96
+ o !== void 0 && n(o);
97
+ };
98
+ var I = Object.defineProperty, g = Object.getOwnPropertySymbols, D = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable, T = (c, n, o) => n in c ? I(c, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : c[n] = o, S = (c, n) => {
99
+ for (var o in n || (n = {}))
100
+ D.call(n, o) && T(c, o, n[o]);
101
+ if (g)
102
+ for (var o of g(n))
103
+ P.call(n, o) && T(c, o, n[o]);
104
+ return c;
105
+ };
106
+ const O = (c) => (n) => {
107
+ try {
108
+ const o = c(n);
109
+ return o instanceof Promise ? o : {
110
+ then(d) {
111
+ return O(d)(o);
112
+ },
113
+ catch(d) {
114
+ return this;
115
+ }
116
+ };
117
+ } catch (o) {
118
+ return {
119
+ then(d) {
120
+ return this;
121
+ },
122
+ catch(d) {
123
+ return O(d)(o);
124
+ }
125
+ };
126
+ }
127
+ }, x = (c, n) => (o, d, i) => {
128
+ let r = S({
129
+ getStorage: () => localStorage,
130
+ serialize: JSON.stringify,
131
+ deserialize: JSON.parse,
132
+ partialize: (e) => e,
133
+ version: 0,
134
+ merge: (e, t) => S(S({}, t), e)
135
+ }, n);
136
+ (r.blacklist || r.whitelist) && console.warn(`The ${r.blacklist ? "blacklist" : "whitelist"} option is deprecated and will be removed in the next version. Please use the 'partialize' option instead.`);
137
+ let w = !1;
138
+ const f = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set();
139
+ let a;
140
+ try {
141
+ a = r.getStorage();
142
+ } catch {
143
+ }
144
+ if (a)
145
+ a.removeItem || console.warn(`[zustand persist middleware] The given storage for item '${r.name}' does not contain a 'removeItem' method, which will be required in v4.`);
146
+ else
147
+ return c((...e) => {
148
+ console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`), o(...e);
149
+ }, d, i);
150
+ const _ = O(r.serialize), v = () => {
151
+ const e = r.partialize(S({}, d()));
152
+ r.whitelist && Object.keys(e).forEach((u) => {
153
+ var E;
154
+ !((E = r.whitelist) != null && E.includes(u)) && delete e[u];
155
+ }), r.blacklist && r.blacklist.forEach((u) => delete e[u]);
156
+ let t;
157
+ const s = _({ state: e, version: r.version }).then((u) => a.setItem(r.name, u)).catch((u) => {
158
+ t = u;
159
+ });
160
+ if (t)
161
+ throw t;
162
+ return s;
163
+ }, h = i.setState;
164
+ i.setState = (e, t) => {
165
+ h(e, t), v();
166
+ };
167
+ const m = c((...e) => {
168
+ o(...e), v();
169
+ }, d, i);
170
+ let p;
171
+ const l = () => {
172
+ var e;
173
+ if (!a)
174
+ return;
175
+ w = !1, f.forEach((s) => s(d()));
176
+ const t = ((e = r.onRehydrateStorage) == null ? void 0 : e.call(r, d())) || void 0;
177
+ return O(a.getItem.bind(a))(r.name).then((s) => {
178
+ if (s)
179
+ return r.deserialize(s);
180
+ }).then((s) => {
181
+ if (s)
182
+ if (typeof s.version == "number" && s.version !== r.version) {
183
+ if (r.migrate)
184
+ return r.migrate(s.state, s.version);
185
+ console.error("State loaded from storage couldn't be migrated since no migrate function was provided");
186
+ } else
187
+ return s.state;
188
+ }).then((s) => {
189
+ var u;
190
+ return p = r.merge(s, (u = d()) != null ? u : m), o(p, !0), v();
191
+ }).then(() => {
192
+ t == null || t(p, void 0), w = !0, y.forEach((s) => s(p));
193
+ }).catch((s) => {
194
+ t == null || t(void 0, s);
195
+ });
196
+ };
197
+ return i.persist = {
198
+ setOptions: (e) => {
199
+ r = S(S({}, r), e), e.getStorage && (a = e.getStorage());
200
+ },
201
+ clearStorage: () => {
202
+ var e;
203
+ (e = a == null ? void 0 : a.removeItem) == null || e.call(a, r.name);
204
+ },
205
+ rehydrate: () => l(),
206
+ hasHydrated: () => w,
207
+ onHydrate: (e) => (f.add(e), () => {
208
+ f.delete(e);
209
+ }),
210
+ onFinishHydration: (e) => (y.add(e), () => {
211
+ y.delete(e);
212
+ })
213
+ }, l(), p || m;
214
+ };
215
+ export {
216
+ R as devtools,
217
+ x as persist
218
+ };
219
+ //# sourceMappingURL=middleware.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware.es.js","sources":["../../../../node_modules/zustand/esm/middleware.js"],"sourcesContent":["var __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nconst redux = (reducer, initial) => (set, get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return __spreadValues$1({ dispatch: (...a) => api.dispatch(...a) }, initial);\n};\n\nfunction devtools(fn, options) {\n return (set, get, api) => {\n var _a;\n let didWarnAboutNameDeprecation = false;\n if (typeof options === \"string\" && !didWarnAboutNameDeprecation) {\n console.warn(\"[zustand devtools middleware]: passing `name` as directly will be not allowed in next majorpass the `name` in an object `{ name: ... }` instead\");\n didWarnAboutNameDeprecation = true;\n }\n const devtoolsOptions = options === void 0 ? { name: void 0, anonymousActionType: void 0 } : typeof options === \"string\" ? { name: options } : options;\n if (typeof ((_a = devtoolsOptions == null ? void 0 : devtoolsOptions.serialize) == null ? void 0 : _a.options) !== \"undefined\") {\n console.warn(\"[zustand devtools middleware]: `serialize.options` is deprecated, just use `serialize`\");\n }\n let extensionConnector;\n try {\n extensionConnector = window.__REDUX_DEVTOOLS_EXTENSION__ || window.top.__REDUX_DEVTOOLS_EXTENSION__;\n } catch {\n }\n if (!extensionConnector) {\n if ((import.meta.env && import.meta.env.MODE) !== \"production\" && typeof window !== \"undefined\") {\n console.warn(\"[zustand devtools middleware] Please install/enable Redux devtools extension\");\n }\n return fn(set, get, api);\n }\n let extension = Object.create(extensionConnector.connect(devtoolsOptions));\n let didWarnAboutDevtools = false;\n Object.defineProperty(api, \"devtools\", {\n get: () => {\n if (!didWarnAboutDevtools) {\n console.warn(\"[zustand devtools middleware] `devtools` property on the store is deprecated it will be removed in the next major.\\nYou shouldn't interact with the extension directly. But in case you still want to you can patch `window.__REDUX_DEVTOOLS_EXTENSION__` directly\");\n didWarnAboutDevtools = true;\n }\n return extension;\n },\n set: (value) => {\n if (!didWarnAboutDevtools) {\n console.warn(\"[zustand devtools middleware] `api.devtools` is deprecated, it will be removed in the next major.\\nYou shouldn't interact with the extension directly. But in case you still want to you can patch `window.__REDUX_DEVTOOLS_EXTENSION__` directly\");\n didWarnAboutDevtools = true;\n }\n extension = value;\n }\n });\n let didWarnAboutPrefix = false;\n Object.defineProperty(extension, \"prefix\", {\n get: () => {\n if (!didWarnAboutPrefix) {\n console.warn(\"[zustand devtools middleware] along with `api.devtools`, `api.devtools.prefix` is deprecated.\\nWe no longer prefix the actions/names\" + devtoolsOptions.name === void 0 ? \", pass the `name` option to create a separate instance of devtools for each store.\" : \", because the `name` option already creates a separate instance of devtools for each store.\");\n didWarnAboutPrefix = true;\n }\n return \"\";\n },\n set: () => {\n if (!didWarnAboutPrefix) {\n console.warn(\"[zustand devtools middleware] along with `api.devtools`, `api.devtools.prefix` is deprecated.\\nWe no longer prefix the actions/names\" + devtoolsOptions.name === void 0 ? \", pass the `name` option to create a separate instance of devtools for each store.\" : \", because the `name` option already creates a separate instance of devtools for each store.\");\n didWarnAboutPrefix = true;\n }\n }\n });\n let isRecording = true;\n api.setState = (state, replace, nameOrAction) => {\n set(state, replace);\n if (!isRecording)\n return;\n extension.send(nameOrAction === void 0 ? { type: devtoolsOptions.anonymousActionType || \"anonymous\" } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction, get());\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n extension.init(initialState);\n if (api.dispatchFromDevtools && typeof api.dispatch === \"function\") {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...a) => {\n if (a[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn('[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.');\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...a);\n };\n }\n extension.subscribe((message) => {\n var _a2;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\"[zustand devtools middleware] Unsupported action format\");\n return;\n }\n return parseJsonThen(message.payload, (action) => {\n if (action.type === \"__setState\") {\n setStateFromDevtools(action.state);\n return;\n }\n if (!api.dispatchFromDevtools)\n return;\n if (typeof api.dispatch !== \"function\")\n return;\n api.dispatch(action);\n });\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n return extension.init(api.getState());\n case \"COMMIT\":\n return extension.init(api.getState());\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n setStateFromDevtools(state);\n extension.init(api.getState());\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n setStateFromDevtools(state);\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a2 = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a2.state;\n if (!lastComputedState)\n return;\n setStateFromDevtools(lastComputedState);\n extension.send(null, nextLiftedState);\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n };\n}\nconst parseJsonThen = (stringified, f) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\"[zustand devtools middleware] Could not parse the received json\", e);\n }\n if (parsed !== void 0)\n f(parsed);\n};\n\nconst subscribeWithSelector = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = (selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n };\n const initialState = fn(set, get, api);\n return initialState;\n};\n\nconst combine = (initialState, create) => (set, get, api) => Object.assign({}, initialState, create(set, get, api));\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst persist = (config, baseOptions) => (set, get, api) => {\n let options = __spreadValues({\n getStorage: () => localStorage,\n serialize: JSON.stringify,\n deserialize: JSON.parse,\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => __spreadValues(__spreadValues({}, currentState), persistedState)\n }, baseOptions);\n if (options.blacklist || options.whitelist) {\n console.warn(`The ${options.blacklist ? \"blacklist\" : \"whitelist\"} option is deprecated and will be removed in the next version. Please use the 'partialize' option instead.`);\n }\n let hasHydrated = false;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage;\n try {\n storage = options.getStorage();\n } catch (e) {\n }\n if (!storage) {\n return config((...args) => {\n console.warn(`[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`);\n set(...args);\n }, get, api);\n } else if (!storage.removeItem) {\n console.warn(`[zustand persist middleware] The given storage for item '${options.name}' does not contain a 'removeItem' method, which will be required in v4.`);\n }\n const thenableSerialize = toThenable(options.serialize);\n const setItem = () => {\n const state = options.partialize(__spreadValues({}, get()));\n if (options.whitelist) {\n Object.keys(state).forEach((key) => {\n var _a;\n !((_a = options.whitelist) == null ? void 0 : _a.includes(key)) && delete state[key];\n });\n }\n if (options.blacklist) {\n options.blacklist.forEach((key) => delete state[key]);\n }\n let errorInSync;\n const thenable = thenableSerialize({ state, version: options.version }).then((serializedValue) => storage.setItem(options.name, serializedValue)).catch((e) => {\n errorInSync = e;\n });\n if (errorInSync) {\n throw errorInSync;\n }\n return thenable;\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n void setItem();\n };\n const configResult = config((...args) => {\n set(...args);\n void setItem();\n }, get, api);\n let stateFromStorage;\n const hydrate = () => {\n var _a;\n if (!storage)\n return;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => cb(get()));\n const postRehydrationCallback = ((_a = options.onRehydrateStorage) == null ? void 0 : _a.call(options, get())) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((storageValue) => {\n if (storageValue) {\n return options.deserialize(storageValue);\n }\n }).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n return options.migrate(deserializedStorageValue.state, deserializedStorageValue.version);\n }\n console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`);\n } else {\n return deserializedStorageValue.state;\n }\n }\n }).then((migratedState) => {\n var _a2;\n stateFromStorage = options.merge(migratedState, (_a2 = get()) != null ? _a2 : configResult);\n set(stateFromStorage, true);\n return setItem();\n }).then(() => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(stateFromStorage, void 0);\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = __spreadValues(__spreadValues({}, options), newOptions);\n if (newOptions.getStorage) {\n storage = newOptions.getStorage();\n }\n },\n clearStorage: () => {\n var _a;\n (_a = storage == null ? void 0 : storage.removeItem) == null ? void 0 : _a.call(storage, options.name);\n },\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n hydrate();\n return stateFromStorage || configResult;\n};\n\nexport { combine, devtools, persist, redux, subscribeWithSelector };\n"],"names":[],"mappings":"AAyBA,WAAkB,GAAI,GAAS;AAC7B,SAAO,CAAC,GAAK,GAAK,MAAQ;AACxB,QAAI;AACJ,QAAI,IAA8B;AAClC,IAAI,OAAO,KAAY,YAAY,CAAC,KAClC,SAAQ,KAAK,iJAAiJ,GAC9J,IAA8B;AAEhC,UAAM,IAAkB,MAAY,SAAS,EAAE,MAAM,QAAQ,qBAAqB,OAAQ,IAAG,OAAO,KAAY,WAAW,EAAE,MAAM,EAAS,IAAG;AAC/I,IAAI,OAAS,MAAK,KAAmB,OAAO,SAAS,EAAgB,cAAc,OAAO,SAAS,EAAG,WAAa,OACjH,QAAQ,KAAK,wFAAwF;AAEvG,QAAI;AACJ,QAAI;AACF,UAAqB,OAAO,gCAAgC,OAAO,IAAI;AAAA,IAC7E,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nE,CAAK,EAAE,MAAM,CAAC,MAAM;AACd,WAA2B,QAAgB,EAAwB,QAAQ,CAAC;AAAA,IAClF,CAAK;AAAA,EACL;AACE,WAAI,UAAU;AAAA,IACZ,YAAY,CAAC,MAAe;AAC1B,UAAU,EAAe,EAAe,CAAE,GAAE,CAAO,GAAG,CAAU,GAC5D,EAAW,cACb,KAAU,EAAW;IAExB;AAAA,IACD,cAAc,MAAM;AAClB,UAAI;AACJ,MAAC,KAAK,KAAW,OAAO,SAAS,EAAQ,eAAe,QAAgB,EAAG,KAAK,GAAS,EAAQ,IAAI;AAAA,IACtG;AAAA,IACD,WAAW,MAAM,EAAS;AAAA,IAC1B,aAAa,MAAM;AAAA,IACnB,WAAW,CAAC,MACV,GAAmB,IAAI,CAAE,GAClB,MAAM;AACX,QAAmB,OAAO,CAAE;AAAA,IACpC;AAAA,IAEI,mBAAmB,CAAC,MAClB,GAAyB,IAAI,CAAE,GACxB,MAAM;AACX,QAAyB,OAAO,CAAE;AAAA,IAC1C;AAAA,EAEA,GACE,KACO,KAAoB;AAC7B;"}
@@ -0,0 +1,26 @@
1
+ function h(S) {
2
+ let e;
3
+ const n = /* @__PURE__ */ new Set(), u = (t, c) => {
4
+ const s = typeof t == "function" ? t(e) : t;
5
+ if (s !== e) {
6
+ const o = e;
7
+ e = c ? s : Object.assign({}, e, s), n.forEach((r) => r(e, o));
8
+ }
9
+ }, i = () => e, b = (t, c = i, s = Object.is) => {
10
+ console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");
11
+ let o = c(e);
12
+ function r() {
13
+ const a = c(e);
14
+ if (!s(o, a)) {
15
+ const f = o;
16
+ t(o = a, f);
17
+ }
18
+ }
19
+ return n.add(r), () => n.delete(r);
20
+ }, d = { setState: u, getState: i, subscribe: (t, c, s) => c || s ? b(t, c, s) : (n.add(t), () => n.delete(t)), destroy: () => n.clear() };
21
+ return e = S(u, i, d), d;
22
+ }
23
+ export {
24
+ h as default
25
+ };
26
+ //# sourceMappingURL=vanilla.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vanilla.es.js","sources":["../../../../node_modules/zustand/esm/vanilla.js"],"sourcesContent":["function createStore(createState) {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (nextState !== state) {\n const previousState = state;\n state = replace ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const subscribeWithSelector = (listener, selector = getState, equalityFn = Object.is) => {\n console.warn(\"[DEPRECATED] Please use `subscribeWithSelector` middleware\");\n let currentSlice = selector(state);\n function listenerToAdd() {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n listener(currentSlice = nextSlice, previousSlice);\n }\n }\n listeners.add(listenerToAdd);\n return () => listeners.delete(listenerToAdd);\n };\n const subscribe = (listener, selector, equalityFn) => {\n if (selector || equalityFn) {\n return subscribeWithSelector(listener, selector, equalityFn);\n }\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const destroy = () => listeners.clear();\n const api = { setState, getState, subscribe, destroy };\n state = createState(setState, getState, api);\n return api;\n}\n\nexport { createStore as default };\n"],"names":[],"mappings":"AAAA,WAAqB,GAAa;AAChC,MAAI;AACJ,QAAM,IAA4B,oBAAI,OAChC,IAAW,CAAC,GAAS,MAAY;AACrC,UAAM,IAAY,OAAO,KAAY,aAAa,EAAQ,CAAK,IAAI;AACnE,QAAI,MAAc,GAAO;AACvB,YAAM,IAAgB;AACtB,UAAQ,IAAU,IAAY,OAAO,OAAO,IAAI,GAAO,CAAS,GAChE,EAAU,QAAQ,CAAC,MAAa,EAAS,GAAO,CAAa,CAAC;AAAA,IAC/D;AAAA,EACL,GACQ,IAAW,MAAM,GACjB,IAAwB,CAAC,GAAU,IAAW,GAAU,IAAa,OAAO,OAAO;AACvF,YAAQ,KAAK,4DAA4D;AACzE,QAAI,IAAe,EAAS,CAAK;AACjC,iBAAyB;AACvB,YAAM,IAAY,EAAS,CAAK;AAChC,UAAI,CAAC,EAAW,GAAc,CAAS,GAAG;AACxC,cAAM,IAAgB;AACtB,UAAS,IAAe,GAAW,CAAa;AAAA,MACjD;AAAA,IACF;AACD,aAAU,IAAI,CAAa,GACpB,MAAM,EAAU,OAAO,CAAa;AAAA,EAC/C,GASQ,IAAM,EAAE,aAAU,aAAU,WARhB,CAAC,GAAU,GAAU,MACjC,KAAY,IACP,EAAsB,GAAU,GAAU,CAAU,IAE7D,GAAU,IAAI,CAAQ,GACf,MAAM,EAAU,OAAO,CAAQ,IAGK,SAD7B,MAAM,EAAU,QACoB;AACpD,aAAQ,EAAY,GAAU,GAAU,CAAG,GACpC;AACT;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontify/fondue",
3
- "version": "12.0.0-beta.16",
3
+ "version": "12.0.0-beta.18",
4
4
  "description": "Design system of Frontify",
5
5
  "main": "dist/index.umd.js",
6
6
  "unpkg": "dist/index.umd.js",
@@ -79,7 +79,7 @@
79
79
  "chalk": "5.0.1",
80
80
  "concat": "1.0.3",
81
81
  "cross-env": "7.0.3",
82
- "cypress": "^10.7.0",
82
+ "cypress": "^10.11.0",
83
83
  "cypress-real-events": "^1.7.1",
84
84
  "eslint": "8.20.0",
85
85
  "eslint-plugin-jsx-a11y": "6.6.1",
@@ -138,7 +138,7 @@
138
138
  "@react-stately/tooltip": "^3.1.1",
139
139
  "@react-stately/tree": "^3.3.1",
140
140
  "@storybook/addon-a11y": "^6.5.7",
141
- "@udecode/plate": "16.9.1",
141
+ "@udecode/plate": "^18.8.1",
142
142
  "@xstate/immer": "^0.3.1",
143
143
  "@xstate/react": "^1.6.3",
144
144
  "date-fns": "^2.28.0",