@plitzi/plitzi-sdk 0.38.19 → 0.38.20
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 +70 -0
- package/dist/plitzi-sdk.js +2 -2
- package/dist/plitzi-sdk.js.gz +0 -0
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
1
|
# @plitzi/plitzi-sdk
|
|
2
2
|
|
|
3
|
+
## 0.38.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c7c241a: ## Security
|
|
8
|
+
|
|
9
|
+
- **The `Origin` fallback reads the request's own authority before a forwarded one** (`@plitzi/sdk-server`): 0.38.19
|
|
10
|
+
took `X-Forwarded-Host` first, and with no proxy in front a client could send one naming this host on another port,
|
|
11
|
+
making that port's `Origin` this server's own. Now `:authority` or `Host` decide whenever they name the host the
|
|
12
|
+
request is answered as; `X-Forwarded-Host` only when they do not — a host that took its hostname from the header
|
|
13
|
+
(Express's `trust proxy`) trusts the proxy that wrote it. No option to set: what the host resolved says which one it
|
|
14
|
+
believes. The write guard (`crossSiteWrites`), the sign-in's login-CSRF check and `createOriginGuardMiddleware`
|
|
15
|
+
share it.
|
|
16
|
+
|
|
17
|
+
## Server
|
|
18
|
+
- **`ctx.oauth`: OAuth 2.0 for a space's code, any provider** (`@plitzi/sdk-server`, `@plitzi/sdk-shared`): a
|
|
19
|
+
connection is data in `defineFunctions({ oauth: { calendar: { issuer | authorizeUrl + tokenUrl, credential, scopes,
|
|
20
|
+
authorizeParams, clientAuth } } })` — an OpenID provider by its `issuer` (endpoints discovered), any other by its
|
|
21
|
+
endpoints; none is known to the platform by name. `ctx.oauth.connect(name, { returnTo, owner? })` answers the
|
|
22
|
+
consent URL (authorization code with PKCE); the platform answers `/fn/oauth/callback` — the one address to register
|
|
23
|
+
with every provider — exchanges the code with the app's id and secret from the named credential, and sends the
|
|
24
|
+
visitor back to `returnTo` with `?oauth=<name>&oauth_result=connected` (or `&oauth_error=`). `ctx.oauth.fetch(name,
|
|
25
|
+
url)` writes the token in, renewed before it lapses and once more on a 401, only to `allow.hosts`; `status` and
|
|
26
|
+
`disconnect` (revoked where the provider says). A token is a signed-in visitor's own by default, `{ owner: 'space' }`
|
|
27
|
+
the space's, or a key of the code's own; it is kept in the space's `kv` sealed with a key of the space's that no
|
|
28
|
+
`ctx.sign` reaches, so the code never holds one. In the sandbox, natively and in a space's runtime alike; a plugin's
|
|
29
|
+
functions declare and reach none. Needs `signingSecret`. Runs also carry the `origin` of the request that started
|
|
30
|
+
them (`ctx.origin` of a task context), what the callback address is made of.
|
|
31
|
+
|
|
32
|
+
## Packages
|
|
33
|
+
- **No path a package does not export is written anywhere in the packages** (`@plitzi/plitzi-sdk`,
|
|
34
|
+
`@plitzi/sdk-shared`): two JSDoc comments sent readers to `@plitzi/sdk-authoring/testing`, which is not an entry —
|
|
35
|
+
`inspectRenders` is exported by `@plitzi/sdk-authoring`. `yarn check:specifiers` (in CI after the build) reads every
|
|
36
|
+
`@plitzi/<package>/<path>` the workspace writes — the code, its built declarations, JSDoc, skills and docs — against
|
|
37
|
+
what that package exports, so an import somebody would copy into a project and get `ERR_MODULE_NOT_FOUND` from cannot
|
|
38
|
+
be published again.
|
|
39
|
+
|
|
40
|
+
- **The packages that run in Node say which Node** (`@plitzi/sdk-server`, `@plitzi/cli`, `@plitzi/sdk-mcp`,
|
|
41
|
+
`@plitzi/sdk-authoring`): `"engines": { "node": ">=22.18" }`, the floor every project the CLI makes already declares —
|
|
42
|
+
installed on an older Node they now say so, instead of failing on the first API it lacks (`--env-file-if-exists`,
|
|
43
|
+
`--permission`, `Set#union`). The browser's packages declare none: a bundler reads them.
|
|
44
|
+
|
|
45
|
+
- **A short render guide, and each part of it alone** (`@plitzi/sdk-mcp`): `renderGuideText` stays the whole guide
|
|
46
|
+
(~30k characters); `renderGuideCore` is a third of it for an agent that counts its tokens — a voice assistant, a small
|
|
47
|
+
model — with the model of a render, the element types, the host's theme and what to do on a refusal, and the address
|
|
48
|
+
of every other section; `renderGuideTopics[topic]` and `renderGuideTopicUri(topic)` (`plitzi://render/guide/repeat`,
|
|
49
|
+
`…/data`…) serve each one, cut from the one text. The MCP server answers them as resources and through `plitzi_read`.
|
|
50
|
+
|
|
51
|
+
## CLI
|
|
52
|
+
- **What Plitzi decided reaches the agent writing a report** (`@plitzi/cli`): `plitzi feedback`'s brief lists what was
|
|
53
|
+
reported and kept as it is — with why, and what to do instead — so a report files it under `changed` as `decided`
|
|
54
|
+
rather than carrying it as open, and the page has that status.
|
|
55
|
+
|
|
56
|
+
- **The CLI skill says what `ERR_MODULE_NOT_FOUND` into a `@plitzi` package's `dist` is** (`@plitzi/cli`): an import of
|
|
57
|
+
a path the package does not export — a file rather than its folder — with `plitzi doctor` to name each one and
|
|
58
|
+
`plitzi upgrade migrations --write` to rewrite it.
|
|
59
|
+
|
|
60
|
+
- Updated dependencies [c7c241a]
|
|
61
|
+
- @plitzi/sdk-auth@0.38.20
|
|
62
|
+
- @plitzi/sdk-dev-tools@0.38.20
|
|
63
|
+
- @plitzi/sdk-elements@0.38.20
|
|
64
|
+
- @plitzi/sdk-event-bridge@0.38.20
|
|
65
|
+
- @plitzi/sdk-interactions@0.38.20
|
|
66
|
+
- @plitzi/sdk-navigation@0.38.20
|
|
67
|
+
- @plitzi/sdk-plugins@0.38.20
|
|
68
|
+
- @plitzi/sdk-schema@0.38.20
|
|
69
|
+
- @plitzi/sdk-shared@0.38.20
|
|
70
|
+
- @plitzi/sdk-style@0.38.20
|
|
71
|
+
- @plitzi/sdk-variables@0.38.20
|
|
72
|
+
|
|
3
73
|
## 0.38.19
|
|
4
74
|
|
|
5
75
|
### Patch Changes
|
package/dist/plitzi-sdk.js
CHANGED
|
@@ -126,7 +126,7 @@ return e.createElement(e.Fragment,null,h.map(t=>/* @__PURE__ */e.createElement("
|
|
|
126
126
|
return e.createElement(pO,{...c,"aria-current":C,className:k,ref:u,style:E,to:a,viewTransition:s},"function"==typeof l?l(T):l)});hO.displayName="NavLink";var fO=e.forwardRef(({discover:t="render",fetcherKey:n,navigate:r,reloadDocument:i,replace:o,state:a,method:s=HI,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:h,...f},m)=>{let{useTransitions:g}=e.useContext(wI),y=function(){let{router:t}=mO("useSubmit"),{basename:n}=e.useContext(wI),r=DI("useRouteId"),i=t.fetch,o=t.navigate;return e.useCallback(async(e,t={})=>{let{action:a,method:s,encType:l,formData:c,body:u}=function(e,t){let n,r,i,o,a;if(VI(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");r=a?VA(a,t):null,n=e.getAttribute("method")||HI,i=YI(e.getAttribute("enctype"))||WI,o=new FormData(e)}else if(function(e){return VI(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return VI(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?VA(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||HI,i=YI(e.getAttribute("formenctype"))||YI(a.getAttribute("enctype"))||WI,o=new FormData(a,e),!function(){if(null===GI)try{new FormData(document.createElement("form"),0),GI=!1}catch(dM){GI=!0}return GI}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,r)}}else{if(VI(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=HI,r=null,i=WI,a=e}var s;return o&&"text/plain"===i&&(a=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:a}}(e,n);if(!1===t.navigate){let e=t.fetcherKey||yO();await i(e,r,t.action||a,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:c,body:u,formMethod:t.method||s,formEncType:t.encType||l,flushSync:t.flushSync})}else await o(t.action||a,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:c,body:u,formMethod:t.method||s,formEncType:t.encType||l,replace:t.replace,state:t.state,fromRouteId:r,flushSync:t.flushSync,viewTransition:t.viewTransition})},[i,o,n,r])}(),b=function(t,{relative:n}={}){let{basename:r}=e.useContext(wI),i=e.useContext(xI);TA(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),a={..._I(t||".",{relative:n})},s=EI();if(null==t){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();a.search=n?`?${n}`:""}}return t&&"."!==t||!o.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),"/"!==r&&(a.pathname="/"===a.pathname?r:ZA([r,a.pathname])),IA(a)}(l,{relative:u}),v="get"===s.toLowerCase()?"get":"post",w="string"==typeof l&&wA.test(l);/* @__PURE__ */
|
|
127
127
|
return e.createElement("form",{ref:m,method:v,action:b,onSubmit:i?c:t=>{if(c&&c(t),t.defaultPrevented)return;t.preventDefault();let i=t.nativeEvent.submitter,l=i?.getAttribute("formmethod")||s,f=()=>y(i||t.currentTarget,{fetcherKey:n,method:l,navigate:r,replace:o,state:a,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:h});g&&!1!==r?e.startTransition(()=>f()):f()},...f,"data-discover":w||"render"!==t?void 0:"true"})});function mO(t){let n=e.useContext(mI);return TA(n,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(t)),n}fO.displayName="Form";var gO=0,yO=()=>`__${String(++gO)}__`;function bO({basename:t,children:n,location:r="/"}){"string"==typeof r&&(r=OA(r));let i={pathname:r.pathname||"/",search:r.search||"",hash:r.hash||"",state:null!=r.state?r.state:null,key:r.key||"default",mask:void 0},o={createHref:vO,encodeLocation:wO,push(e){throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`)},replace(e){throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`)},go(e){throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`)},back(){throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.")},forward(){throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.")}};/* @__PURE__ */
|
|
128
128
|
return e.createElement(UI,{basename:t,children:n,location:i,navigationType:"POP",navigator:o,static:!0,useTransitions:!1})}function vO(e){return"string"==typeof e?e:IA(e)}function wO(e){let t="string"==typeof e?e:IA(e);t=t.replace(/ $/,"%20");let n=wA.test(t)?new URL(t):new URL(t,"http://localhost");return{pathname:n.pathname,search:n.search,hash:n.hash}}var kO,xO=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],SO=()=>{const e=new URLSearchParams(window.location.search),t={};for(const n of xO){const r=e.get(n);r&&(t[n.slice(4)]=r)}return Object.keys(t).length>0?t:void 0},TO=()=>"undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,CO=e=>{kO=e},EO=(e,t)=>{kO?.track(e,t)},AO=({analytics:e})=>{const t=EI(),n=x(!0===e?.firstViewCounted);return g(()=>{if(!e?.endpoint||!e.key)return;const t=((e,t=20,n=5e3)=>{const r=[],i=`${e.endpoint.replace(/\/+$/,"")}/batch?k=${encodeURIComponent(e.key)}`;let o;const a=()=>{0!==r.length&&(e=>{const t=JSON.stringify({events:e});"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(i,t)||fetch(i,{method:"POST",headers:{"Content-Type":"text/plain;charset=UTF-8"},body:t,keepalive:!0,mode:"no-cors"}).catch(()=>{})})(r.splice(0,r.length))},s=e=>{r.push(e),r.length>=t&&a()},l=()=>({path:window.location.pathname,title:document.title||void 0});return"undefined"!=typeof window&&(o=setInterval(a,n),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&a()}),window.addEventListener("pagehide",a)),{trackRender:()=>{s({id:TO(),type:"render",ts:Date.now(),page:l(),ref:{referrer:document.referrer||void 0,utm:SO()}})},track:(e,t)=>{s({id:TO(),type:"interaction",ts:Date.now(),page:l(),name:e,props:t})},flush:a,stop:()=>{o&&(clearInterval(o),o=void 0),a()}}})(e);return CO(t),()=>{CO(void 0),t.stop()}},[e]),g(()=>{n.current?n.current=!1:kO?.trackRender()},[t.pathname,t.search]),null},IO=["wheel","touchmove","keydown","pointerdown"],OO=e=>{const t=document.getElementById(e);return t?.scrollIntoView({block:"start"}),null!==t},_O=({children:e,currentPageId:t})=>{const{server:n}=h(th),r=Lo(),{renderMode:i,previewMode:o,environment:a}=ta(),[[s,l,c,u,d]]=Vo(["schema.pageFolders","pageDefinitions","schema.variables","schema.flags","flags.overrides"]),p=n.ssr?.renderResult,m="widget"!==i?EI():void 0,{queryParams:y,hostname:b,origin:v,location:w}=eh({server:n,routerLocation:m}),S=x(l);S.current=l;const T=x(s);T.current=s;const{authenticated:C,user:E}=h(zp),A="widget"!==i?OI():void 0,_=x(A);g(()=>{_.current=A},[A]);const N=k(()=>Xu(l,s,C,n.basePath,o),[l,s,C,n.basePath,o]),{action:M,pageId:P="",pathMatch:L}=k(()=>"widget"===i?{action:{type:"normal",path:""},pageId:t||Zu(N,"/",C).pageId}:Zu(N,w.pathname,C),[N,w.pathname,C,i,t]),R=t||P;(({hash:e,navigationKey:t,enabled:n})=>{g(()=>{const t=(e=>{const t=e.replace(/^#/,"");try{return decodeURIComponent(t)}catch{return t}})(e);if(!n||!t||"undefined"==typeof document||OO(t))return;const r=new AbortController,i=new MutationObserver(()=>{OO(t)&&r.abort()}),o=setTimeout(()=>r.abort(),3e3);return r.signal.addEventListener("abort",()=>{i.disconnect(),clearTimeout(o)}),i.observe(document.body,{childList:!0,subtree:!0}),IO.forEach(e=>window.addEventListener(e,()=>r.abort(),{once:!0,passive:!0,signal:r.signal})),()=>r.abort()},[e,t,n])})({hash:m?.hash??"",navigationKey:m?.key,enabled:o&&"widget"!==i}),g(()=>{Jc.info("navigation",/* @__PURE__ */O("span",{children:["Navigated to page"," ",
|
|
129
|
-
/* @__PURE__ */I("b",{children:Qn(l,`${R}.attributes.name`,R||"Unknown")})]}),{status:M.type,elementId:R})},[M.type,R,l]);const j=f(e=>Yu(S.current,T.current,e),[]),z=x(0),D=f((e,t=!1)=>{if(t&&"undefined"!=typeof window)return void(window.location.href=e);const n=j(e),i=++z.current;if(!r.get("rsc.enabled"))return r.set("navigation.pendingLocation",""),void _.current?.(n);r.set("navigation.pendingLocation",n);const o=ld(r,void 0,void 0,{location:n}).finally(()=>{z.current===i&&r.set("navigation.pendingLocation","")}),a=()=>{z.current===i&&_.current?.(n)};Promise.race([o,new Promise(e=>setTimeout(e,1500))]).then(a,a)},[j,r]),$=k(()=>{const e=N.find(e=>e.pageId===R&&!e.isRaw);return e?{...Qu(e.path).reduce((e,t)=>({...e,[t]:""}),{}),...Qn(L,"params",{})}:Qn(L,"params",{})},[N,L,R]),F=iu($),q=iu(y),B=k(()=>new URLSearchParams(w.search),[w.search]),U=v?`${v}${w.pathname}${w.search}`:"",H=Object.hasOwn(l,R)?l[R].definition.flag:void 0,W=void 0!==H&&!za(H,ja(Ra(u,{environment:a,hostname:b,routeParams:F,queryParams:q,user:Ma({authenticated:C,user:E})},d))),V=W?((e,t)=>e.find(e=>e.hasAccess&&e.notFound&&Uu({path:e.path,end:!0},t))?.pageId)(N,w.pathname)??"":R;if(Go(["navigation.urlSearchParams","navigation.routeParams","navigation.queryParams","navigation.hostname","navigation.origin","navigation.href","navigation.currentPageId","navigation.navigate"],[B,F,q,b,v,U,V,D],{raw:!0}),"notFound"===M.type||W)return p&&(p.status=404),V?e:"Not Found";if("accessDenied"===M.type)return p&&(p.status=403),"Access Denied";if("redirect"===M.type){const e=Tc(c,{queryParams:y,routeParams:F,hostname:b,environment:a}),t=M.path?String(Dn(M.path,{variables:e},!1,!0)):"";if(t&&Hu(t)){const e=new URL(t);return e.searchParams.has("redirect")||e.searchParams.set("redirect",(e=>e.href?e.href:`${e.protocol||"https:"}//${e.host||e.hostname}${e.pathname}${e.search}`)(w)),p?(p.redirect=e.toString(),null):(window.location.assign(e.toString()),null)}return p?(p.redirect=M.path??"",null):/* @__PURE__ */I(BI,{to:M.path??"",replace:!0})}return e},NO=(e,{src:t,type:n,isMain:r},i=!1)=>{let o,a=`${e}/${t}`,s=btoa(a);return o="style"===n&&a.endsWith(".css")?{type:"link",id:s,params:{href:a,rel:"stylesheet",type:"text/css"},isMain:r}:{type:"script",id:s,params:{src:a,type:"text/javascript"},isMain:r},i&&delete o.isMain,o},MO=(e,t)=>{try{let{resource:n,settings:r,type:i}=e,{definition:{name:o="Plitzi's Demo Plugin",owner:a="Plitzi",verified:s=!1,license:l="MIT",website:c="https://plitzi.com",backgroundColor:u="#4422ee",icon:d="https://cdn.plitzi.com/resources/img/favicon.svg"},assets:p,assetsSettings:h,pluginSchema:f}=t;return Object.values(Qn(t,"pluginSchema",{})).reduce((e,m)=>{let{definition:g,builder:y,defaultStyle:b,attributes:v}=m,w=[];return g.type===i&&(w=Object.keys(Ur(f,[i]))),{...e,[g.type]:{attributes:v,builder:y,defaultStyle:b,definition:g,market:{owner:a,verified:s,license:l,website:c,backgroundColor:u,icon:d,category:o},resource:n,isMain:g.type===i,manifest:t,type:i,settings:r,assetsSettings:Object.values(h).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>NO(n,e,!0)),assets:Object.values(p).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>NO(n,e)),subPlugins:w}}},{})}catch{return{}}},PO=async(e=[])=>{let t={};if(!Array.isArray(e))return t;let n=await(async e=>{if(!Array.isArray(e)||0===e.length)return{};let t=e.map(e=>(async e=>{try{let t=await fetch(e,{headers:{Accept:"application/json"}});return t.ok?await t.json():void 0}catch{return}})(e));return(await Promise.allSettled(t)).reduce((e,t)=>"fulfilled"===t.status&&t.value?{...e,[Qn(t.value,"root","")]:t.value}:e,{})})(e.filter(e=>e.resource).reduce((e,t)=>[...e,`${t.resource}/plugin-manifest.json`],[]));return e.forEach(e=>{let{type:r}=e,i=Qn(n,r);t={...t,...MO(e,i)}}),t},LO=class extends Error{failure;statusCode;constructor(e,t,n){super(e),this.name="GraphqlRequestError",this.failure=t,this.statusCode=n}},RO=async(e,t)=>e.plugins&&e.plugins.length>0?PO(e.plugins.filter(e=>!t.current[e.type])):{},jO=({children:e,server:t,revision:n,webKey:r="",webId:i,userKey:o="",instanceId:a,offlineMode:s=!1,offlineData:l,offlineDataType:c="json"})=>{const{environment:u,debugMode:d}=ta(),p=Yo(),m=s&&!!l&&!!l.schema,y=k(()=>((e,t)=>({request:async(n,r)=>{let i;try{i=await fetch(e,{method:"POST",headers:{accept:"application/graphql-response+json, application/json;q=0.9","content-type":"application/json","sdk-version":"0.38.
|
|
129
|
+
/* @__PURE__ */I("b",{children:Qn(l,`${R}.attributes.name`,R||"Unknown")})]}),{status:M.type,elementId:R})},[M.type,R,l]);const j=f(e=>Yu(S.current,T.current,e),[]),z=x(0),D=f((e,t=!1)=>{if(t&&"undefined"!=typeof window)return void(window.location.href=e);const n=j(e),i=++z.current;if(!r.get("rsc.enabled"))return r.set("navigation.pendingLocation",""),void _.current?.(n);r.set("navigation.pendingLocation",n);const o=ld(r,void 0,void 0,{location:n}).finally(()=>{z.current===i&&r.set("navigation.pendingLocation","")}),a=()=>{z.current===i&&_.current?.(n)};Promise.race([o,new Promise(e=>setTimeout(e,1500))]).then(a,a)},[j,r]),$=k(()=>{const e=N.find(e=>e.pageId===R&&!e.isRaw);return e?{...Qu(e.path).reduce((e,t)=>({...e,[t]:""}),{}),...Qn(L,"params",{})}:Qn(L,"params",{})},[N,L,R]),F=iu($),q=iu(y),B=k(()=>new URLSearchParams(w.search),[w.search]),U=v?`${v}${w.pathname}${w.search}`:"",H=Object.hasOwn(l,R)?l[R].definition.flag:void 0,W=void 0!==H&&!za(H,ja(Ra(u,{environment:a,hostname:b,routeParams:F,queryParams:q,user:Ma({authenticated:C,user:E})},d))),V=W?((e,t)=>e.find(e=>e.hasAccess&&e.notFound&&Uu({path:e.path,end:!0},t))?.pageId)(N,w.pathname)??"":R;if(Go(["navigation.urlSearchParams","navigation.routeParams","navigation.queryParams","navigation.hostname","navigation.origin","navigation.href","navigation.currentPageId","navigation.navigate"],[B,F,q,b,v,U,V,D],{raw:!0}),"notFound"===M.type||W)return p&&(p.status=404),V?e:"Not Found";if("accessDenied"===M.type)return p&&(p.status=403),"Access Denied";if("redirect"===M.type){const e=Tc(c,{queryParams:y,routeParams:F,hostname:b,environment:a}),t=M.path?String(Dn(M.path,{variables:e},!1,!0)):"";if(t&&Hu(t)){const e=new URL(t);return e.searchParams.has("redirect")||e.searchParams.set("redirect",(e=>e.href?e.href:`${e.protocol||"https:"}//${e.host||e.hostname}${e.pathname}${e.search}`)(w)),p?(p.redirect=e.toString(),null):(window.location.assign(e.toString()),null)}return p?(p.redirect=M.path??"",null):/* @__PURE__ */I(BI,{to:M.path??"",replace:!0})}return e},NO=(e,{src:t,type:n,isMain:r},i=!1)=>{let o,a=`${e}/${t}`,s=btoa(a);return o="style"===n&&a.endsWith(".css")?{type:"link",id:s,params:{href:a,rel:"stylesheet",type:"text/css"},isMain:r}:{type:"script",id:s,params:{src:a,type:"text/javascript"},isMain:r},i&&delete o.isMain,o},MO=(e,t)=>{try{let{resource:n,settings:r,type:i}=e,{definition:{name:o="Plitzi's Demo Plugin",owner:a="Plitzi",verified:s=!1,license:l="MIT",website:c="https://plitzi.com",backgroundColor:u="#4422ee",icon:d="https://cdn.plitzi.com/resources/img/favicon.svg"},assets:p,assetsSettings:h,pluginSchema:f}=t;return Object.values(Qn(t,"pluginSchema",{})).reduce((e,m)=>{let{definition:g,builder:y,defaultStyle:b,attributes:v}=m,w=[];return g.type===i&&(w=Object.keys(Ur(f,[i]))),{...e,[g.type]:{attributes:v,builder:y,defaultStyle:b,definition:g,market:{owner:a,verified:s,license:l,website:c,backgroundColor:u,icon:d,category:o},resource:n,isMain:g.type===i,manifest:t,type:i,settings:r,assetsSettings:Object.values(h).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>NO(n,e,!0)),assets:Object.values(p).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>NO(n,e)),subPlugins:w}}},{})}catch{return{}}},PO=async(e=[])=>{let t={};if(!Array.isArray(e))return t;let n=await(async e=>{if(!Array.isArray(e)||0===e.length)return{};let t=e.map(e=>(async e=>{try{let t=await fetch(e,{headers:{Accept:"application/json"}});return t.ok?await t.json():void 0}catch{return}})(e));return(await Promise.allSettled(t)).reduce((e,t)=>"fulfilled"===t.status&&t.value?{...e,[Qn(t.value,"root","")]:t.value}:e,{})})(e.filter(e=>e.resource).reduce((e,t)=>[...e,`${t.resource}/plugin-manifest.json`],[]));return e.forEach(e=>{let{type:r}=e,i=Qn(n,r);t={...t,...MO(e,i)}}),t},LO=class extends Error{failure;statusCode;constructor(e,t,n){super(e),this.name="GraphqlRequestError",this.failure=t,this.statusCode=n}},RO=async(e,t)=>e.plugins&&e.plugins.length>0?PO(e.plugins.filter(e=>!t.current[e.type])):{},jO=({children:e,server:t,revision:n,webKey:r="",webId:i,userKey:o="",instanceId:a,offlineMode:s=!1,offlineData:l,offlineDataType:c="json"})=>{const{environment:u,debugMode:d}=ta(),p=Yo(),m=s&&!!l&&!!l.schema,y=k(()=>((e,t)=>({request:async(n,r)=>{let i;try{i=await fetch(e,{method:"POST",headers:{accept:"application/graphql-response+json, application/json;q=0.9","content-type":"application/json","sdk-version":"0.38.20",authorization:t?`Bearer ${t}`:""},body:JSON.stringify({query:n,variables:r})})}catch(dM){throw new LO(dM instanceof Error?dM.message:"Network request failed","network")}const o=(e=>{try{return JSON.parse(e)}catch{return}})(await i.text());if(!i.ok){const t=cu(i.status,o);throw t&&su({reason:t,url:e}),new LO(`Response not successful: Received status code ${i.status}`,"http",i.status)}const a=(e=>{const t=qt(e)?e.errors:void 0;return Array.isArray(t)?t.map(e=>qt(e)&&"string"==typeof e.message?e.message:"Unknown error"):[]})(o);if(a.length)throw new LO(a.join("\n"),"graphql",i.status);if(!qt(o)||!qt(o.data))throw new LO("The server answered without data","graphql",i.status);return o.data}}))(t.serverUrl,r),[t.serverUrl,r]),[b,v]=S(!(s&&l)),[w,T]=S(void 0),{components:C}=h(hi),[E,A]=S(()=>m&&"json"===c?{...l,plugins:{}}:{plugins:{}}),_=f(async(e,t)=>{try{return{success:!0,result:await y.request(ih[e],{environment:u,...t})}}catch(dM){return{success:!1,result:void 0,error:dM instanceof Error?dM:String(dM)}}},[y,u]),N=f(async(e,t,n=!0)=>{const r=rh[e];if(!r)return{success:!1,result:void 0,error:"Mutation Not Found"};try{return{success:!0,result:await y.request(r,n?{environment:u,...t}:t)}}catch(dM){return{success:!1,result:void 0,error:dM instanceof Error?dM:String(dM)}}},[y,u]),M=async()=>{let e=n;"number"==typeof n&&0!==n||(e=void 0);const t=await _("Init",{environment:u,revision:e});if(t.error)return v(!1),void T((e=>e instanceof LO?401===e.statusCode?"Access not authorized":"network"===e.failure?"Service not available":e.message:"string"==typeof e?e:e.message)(t.error));if(t.success&&t.result){const{Space:e}=$r(t.result);if(!e)return T(/* @__PURE__ */O("span",{children:["Space not found, publish to ",
|
|
130
130
|
/* @__PURE__ */I("b",{children:u})," environment"]})),void v(!1);let n={};e.plugins.length>0&&(n=await PO(e.plugins.filter(e=>!C.current[e.type]))),p("render.overQuota",e.render?.overQuota??!1),A({schema:{...Nc,...Ac(e.schema)},plugins:n,style:e.style})}v(!1)},P=x(l),L=x(0);g(()=>{if(!m||"json"!==c||P.current===l)return;P.current=l,L.current+=1;const e=L.current;RO(l,C).then(t=>{e===L.current&&A({...l,plugins:t})},e=>{console.error("[plitzi] The new space could not be drawn — its plugins did not load: the page stays as it was",e)})},[l,m,c,C]),g(()=>{s&&l?m&&(async e=>{const t=await RO(e,C);A(e=>({...e,plugins:t})),v(!1)})(l):(v(e=>e||!0),M())},[m,s&&c,r,u,d]);const R=k(()=>({query:_,mutate:N,webKey:r,webId:i,server:t,environment:u,instanceId:a,userKey:o}),[_,N,r,i,t,u,a,o]);return w?/* @__PURE__ */I("div",{children:w}):b?null:/* @__PURE__ */I(th,{value:R,children:/* @__PURE__ */I(nh,{value:E,children:e})})},zO=({children:e,plugins:t,sdkStylePath:n="./plitzi-sdk.css",sdkIconsPath:r="./plitzi-sdk-icons.css"})=>{const{renderMode:i}=ta(),[o,a]=S({}),s=h(nh),l=k(()=>t||s.plugins,[t,s]),{components:c}=h(hi),u=f((e,t,n="")=>t?Qn(l,`${e}.settings.${t}`,n):Qn(l,`${e}.settings`,{}),[l]),d=f((e=[])=>{const t=e.reduce((e,t)=>{let n="";return n="script"===t.type?t.params.src:t.params.href,n?(n=btoa(n),{...e,[n]:{...t,key:n}}):e},{});0!==Object.keys(t).length&&a(e=>({...e,...t}))},[]),p=f((e=[])=>{const t=e.filter(e=>!function(e){return null==e||"number"!=typeof e&&"boolean"!=typeof e&&"function"!=typeof e&&"symbol"!=typeof e&&("string"==typeof e||Array.isArray(e)?0===e.length:e instanceof Map||e instanceof Set?0===e.size:"object"==typeof e&&0===Object.keys(e).length)}(e)).map(e=>btoa(e));a(e=>Ur(e,t))},[]),m=k(()=>(e=>Object.values(e).reduce((e,t)=>({...e,...Qn(t,"assets",[]).filter(e=>"link"===e.type).reduce((e,t)=>({...e,[btoa(t.id)]:t}),{})}),{}))(l),[l]),g=k(()=>Object.keys(c.current).filter(e=>"local-custom"===c.current[e].origin).reduce((e,t)=>({...e,...Qn(c,`${t}.assets`,[]).reduce((e,n,r)=>({...e,[`${t}-${r}`]:{type:"link",id:`${t}-${r}`,params:n}}),{})}),{}),[c.current]),y=k(()=>{const e={};return"iframe"!==i&&"shadow"!==i||(e["static-99"]={type:"link",id:"static-99",params:{type:"text/css",href:n,rel:"stylesheet"}},e["static-100"]={type:"link",id:"static-100",params:{type:"text/css",href:r,rel:"stylesheet"}}),{...e,...g,...m,...o}},[g,m,o,i,n,r]),b=k(()=>({assets:y,getSettings:u,plugins:l,registerCustomAssets:d,unregisterCustomAssets:p}),[y,u,l,d,p]),v=k(()=>Object.values({...m,...o}).map((e,t)=>/* @__PURE__ */I(e.type,{...e.params},t)),[m,o]);/* @__PURE__ */
|
|
131
131
|
return O(A,{children:[/* @__PURE__ */I(oC,{children:("raw"===i||"widget"===i)&&v}),/* @__PURE__ */I(Da,{value:b,children:e})]})},DO=({children:e,schema:t})=>{const n=h(nh),r=k(()=>({...Nc,...t||n.schema}),[t,n.schema]);Go("schema",r);const{flat:i,pages:o}=r,a=iu(k(()=>Dr(i,o),[i,o]));return Go("pageDefinitions",a),e},$O=l({});$O.displayName="ContainerRootContext";var FO=({className:e="",children:t,...n})=>{let r=x(null),i=f(()=>r.current instanceof HTMLElement?r.current.getRootNode():void 0,[r]),o=f(()=>i()instanceof ShadowRoot,[i]),a=k(()=>({getHost:i,rootRef:r,isRootShadow:o}),[i,r,o]);/* @__PURE__ */
|
|
132
132
|
return I("div",{...n,ref:r,className:e,children:/* @__PURE__ */I($O,{value:a,children:t})})},qO=()=>{let{environment:e}=ta(),[[t,n,r,i]]=Bo(["schema.variables","navigation.routeParams","navigation.queryParams","navigation.hostname"]);return iu(k(()=>Tc(t,{routeParams:n,queryParams:r,hostname:i,environment:e}),[e,i,r,n,t]))},BO=({children:e})=>{let[[t,n,r,i,o,a=""]]=Bo(["navigation.routeParams","navigation.queryParams","navigation.origin","navigation.href","navigation.currentPageId","navigation.pendingLocation"]),s=qO(),l=f(()=>Xr(s).map(e=>({path:e,name:`variables.${e}`})),[s]);YS({id:"global",source:"variables",name:"Variables",fields:l}),Uo("runtime.sources.variables",s);let[c={}]=Bo("pageDefinitions"),u=k(()=>Object.values(c).map(e=>({value:e.id,label:Qn(e,"attributes.name",e.id)})),[c]),d=k(()=>({routeParams:t,queryParams:n,origin:r,href:i,currentPageId:o,pending:""!==a,pendingLocation:a}),[t,n,r,i,o,a]),p=f(()=>[...Xr({routeParams:t,queryParams:n}).map(e=>({path:e,name:`navigation.${e}`})),{path:"origin",name:"Origin"},{path:"href",name:"This page’s address"},{path:"pending",name:"A navigation is on its way"},{path:"pendingLocation",name:"Where a navigation is going"},u.length>0?{path:"currentPageId",name:"Current Page",inputType:"select",values:u}:{path:"currentPageId",name:"Current Page"}],[t,n,u]);YS({id:"global",source:"navigation",name:"Navigation",fields:p}),Uo("runtime.sources.navigation",d);let m=h(zp),{user:y,authenticated:b,state:v,provider:w}=m,S=k(()=>w?{isAuthenticated:b,...void 0===v?{}:{status:v},accessToken:y?.accessToken??"",details:{username:"",email:"",roles:"",permissions:"",verified:"",...y?.details??{}}}:{},[w,y,b,v]),T=f(()=>Xr(S).map(e=>({path:e,name:`user.${e}`})),[S]);YS({id:"global",source:"auth",name:"Auth State",fields:T}),Uo("runtime.sources.auth",S);let C=(e=>{let{environment:t}=ta(),[[n,r,i,o,a]]=Bo(["schema.flags","navigation.routeParams","navigation.queryParams","navigation.hostname","flags.overrides"]),{authenticated:s,user:l}=e,c=k(()=>Ma({authenticated:s,user:l}),[s,l]);return iu(k(()=>Ra(n,{environment:t,hostname:o,routeParams:r,queryParams:i,user:c},a),[n,t,o,r,i,c,a]))})(m),E=k(()=>ja(C),[C]),A=f(()=>Object.keys(E).map(e=>({path:e,name:`flags.${e}`,inputType:"checkbox"})),[E]);YS({id:"global",source:"flags",name:"Feature Flags",fields:A}),Uo("runtime.sources.flags",E),Uo("flags.resolved",C);let[I,O]=Bo(["schema.flags","flags.overrides"])[0],_=iu(((e,t)=>Pa.flatMap(n=>Object.keys(t[n]??{}).filter(t=>!Object.hasOwn(e??{},t)).map(e=>({layer:n,name:e}))))(I,O??{}));g(()=>{_.forEach(({layer:e,name:t})=>console.warn(`[plitzi] The ${e} sets the feature flag "${t}", which this space does not declare: the override is ignored. Declare the flag in the space, or remove the override.`))},[_]);let[N]=Bo("runtime.state"),M=f(()=>Xr(N).map(e=>({path:e,name:`state.${e}`})),[N]);YS({id:"global",source:"state",name:"State",fields:M}),Uo("runtime.sources.state",N);let[P]=Bo("runtime.host"),L=f(()=>Xr(P).map(e=>({path:e,name:`host.${e}`})),[P]);YS({id:"global",source:"host",name:"Host",fields:L}),Uo("runtime.sources.host",P);let{theme:R,resolvedTheme:j}=qS(FS),z=k(()=>({mode:R,resolved:j}),[R,j]),D=f(()=>Xr(z).map(e=>({path:e,name:`theme.${e}`})),[z]);YS({id:"global",source:"theme",name:"Theme",fields:D}),Uo("runtime.sources.theme",z);let[$]=Bo("schema.settings.computed"),F=x(void 0),q=k(()=>Ja($??{},{variables:s,navigation:d,auth:S,state:N??{},host:P??{},theme:z,flags:E},F.current),[$,s,d,S,N,P,z,E]);F.current=q;let B=f(()=>Xr(q).map(e=>({path:e,name:`computed.${e}`})),[q]);return YS({id:"global",source:"computed",name:"Computed",fields:B}),Uo("runtime.sources.computed",q),e},UO=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/,HO=/^rgba?\(\s*(\d{1,3}%?\s*,\s*){2,3}\d{1,3}%?\s*\)$/,WO=/^hsla?\(\s*\d{1,3}(deg|rad|turn)?\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%(\s*,\s*(0|0?\.\d+|1))?\s*\)$/,VO=/* @__PURE__ */new Set(["black","white","red","green","blue","yellow","cyan","magenta","orange","purple","brown","pink","gray","lime","teal","navy","silver","maroon","olive","aqua","fuchsia"]),GO=({children:e,contentDidMount:t,contentDidDismount:n})=>(g(()=>(t?.(),()=>{n?.()}),[]),e),KO=({ref:e,className:t="",ssrMode:r=!1,id:i="",css:o="",style:a,zoom:s=1,assets:l,viewport:c="width=device-width, initial-scale=1",children:u,contentDidMount:d,contentDidDismount:p,contentDidUpdate:h,onLoad:m})=>{t=Cm("ContainerFrame",{className:t,componentKey:"root"});let y=x(null);v(e,()=>y.current,[y]);let[b,w]=S(!1),[k,T]=S(null),C=f((e,t,n)=>{let r=[...t.childNodes],i=n.getElementById("customStyle");Object.values(e).forEach(e=>{let o=n.createElement(e.type);e.id&&o.setAttribute("data-id",e.id),Object.keys(e.params).forEach(t=>{("link"===e.type||"script"===e.type)&&o.setAttribute(t,e.params[t])}),r.find(t=>"link"===e.type&&t.href===o.href||"script"===e.type&&t.src===o.src)||(t.insertBefore(o,i),r.push(o))})},[]),E=f((e,t)=>{let{head:n}=e,r=n.querySelectorAll('*:not([asset-static="true"])');Object.values(r).forEach(e=>{n.removeChild(e)}),t&&C(t,n,e)},[C]),[N]=S(()=>(e=>{if(!e)return"";let t=[];return Object.values(e).forEach(e=>{t.push(`<${e.type} ${Object.keys(e.params).map(t=>`${t}="${e.params[t]}"`).join(" ")}>`)}),t.join("")})(l)),M=f(()=>d?.(),[d]);g(()=>{b&&k&&E(k,l)},[b,l,k,E]);let P=f(()=>{let e=y.current&&k,t=y.current?.contentDocument===k;e&&!t?T(y.current?.contentDocument):b||(m?.(y.current),w(!0),T(y.current?.contentDocument))},[b,k,m]);return g(()=>{k&&(k.body.style.zoom=1===s?"":`${s}`)},[k,s]),/* @__PURE__ */O("iframe",{ref:y,className:t,title:"#",srcDoc:`<!DOCTYPE html><html><head>${N}</head><body></body></html>`,id:i,onLoad:P,style:a,children:[b&&k&&_(/* @__PURE__ */O(A,{children:[
|
|
@@ -155,4 +155,4 @@ return O(FO,{className:Tt(e,t&&"system"!==r&&r),"data-hydrated":i?"":void 0,chil
|
|
|
155
155
|
return I(hi,{value:p,children:n})},KN=e=>new Set(Array.isArray(e?.paintedState)?e.paintedState.filter(e=>"string"==typeof e&&""!==e):[]),YN=(e,t)=>qt(e)?Object.fromEntries(Object.entries(e).filter(([e,n])=>t.has(e)&&void 0!==n)):{},JN=e=>{try{document.cookie=`${e}=;path=/;max-age=0;SameSite=Lax`}catch{}},XN=/* @__PURE__ */new Set(["init","initLoading","authenticating"]),ZN=e=>{let t=e.runtime?.sources.auth;if(t){if(void 0===t.status)return{kind:"browser"};if(!XN.has(t.status))return t.isAuthenticated&&void 0!==t.details?.id?{kind:"account",id:String(t.details.id)}:{kind:"guest"}}},QN=e=>{switch(e.kind){case"account":return`user:${e.id}`;case"guest":return"guest";case"browser":return""}},eM=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.has(e))),tM=(e,t)=>qt(e)?Object.fromEntries(Object.entries(e).filter(([e])=>t.has(e))):{},nM=e=>e.schema?.settings,rM=e=>new Set((e?.transientState??[]).filter(e=>"string"==typeof e&&""!==e)),iM=(e,t)=>{let n,r=((e,t)=>{let n=t?.split(":")[1];return n?`plitzi_${e}_painted_${n}`:`plitzi_${e}_painted`})(t,typeof window>"u"?void 0:window.location.host),i=!1;return()=>{let t=e.getState();if(typeof document>"u"||t.render?.isHydrating&&!t.render.hydrated)return;let o=nM(t),a=KN(o),s=ZN(t);if(!o?.keepState||0===a.size||void 0===s)return;let l=QN(s),c=t.runtime?.state;if(!i){i=!0;let t=(e=>((e,t)=>{let n=Kn(e,t);if(void 0!==n)try{let e=JSON.parse(n);return qt(e)&&"string"==typeof e.owner&&qt(e.values)?{owner:e.owner,values:e.values}:void 0}catch{return}})(Yn(),e))(r);if(t&&t.owner!==l&&(JN(r),qt(c)&&[...a].some(e=>e in c)))return void e.setState("runtime.state",eM(c,a));n=t?.owner===l?JSON.stringify(YN(t.values,a)):void 0}let u=YN(c,a),d=JSON.stringify(u);d!==n&&(n=d,0===Object.keys(u).length?JN(r):"too-large"===((e,t)=>{let n=encodeURIComponent(JSON.stringify(t));if(n.length>3072)return JN(e),"too-large";try{return document.cookie=`${e}=${n};path=/;max-age=31536000;SameSite=Lax`,"written"}catch{return"unavailable"}})(r,{owner:l,values:u})&&Jc.warning("store",`settings.paintedState holds more than a cookie can carry — the first paint uses the space's defaults for ${[...a].join(", ")}. Declare only what the first paint shows.`,{storeName:"runtime",path:"runtime.state",prev:void 0,next:u}))}},oM=e=>{let t=(e=>{let{key:t,storage:n,paths:r,partialize:i,partializePath:o,version:a=0,migrate:s,merge:l,mergePath:c,enabled:u}=e,d="function"==typeof n?n:void 0,p="function"==typeof n?void 0:oa(n);if(!d&&!p)return()=>{};let h=e=>{if(!d)return p;let t=d(e);return t?oa(t):void 0},f=e=>{if(r){let t={};for(let n of r){let r=Oi(e,n);t[n]=o?o(n,r,e):r}return t}return i?i(e):e};return e=>{if(Ro(u,e.getState()))return;let n=!1,i=()=>{if(n)return;let i=h(e.getState());i&&(n=!0,function(e,t,n,{version:r,paths:i,migrate:o,merge:a,mergePath:s}){let l=n?.getItem(t);if(l)try{let t=JSON.parse(l),n=t.version!==r;if(n&&!o)return;let c=n&&o?o(t.state,t.version):t.state;if(i){let t=c;return void e.batch(()=>{for(let n of i)if(n in t){let r=s?s(n,t[n],Oi(e.getState(),n),e.getState()):t[n];e.setState(n,r)}})}let u=c;e.setState(void 0,a?a(u,e.getState()):u)}catch{n?.removeItem(t)}}(e,t,i,{version:a,paths:r,migrate:s,merge:l,mergePath:c}))};return{hydrate:i,onChange:n=>{i(),(e=>!r||r.some(t=>jo(e,t)))(n.path)&&(e=>{let n=e.getState(),r=h(n);if(!r)return;let i={version:a,state:f(n)};r.setItem(t,JSON.stringify(i))})(e)}}}})({key:`plitzi_${e}_state`,paths:["runtime.state"],partializePath:(e,t,n)=>qt(t)?eM(t,rM(nM(n))):t,mergePath:(e,t,n,r)=>{let i=rM(nM(r));return i.size>0&&qt(t)?{...eM(t,i),...tM(n,i)}:t},storage:e=>{let{render:t}=e;if(t?.isHydrating&&!t.hydrated)return!1;let n=nM(e),r=ZN(e);if(!n?.keepState||void 0===r)return!1;let i=(e=>{try{return"session"===e?globalThis.sessionStorage:globalThis.localStorage}catch{return}})("sessionStorage"===n.stateStorage?"session":"local");return!!i&&((e,t)=>({getItem:n=>{let r=e.getItem(n);if(null===r)return null;try{let e=JSON.parse(r);if(e.owner===t&&"string"==typeof e.payload)return e.payload}catch{}return e.removeItem(n),null},setItem:(n,r)=>e.setItem(n,JSON.stringify({owner:t,payload:r})),removeItem:t=>e.removeItem(t)}))(i,QN(r))}});return n=>{let r=t(n),i=n.getState().runtime?.state,o=ZN(n.getState()),a=iM(n,e);return{...r,onChange:e=>{let t=o,s=ZN(n.getState());if(void 0!==s&&(o=s),"account"===t?.kind&&void 0!==s&&QN(s)!==QN(t)){let e=qt(i)?eM(i,KN(nM(n.getState()))):i;n.setState("runtime.state",e)}r?.onChange?.(e),a()}}}},aM=e=>({apiServer:"https://api.plitzi.com",ssrServer:"https://ssr.plitzi.com",serverUrl:"https://server.plitzi.com",websocketServer:"wss://server.plitzi.com",subscriptionServer:"wss://server.plitzi.com/subscriptions",...e}),sM={Button:HE,ContentEditable:Em,Input:mA,Heading:cA,ContainerResizable:eA,ContainerCollapsable:ZE,Text:vA,ContainerTabs:sA},lM=({className:e,children:t,webKey:r="",server:o,renderMode:a=ea.renderMode,routing:s="browser",debugMode:l=!1,themeScope:c,theme:d,state:p,forcedFlags:m,...y})=>{const b=k(()=>function(e){if(!e)return 0;let t={};try{let n=e.split(".")[1],r=typeof window<"u"?window.atob(n):Buffer.from(n,"base64").toString();t=JSON.parse(r)}catch{return 0}let n=Number(Qn(t,"sub",0));return Number.isInteger(n)&&n>0?n:0}(r),[r]),v=h(zr),w=c??(v?"container":"document"),T=v&&"raw"===a?"widget":a,C=e??(v?void 0:"min-h-screen"),E=x(p).current,A=k(()=>({runtime:{sources:{},state:E??{}},render:{...ea,ownsHead:!v,enclosed:v}}),[E,v]),O=k(()=>(e=>{let t=e?.split(":")[1];return t?`plitzi_debug_${t}`:"plitzi_debug"})("undefined"==typeof window?void 0:window.location.host),[]),[_,N]=S(()=>(e=>{if("undefined"==typeof document)return!0;for(const t of document.cookie.split(";")){const n=t.indexOf("=");if(-1!==n&&t.slice(0,n).trim()===e)return"false"!==decodeURIComponent(t.slice(n+1).trim())}return!0})(O)),M=l&&_,[P]=S(()=>m||!l||"undefined"==typeof window?m:((e,t)=>(e=>e?Object.fromEntries(e.split(",").map(e=>e.split(":")).filter(([e,t])=>Ia(e)&&("1"===t||"0"===t)).map(([e,t])=>[e,"1"===t])):{})(Kn(e,Oa(t))))(Yn(),window.location.host)),L=k(()=>aM(o),[o]);g(()=>{},[]);const R=f(()=>{const e=!_;((e,t)=>{"undefined"!=typeof document&&(document.cookie=`${e}=${JSON.stringify(t)}; path=/; max-age=31536000; samesite=lax`)})(O,e),N(e)},[O,_]);(({authorized:e,onToggle:t})=>{const n=f(e=>{var n;e.shiftKey&&"F12"===e.key?t():!e.shiftKey||!e.altKey||"KeyD"!==e.code||(n=e.target)instanceof HTMLElement&&(n.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(n.tagName))||(e.preventDefault(),t())},[t]);g(()=>{if(e)return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,n])})({authorized:l,onToggle:R}),g(()=>{},[l,_,O]),g(()=>{if(M)return window.plitziTracing={lastCommitId:$u.lastCommitId,commitsSince:$u.commitsSince},()=>{delete window.plitziTracing}},[M]),g(()=>{y.isHydrating&&$u.setHydrated()},[y.isHydrating]);const j=k(()=>{const e={};return n.forEach(t,t=>{if(!u(t))return;if(t.type!==K_)return;const{renderType:n,component:r,assets:i=[],...o}=t.props;if(!n||!r)return;const a=r;a.type=n,a.assets=i,a.extraProps=o,e[n]=a}),e},[t]);"undefined"==typeof window&&L.requestUrl;const z="widget"===T?i:"undefined"==typeof window?bO:"memory"===s?qI:dO,D="widget"===T?{}:{..."memory"===s&&"undefined"!=typeof window?{}:{basename:Qn(L,"basePath","/"),location:"undefined"==typeof window?L.requestUrl??"":void 0}};/* @__PURE__ */
|
|
156
156
|
return I(zr,{value:!0,children:/* @__PURE__ */I(Oo,{value:A,middlewares:[ia(Xc("sdk")),oM(b),...M?[()=>({onChange:e=>$u.recordStoreChange(e)}),qo({shouldRecord:e=>!(e?.startsWith("runtime.elements")||e?.startsWith("rsc")||e?.startsWith("theme")||e?.startsWith("flags"))})]:[]],children:/* @__PURE__ */I(jN,{scope:w,theme:d,children:/* @__PURE__ */I(bA,{components:sM,applyColorModeClass:!1,children:/* @__PURE__ */I(DN,{scoped:"container"===w,className:Tt("plitzi-sdk","flex",C,{"sdk-debug-mode":M}),children:/* @__PURE__ */I(nC,{children:/* @__PURE__ */I(z,{...D,children:/* @__PURE__ */I(GN,{localCustomComponents:j,localComponents:uM,children:/* @__PURE__ */I(RN,{server:L,webKey:r,renderMode:T,debugMode:M,webId:b,forcedFlags:P,...y})})})})})})})})})},cM=qu(({ref:e,className:t,spaceKey:n,environment:r="main",offlineData:i})=>{const{settings:{previewMode:o}}=pu(),{server:a}=h(th),s=k(()=>void 0===i?void 0:(e=>{if(!qt(e))return{problem:"The documents cannot be drawn: they are not an object with `schema` and `style`."};const t=["schema","style"].filter(t=>void 0===e[t]);return t.length>0?{waiting:t}:(e=>void 0===FE(e.schema,e.style))(e)?{documents:e}:{problem:`The documents cannot be drawn: ${FE(e.schema,e.style)??"their shape is unknown"}.`}})(i),[i]),l=s&&"problem"in s?s.problem:void 0,c=s&&"waiting"in s?s.waiting:void 0,u=s&&"documents"in s?s.documents:void 0,d=void 0!==s&&!!n;return g(()=>{l&&console.error(`[plitziSdk] ${l}`)},[l]),g(()=>{d&&console.warn("[plitziSdk] Both `offlineData` and `spaceKey` are set: the documents are drawn, the key is not.")},[d]),/* @__PURE__ */O(wh,{ref:e,className:Tt("plitzi-component__plitzi-sdk",t,{"with__plitzi-sdk":!o}),children:[u&&/* @__PURE__ */I(lM,{offlineMode:!0,offlineData:u,environment:r,renderMode:"widget",className:"h-full w-full"}),!s&&n&&/* @__PURE__ */I(lM,{webKey:n,environment:r,server:a,renderMode:"widget",className:"h-full w-full"}),l&&!o&&/* @__PURE__ */I("p",{className:"plitzi-sdk__problem",children:l}),c&&!o&&/* @__PURE__ */O("p",{className:"plitzi-sdk__waiting",children:["Waiting for ",c.map(e=>`\`${e}\``).join(" and ")," to be bound."]})]})}),uM={plitziSdk:Object.assign(cM,{...ke,content:{...ke.content,market:{...ke.content.market,icon:/* @__PURE__ */I(q,{})}}})},dM=class extends Error{stage;log;constructor(e,t){super(`${"link"===e?"program failed to link":`${e} shader failed`}: ${t.trim()||"no log given"}`),this.name="ShaderError",this.stage=e,this.log=t}},pM=(e,t,n)=>{let r=e.createShader("vertex"===t?e.VERTEX_SHADER:e.FRAGMENT_SHADER);if(!r)throw new dM(t,"the context made no shader (it is lost)");if(e.shaderSource(r,n),e.compileShader(r),!0!==e.getShaderParameter(r,e.COMPILE_STATUS)){let n=e.getShaderInfoLog(r)??"";throw e.deleteShader(r),new dM(t,n)}return r},hM=(e,{vertex:t,fragment:n})=>{let r=pM(e,"vertex",t),i=pM(e,"fragment",n),o=e.createProgram();if(e.attachShader(o,r),e.attachShader(o,i),e.linkProgram(o),e.deleteShader(r),e.deleteShader(i),!0!==e.getProgramParameter(o,e.LINK_STATUS)){let t=e.getProgramInfoLog(o)??"";throw e.deleteProgram(o),new dM("link",t)}return o},fM="(prefers-reduced-motion: reduce)",mM=()=>"function"==typeof window.matchMedia&&window.matchMedia(fM).matches||document.documentElement.classList.contains("plitzi-reduced-motion"),gM=e=>{let t="function"==typeof window.matchMedia?window.matchMedia(fM):void 0;t?.addEventListener("change",e);let n=new MutationObserver(e);return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{t?.removeEventListener("change",e),n.disconnect()}},yM=()=>T(gM,mM,()=>!1),bM=e=>(document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)),vM=()=>"hidden"!==document.visibilityState,wM=(e,{paused:t=!1,fps:n,target:r}={})=>{let i=pu().settings.previewMode??!0,o=yM(),a=T(bM,vM,()=>!1),s=(e=>{let[t,n]=S(!0);return g(()=>{let t=e?.current;if(!t||typeof IntersectionObserver>"u")return;let r=new IntersectionObserver(e=>n(e.some(e=>e.isIntersecting)));return r.observe(t),()=>r.disconnect()},[e]),t})(r),l=i&&!o&&!t&&a&&s,c=x(e);g(()=>{c.current=e},[e]);let u=x({time:0,frame:0});return g(()=>{if(!l)return;let e,t=n&&n>0?1e3/n:0,r=0,i=0,o=n=>{let a=void 0===e?0:n-e;if(e=n,i+=a,i>=t){let e=t>0?i:a;i=t>0?i%t:0,u.current={time:u.current.time+e,frame:u.current.frame+1},c.current({...u.current,delta:e})}r=requestAnimationFrame(o)};return r=requestAnimationFrame(o),()=>cancelAnimationFrame(r)},[l,n]),{running:l}},kM=(e,{setup:t,draw:n,maxPixelRatio:r=2,paused:i,fps:o})=>{let a=(e=>`[plugin ${e?.definition?.type??"canvas"}${e?.id?` "${e.id}"`:""}]`)(h(ai)),s=x(null),[l,c]=S(null),[u,d]=S({width:0,height:0,pixelRatio:1}),[p,m]=S(),[y,b]=S(!1),[v,w]=S(0),k=x(null),T=x({acquire:e,setup:t,draw:n});g(()=>{T.current={acquire:e,setup:t,draw:n}},[e,t,n]);let C=f(e=>{let t=e instanceof Error?e.message:String(e);console.error(`${a} ${t}`),m(t)},[a]),E=f(e=>{s.current=e,c(e)},[]);g(()=>{if(!l)return;let e=()=>{let e=l.getBoundingClientRect(),t=Math.min(window.devicePixelRatio||1,r);l.width=Math.max(1,Math.round(e.width*t)),l.height=Math.max(1,Math.round(e.height*t)),d({width:e.width,height:e.height,pixelRatio:t})};if(e(),typeof ResizeObserver>"u")return;let t=new ResizeObserver(e);return t.observe(l),()=>t.disconnect()},[l,r]),g(()=>{if(!l)return;let e=e=>{e.preventDefault(),k.current=null,b(!1)},t=()=>w(e=>e+1);return l.addEventListener("webglcontextlost",e),l.addEventListener("webglcontextrestored",t),()=>{l.removeEventListener("webglcontextlost",e),l.removeEventListener("webglcontextrestored",t)}},[l]),g(()=>{if(l&&0!==u.width&&void 0===p)try{let e=T.current.acquire(l);if(!e)return void C(/* @__PURE__ */Error("the browser gave no drawing context (WebGL may be off)"));e.prepare(u);let t=T.current.setup?T.current.setup(e.context,u):void 0;k.current={handle:e,state:t}}catch(dM){C(dM)}},[l,u,v,p,C]);let A=f(e=>{let t=k.current;if(t&&void 0===p)try{t.handle.prepare(u),T.current.draw(t.handle.context,{...e,...u,state:t.state}),b(!0)}catch(e){k.current=null,C(e)}},[u,p,C]),{running:I}=wM(A,{paused:i||void 0!==p,fps:o,target:s});return g(()=>{!I&&u.width>0&&A({time:0,delta:0,frame:0})},[I,u,v,A]),{ref:E,ready:y,error:p,running:I}},xM=({attributes:e,...t})=>kM(f(t=>{let n=t.getContext("2d",e);return n&&{context:n,prepare:({pixelRatio:e})=>n.setTransform(e,0,0,e,0,0)}},[e]),t),SM=({attributes:e,...t})=>kM(f(t=>{let n=t.getContext("webgl",e);return n&&{context:n,prepare:()=>n.viewport(0,0,t.width,t.height)}},[e]),t),TM=({attributes:e,...t})=>kM(f(t=>{let n=t.getContext("webgl2",e);return n&&{context:n,prepare:()=>n.viewport(0,0,t.width,t.height)}},[e]),t),CM={mobile:`(max-width: ${yd("tablet")})`,tablet:`(max-width: ${yd("desktop")})`},EM=e=>typeof window>"u"||"function"!=typeof window.matchMedia?void 0:window.matchMedia(e),AM=()=>EM(CM.mobile)?.matches?"mobile":EM(CM.tablet)?.matches?"tablet":"desktop",IM=e=>{let t=[EM(CM.mobile),EM(CM.tablet)].filter(e=>void 0!==e);return t.forEach(t=>{t.addEventListener("change",e)}),()=>{t.forEach(t=>{t.removeEventListener("change",e)})}},OM=()=>"desktop",_M=()=>T(IM,AM,OM),NM=e=>{let[t,n]=S(void 0);return g(()=>{let t=e.current;if(!t||typeof ResizeObserver>"u")return;let r=(e,t)=>n(n=>n?.width===e&&n.height===t?n:{width:e,height:t}),i=t.getBoundingClientRect();r(i.width,i.height);let o=new ResizeObserver(e=>{e.slice(-1).forEach(e=>r(e.contentRect.width,e.contentRect.height))});return o.observe(t),()=>o.disconnect()},[e]),t},MM=e=>{const t=h(Ap);return f(async(n,r={})=>{if(!t)return console.warn(`[plitzi] useServerAction: nothing on this page runs server actions, so "${e}" was skipped`),{ok:!1,runId:"",reason:"skipped"};const i=await t({actionId:e,input:n,...r});return"completed"!==i.status?{ok:!1,runId:i.runId,reason:i.reason??i.status,...i.error?{error:i.error}:{}}:{ok:!0,runId:i.runId,output:i.output}},[e,t])},PM=(e,t)=>new Promise(n=>{const r=document.createElement("link");r.rel="stylesheet",r.href=e,r.dataset.plitziPlugin=t,r.onload=()=>n(),r.onerror=()=>n(),document.head.append(r)}),LM=(e,{load:t,css:n,declaration:r})=>{let i;const o=(r,{content:s,version:l,initialItems:c,plugins:u})=>{const p=d(async()=>({default:r.reduce((t,n)=>{const r=t.plugins?.[n];if(!r)throw new Error(`[plitzi] plugin "${e}" was loaded without the "${n}" it declared`);return r},await(i??=Promise.all([t(),n?PM(n,e):void 0]).then(([e])=>e.default)))})),h=e=>/* @__PURE__ */I(a,{fallback:null,children:/* @__PURE__ */I(p,{...e})});return h.displayName=`Deferred(${r.at(-1)??e})`,Object.assign(h,{content:s,version:l,initialItems:c,plugins:u?Object.fromEntries(Object.entries(u).map(([e,t])=>[e,o([...r,e],t)])):void 0})};return o([],r)},RM=e=>{try{return JSON.stringify({...e},(e,t)=>"function"==typeof t?void 0:t)}catch{return}},jM=e=>{const t=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map,r=/* @__PURE__ */new Map;return{plugins:Object.fromEntries(Object.entries(e).map(([e,i])=>{t.set(e,i.component);const o=((e,r)=>{const i=(e=>t=>{const r=n.get(e)??/* @__PURE__ */new Set;return r.add(t),n.set(e,r),()=>{r.delete(t)}})(e),o=()=>t.get(e)??r,a=e=>{const t=T(i,o,o);/* @__PURE__ */
|
|
157
157
|
return I(t,{...e})};return a.displayName=`Hot(${r.displayName??r.name})`,Object.assign(a,r)})(e,i.component);return r.set(e,o),[e,{...i,component:o}]})),replace:(e,i)=>{const o=t.get(e),a=r.get(e);return!(!o||!a||RM(o)!==RM(i)||(t.set(e,i),n.get(e)?.forEach(e=>{e()}),0))}}};Promise.resolve({ });var zM=e=>Object.values(e?.schema.flat??{}).some(e=>"server"===e.definition.runtime);function DM(e,t={},n={},r=!1,i=!1,{hotPlugins:o=!1}={}){const a=Object.fromEntries(Object.entries(n).map(([e,t])=>{if("component"in t)return[e,t];const{load:n,css:r,declaration:i,...o}=t;return[e,{...o,component:LM(e,{load:n,css:r,declaration:i})}]})),s=o?jM(a):void 0,l=s?.plugins??a,{actionRuns:c,styleCacheInDocument:u,...d}=(e=>{if(e.analytics||e.offlineMode||!e.webKey)return e;const{apiServer:t}=aM(e.server);return t?{...e,analytics:{endpoint:`${t.replace(/\/+$/,"")}/v1/collect`,key:e.webKey}}:e})(t),p="undefined"!=typeof document?document.getElementById(e):void 0,h=u?((e,t)=>{const{offlineData:n}=e;if(!n||!t)return e;const r=(e=>{let t=e.querySelector('style[data-id="plitzi-runtime-style"]')?.textContent??"",n=t.indexOf(_d),r=t.indexOf(Nd,n);if(!(n<0||r<0))return t.slice(n+22,r)})(t);return void 0===r?(console.error("[plitzi] The server-rendered stylesheet is missing from the page: it renders without its styles."),e):{...e,offlineData:{...n,style:{...n.style,cache:r}}}})(d,p):d,m=h.debugMode??r;m&&c?.length&&pa(c);let y,b=h.offlineData;const v=({isHydrating:e=!1})=>{const[t,n]=S(h.offlineData);g(()=>(y=n,()=>{y=void 0}),[]);const[r,i]=S(!e);g(()=>i(!0),[]);const o=Object.keys(l).filter(e=>r||!l[e].clientOnly);m||(()=>{if(typeof window>"u")return;let e=()=>{},t=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;"object"==typeof t&&Object.keys(t).forEach(n=>{let r=t[n];t[n]="function"==typeof r?e:null})})();const a=f(e=>{Q_=e},[]),s=f(e=>{eN=e},[]);/* @__PURE__ */
|
|
158
|
-
return I(lM,{...h,offlineData:t,debugMode:m,isHydrating:e,onInitStateManager:a,onInitEventBridge:s,children:o.filter(e=>!!l[e].component).map(e=>/* @__PURE__ */I(tN.Plugin,{renderType:e,component:l[e].component,...l[e].props},e))})};if(!p)return;const w=i?E(p,/* @__PURE__ */I(v,{isHydrating:!0})):C(p);return i||w.render(/* @__PURE__ */I(v,{})),{unmount:()=>w.unmount(),replacePlugin:(e,t)=>s?.replace(e,t)??!1,replaceSpace:e=>!(!y||!h.offlineMode||zM(b)||zM(e)||(b=e,y(e),0))}}var $M=({debugMode:e=!1,isHydrating:t=!1,children:n,webKey:r="",environment:i="main",renderMode:o=ea.renderMode,...a})=>/* @__PURE__ */I(lM,{...a,isHydrating:t,renderMode:o,debugMode:e,webKey:r,environment:i,children:n});$M.Plugin=tN.Plugin;var FM="0.38.
|
|
158
|
+
return I(lM,{...h,offlineData:t,debugMode:m,isHydrating:e,onInitStateManager:a,onInitEventBridge:s,children:o.filter(e=>!!l[e].component).map(e=>/* @__PURE__ */I(tN.Plugin,{renderType:e,component:l[e].component,...l[e].props},e))})};if(!p)return;const w=i?E(p,/* @__PURE__ */I(v,{isHydrating:!0})):C(p);return i||w.render(/* @__PURE__ */I(v,{})),{unmount:()=>w.unmount(),replacePlugin:(e,t)=>s?.replace(e,t)??!1,replaceSpace:e=>!(!y||!h.offlineMode||zM(b)||zM(e)||(b=e,y(e),0))}}var $M=({debugMode:e=!1,isHydrating:t=!1,children:n,webKey:r="",environment:i="main",renderMode:o=ea.renderMode,...a})=>/* @__PURE__ */I(lM,{...a,isHydrating:t,renderMode:o,debugMode:e,webKey:r,environment:i,children:n});$M.Plugin=tN.Plugin;var FM="0.38.20",qM=()=>Q_,BM=()=>eN;export{Co as A,gr as B,_a as C,hi as ComponentContext,GN as ComponentProvider,aa as D,ua as E,Jr as F,Jn as H,Wr as I,Th as JsxManager,jr as L,ji as M,Ni as N,Bo as O,Si as P,hu as PlitziProvider,Lh as PluginManager,fi as PluginRemote,Da as PluginsContext,Rr as R,Rh as ReplicaProvider,wh as RootElement,nl as S,dM as ShaderError,fa as T,Tt as U,Qn as V,yu as _,nN as a,Pc as b,nA as c,hM as createShaderProgram,qS as d,$M as default,RE as elementChildren,$m as f,$u as g,BM as getEventBridge,qM as getStateManager,bd as h,lN as i,Eo as j,$o as k,QE as l,Vd as m,wN as n,gA as o,Lm as p,kN as r,DM as render,lA as s,uM as sdkComponents,AN as t,EO as track,WE as u,wM as useAnimationFrame,xM as useCanvas2d,$C as useChannel,_M as useDisplayMode,Bu as useElement,NM as useElementSize,zE as useElementVisible,PE as useFlag,L_ as useNotify,pu as usePlitzi,ud as usePluginRoute,DE as usePluginTrigger,yM as useReducedMotion,dd as useRscData,cd as useRscRefresh,MM as useServerAction,Vo as useStore,SM as useWebGL,TM as useWebGL2,Gc as v,FM as version,Na as w,qu as withElement,rl as x,Fc as y,Pr as z};
|
package/dist/plitzi-sdk.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/plitzi-sdk",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.20",
|
|
4
4
|
"homepage": "./",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"files": [
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"@fortawesome/fontawesome-free": "^7.3.1",
|
|
34
34
|
"@plitzi/nexus": "^1.4.0",
|
|
35
35
|
"@plitzi/plitzi-ui": "^1.6.34",
|
|
36
|
-
"@plitzi/sdk-auth": "0.38.
|
|
37
|
-
"@plitzi/sdk-dev-tools": "0.38.
|
|
38
|
-
"@plitzi/sdk-elements": "0.38.
|
|
39
|
-
"@plitzi/sdk-event-bridge": "0.38.
|
|
40
|
-
"@plitzi/sdk-interactions": "0.38.
|
|
41
|
-
"@plitzi/sdk-navigation": "0.38.
|
|
42
|
-
"@plitzi/sdk-plugins": "0.38.
|
|
43
|
-
"@plitzi/sdk-schema": "0.38.
|
|
44
|
-
"@plitzi/sdk-shared": "0.38.
|
|
45
|
-
"@plitzi/sdk-style": "0.38.
|
|
46
|
-
"@plitzi/sdk-variables": "0.38.
|
|
36
|
+
"@plitzi/sdk-auth": "0.38.20",
|
|
37
|
+
"@plitzi/sdk-dev-tools": "0.38.20",
|
|
38
|
+
"@plitzi/sdk-elements": "0.38.20",
|
|
39
|
+
"@plitzi/sdk-event-bridge": "0.38.20",
|
|
40
|
+
"@plitzi/sdk-interactions": "0.38.20",
|
|
41
|
+
"@plitzi/sdk-navigation": "0.38.20",
|
|
42
|
+
"@plitzi/sdk-plugins": "0.38.20",
|
|
43
|
+
"@plitzi/sdk-schema": "0.38.20",
|
|
44
|
+
"@plitzi/sdk-shared": "0.38.20",
|
|
45
|
+
"@plitzi/sdk-style": "0.38.20",
|
|
46
|
+
"@plitzi/sdk-variables": "0.38.20",
|
|
47
47
|
"clsx": "^2.1.1",
|
|
48
48
|
"react-router-dom": "^7.18.4"
|
|
49
49
|
},
|