sykpcomposer 0.0.346 → 0.0.348

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.
@@ -0,0 +1,55 @@
1
+ import { p as f, q as E, s as P, j as _ } from "./index-52fe4eb0.js";
2
+ import { useRef as j, useContext as k, useMemo as O, useEffect as h } from "react";
3
+ function D(e) {
4
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
5
+ }
6
+ var K = D(function(e) {
7
+ const t = new URLSearchParams();
8
+ t.append("code", e);
9
+ for (let n = 1; n < arguments.length; n++)
10
+ t.append("v", arguments[n]);
11
+ throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
12
+ });
13
+ function m(e) {
14
+ const t = e.transform();
15
+ return t !== null ? /* @__PURE__ */ new Set([t]) : /* @__PURE__ */ new Set();
16
+ }
17
+ function $({ initialEditor: e, children: t, initialNodes: n, initialTheme: g, skipCollabChecks: v }) {
18
+ const p = j(!1), i = k(f);
19
+ i == null && K(9);
20
+ const [l, { getTheme: x }] = i, w = O(() => {
21
+ const s = g || x() || void 0, y = E(i, s);
22
+ if (s !== void 0 && (e._config.theme = s), e._parentEditor = l, n)
23
+ for (let r of n) {
24
+ let a = null, o = null;
25
+ if (typeof r != "function") {
26
+ const d = r;
27
+ r = d.replace, a = d.with, o = d.withKlass || null;
28
+ }
29
+ const u = e._nodes.get(r.getType());
30
+ e._nodes.set(r.getType(), { exportDOM: u ? u.exportDOM : void 0, klass: r, replace: a, replaceWithKlass: o, transforms: m(r) });
31
+ }
32
+ else {
33
+ const r = e._nodes = new Map(l._nodes);
34
+ for (const [a, o] of r)
35
+ e._nodes.set(a, { exportDOM: o.exportDOM, klass: o.klass, replace: o.replace, replaceWithKlass: o.replaceWithKlass, transforms: m(o.klass) });
36
+ }
37
+ return e._config.namespace = l._config.namespace, e._editable = l._editable, [e, y];
38
+ }, []), { isCollabActive: M, yjsDocMap: b } = P(), c = v || p.current || b.has(e.getKey());
39
+ return h(() => {
40
+ c && (p.current = !0);
41
+ }, [c]), h(() => l.registerEditableListener((s) => {
42
+ e.setEditable(s);
43
+ }), [e, l]), _.jsx(f.Provider, { value: w, children: !M || c ? t : null });
44
+ }
45
+ function L({
46
+ children: e,
47
+ className: t
48
+ }) {
49
+ return /* @__PURE__ */ _.jsx("div", { className: t || "Placeholder__root", children: e });
50
+ }
51
+ export {
52
+ L as P,
53
+ $ as d
54
+ };
55
+ //# sourceMappingURL=Placeholder-eb43f0b5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Placeholder-eb43f0b5.js","sources":["../node_modules/@lexical/react/LexicalNestedComposer.prod.mjs","../src/components/ui/Placeholder.tsx"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport{useCollaborationContext as e}from\"@lexical/react/LexicalCollaborationContext\";import{LexicalComposerContext as t,createLexicalComposerContext as r}from\"@lexical/react/LexicalComposerContext\";import{useRef as o,useContext as n,useMemo as l,useEffect as i}from\"react\";import{jsx as a}from\"react/jsx-runtime\";function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}var c=s((function(e){const t=new URLSearchParams;t.append(\"code\",e);for(let e=1;e<arguments.length;e++)t.append(\"v\",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function p(e){const t=e.transform();return null!==t?new Set([t]):new Set}function d({initialEditor:s,children:d,initialNodes:f,initialTheme:u,skipCollabChecks:m}){const h=o(!1),x=n(t);null==x&&c(9);const[_,{getTheme:g}]=x,v=l((()=>{const e=u||g()||void 0,t=r(x,e);if(void 0!==e&&(s._config.theme=e),s._parentEditor=_,f)for(let e of f){let t=null,r=null;if(\"function\"!=typeof e){const o=e;e=o.replace,t=o.with,r=o.withKlass||null}const o=s._nodes.get(e.getType());s._nodes.set(e.getType(),{exportDOM:o?o.exportDOM:void 0,klass:e,replace:t,replaceWithKlass:r,transforms:p(e)})}else{const e=s._nodes=new Map(_._nodes);for(const[t,r]of e)s._nodes.set(t,{exportDOM:r.exportDOM,klass:r.klass,replace:r.replace,replaceWithKlass:r.replaceWithKlass,transforms:p(r.klass)})}return s._config.namespace=_._config.namespace,s._editable=_._editable,[s,t]}),[]),{isCollabActive:w,yjsDocMap:b}=e(),M=m||h.current||b.has(s.getKey());return i((()=>{M&&(h.current=!0)}),[M]),i((()=>_.registerEditableListener((e=>{s.setEditable(e)}))),[s,_]),a(t.Provider,{value:v,children:!w||M?d:null})}export{d as LexicalNestedComposer};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport './Placeholder.css';\n\nimport * as React from 'react';\nimport {ReactNode} from 'react';\n\nexport default function Placeholder({\n children,\n className,\n}: {\n children: ReactNode;\n className?: string;\n}): JSX.Element {\n return <div className={className || 'Placeholder__root'}>{children}</div>;\n}\n"],"names":["s","c","e","p","d","f","u","m","h","o","x","n","t","_","g","v","l","r","w","M","i","a","Placeholder","children","className","jsx"],"mappings":";;AAQyT,SAASA,EAAE,GAAE;AAAC,SAAO,KAAG,EAAE,cAAY,OAAO,UAAU,eAAe,KAAK,GAAE,SAAS,IAAE,EAAE,UAAQ;AAAC;AAAC,IAAIC,IAAED,EAAG,SAAS,GAAE;AAAC,QAAM,IAAE,IAAI;AAAgB,IAAE,OAAO,QAAO,CAAC;AAAE,WAAQE,IAAE,GAAEA,IAAE,UAAU,QAAOA;AAAI,MAAE,OAAO,KAAI,UAAUA,CAAC,CAAC;AAAE,QAAM,MAAM,2BAA2B,CAAC,0CAA0C,CAAC,gHAAgH;AAAC,CAAC;AAAG,SAASC,EAAE,GAAE;AAAC,QAAM,IAAE,EAA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