@engenty/wizards-runtime 0.17.0 → 0.17.2
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/apps/runtime/dist/app.js +2 -0
- package/apps/runtime/dist/broker/account.js +20 -1
- package/apps/runtime/dist/broker/call.js +116 -20
- package/apps/runtime/dist/broker/host.js +8 -2
- package/apps/runtime/dist/broker/index.js +3 -2
- package/apps/runtime/dist/broker/log.js +149 -14
- package/apps/runtime/dist/broker/over.js +38 -0
- package/apps/runtime/dist/broker/rights.js +192 -0
- package/apps/runtime/dist/broker/rwx.js +295 -51
- package/apps/runtime/dist/broker/send.js +25 -12
- package/apps/runtime/dist/bundles/discover.js +133 -0
- package/apps/runtime/dist/bundles/fetch.js +119 -0
- package/apps/runtime/dist/bundles/index.js +621 -0
- package/apps/runtime/dist/bundles/read.js +607 -0
- package/apps/runtime/dist/connectors/external.js +540 -61
- package/apps/runtime/dist/connectors/person-sign-ins.js +1 -0
- package/apps/runtime/dist/connectors/reload.js +73 -0
- package/apps/runtime/dist/connectors/space-connections.js +73 -6
- package/apps/runtime/dist/db/migrations/tenant/0058_mcp_state_across_roles.sql +26 -0
- package/apps/runtime/dist/db/migrations/tenant/0059_space_connection_paused.sql +2 -0
- package/apps/runtime/dist/db/migrations/tenant/0060_space_bundle.sql +21 -0
- package/apps/runtime/dist/db/migrations/tenant/0061_space_connection_limits.sql +2 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0058_snapshot.json +6696 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0059_snapshot.json +6710 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0060_snapshot.json +6857 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0061_snapshot.json +6871 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +28 -0
- package/apps/runtime/dist/db/schema.js +81 -3
- package/apps/runtime/dist/docs/dev/broker.md +312 -32
- package/apps/runtime/dist/docs/dev/skills.md +8 -1
- package/apps/runtime/dist/docs/user-guide/capabilities.md +127 -5
- package/apps/runtime/dist/docs/user-guide/connectors.md +103 -5
- package/apps/runtime/dist/docs/user-guide/protocol.md +15 -4
- package/apps/runtime/dist/docs/user-guide/skills.md +11 -1
- package/apps/runtime/dist/docs/user-guide/test-and-share.md +1 -1
- package/apps/runtime/dist/elements/caller.js +2 -2
- package/apps/runtime/dist/engenty/connections-external/build-connector.js +23 -8
- package/apps/runtime/dist/engenty/connections-external/import-service.js +18 -9
- package/apps/runtime/dist/engenty/connections-external/importer/classify.js +12 -0
- package/apps/runtime/dist/engenty/connections-external/invoke/http-invoker.js +1 -0
- package/apps/runtime/dist/engenty/connections-external/net/guarded-fetch.js +6 -3
- package/apps/runtime/dist/engenty/connections-sdk/oauth2.js +2 -2
- package/apps/runtime/dist/engenty/shims/web-ingest.js +64 -0
- package/apps/runtime/dist/engine/resources.js +15 -6
- package/apps/runtime/dist/engine/runner.js +2 -1
- package/apps/runtime/dist/env.js +2 -0
- package/apps/runtime/dist/index.js +11 -2
- package/apps/runtime/dist/mcp/handler.js +2 -2
- package/apps/runtime/dist/mcp/seen.js +71 -51
- package/apps/runtime/dist/mcp/tools.js +5 -1
- package/apps/runtime/dist/prompts/mcp.md +1 -1
- package/apps/runtime/dist/prompts/tools.md +16 -0
- package/apps/runtime/dist/routes/broker.js +1 -1
- package/apps/runtime/dist/routes/bundles.js +91 -0
- package/apps/runtime/dist/routes/connections.js +14 -3
- package/apps/runtime/dist/routes/discover.js +1 -0
- package/apps/runtime/dist/routes/rules.js +53 -9
- package/apps/runtime/dist/routes/studio.js +23 -18
- package/apps/runtime/dist/services/cloud.js +2 -0
- package/apps/runtime/dist/services/discover.js +9 -3
- package/apps/runtime/dist/services/draft-events.js +79 -6
- package/apps/runtime/dist/services/files.js +2 -2
- package/apps/runtime/dist/services/skills.js +61 -5
- package/apps/runtime/dist/services/space-index.js +113 -11
- package/apps/runtime/dist/services/synced-spaces.js +5 -1
- package/apps/runtime/dist/services/wizards.js +48 -2
- package/apps/runtime/dist/sharing/jobs.js +6 -2
- package/apps/runtime/dist/sync/records.js +6 -1
- package/apps/runtime/dist/texts.js +36 -1
- package/apps/runtime/dist/tools/connections.js +8 -0
- package/apps/runtime/dist/tools/connector.js +13 -1
- package/apps/runtime/dist/tools/index.js +8 -3
- package/apps/runtime/dist/tools/skills.js +11 -1
- package/apps/web/dist/assets/{AboutDialog-B2Xmxyj4.js → AboutDialog-NzB-GEj_.js} +1 -1
- package/apps/web/dist/assets/{BlockEditor-D0HoUSih.js → BlockEditor-HyDf8fOb.js} +1 -1
- package/apps/web/dist/assets/Bundle-B0Bhs0By.js +1 -0
- package/apps/web/dist/assets/CapabilitiesPage-CQSaMsWK.js +2 -0
- package/apps/web/dist/assets/{ChangelogDialog-BIrJbAKi.js → ChangelogDialog-Ngxuqubx.js} +1 -1
- package/apps/web/dist/assets/{CodeEditor-DUVcXI5P.js → CodeEditor-C2LBf4pS.js} +1 -1
- package/apps/web/dist/assets/EditorPage-Dysvvadu.js +3 -0
- package/apps/web/dist/assets/{FlowPreview-BIag8_Be.js → FlowPreview-CGfSaeYu.js} +1 -1
- package/apps/web/dist/assets/LangSwitch-B7UQlGh5.js +1 -0
- package/apps/web/dist/assets/Marketplace-BkIxd1PW.js +2 -0
- package/apps/web/dist/assets/{NewWizardChannels-DI3SQ4iS.js → NewWizardChannels-BWLaVFld.js} +1 -1
- package/apps/web/dist/assets/NewWizardPage-BpRd8tDF.js +7 -0
- package/apps/web/dist/assets/OnboardingPage-ScEcQcR0.js +1 -0
- package/apps/web/dist/assets/PreviewPane-CaC1FYxZ.js +7 -0
- package/apps/web/dist/assets/ProtocolSection-CILRCYLD.js +1 -0
- package/apps/web/dist/assets/PublicRunner-DHX431Pr.js +1 -0
- package/apps/web/dist/assets/{ReadOnly-CWf5x74a.js → ReadOnly-DqS1UDQs.js} +1 -1
- package/apps/web/dist/assets/SettingsPage-Dp2-rHXu.js +2 -0
- package/apps/web/dist/assets/SetupPage-mzMLQcD5.js +1 -0
- package/apps/web/dist/assets/SharePage-CBDgqEH7.js +1 -0
- package/apps/web/dist/assets/SkillEditor-Cf6FqkkU.js +1 -0
- package/apps/web/dist/assets/{Skills-CN4QE7Kx.js → Skills-DqV5Oqqu.js} +5 -5
- package/apps/web/dist/assets/SpacePage-C3SXe2hs.js +2 -0
- package/apps/web/dist/assets/{UpdateCheck-QhBI3rlQ.js → UpdateCheck-B51jMIhp.js} +2 -2
- package/apps/web/dist/assets/brand-CG35IRgr.js +2 -0
- package/apps/web/dist/assets/changelog-DN6sziTl.js +1 -0
- package/apps/web/dist/assets/{code-editor-DkPo1C-L.js → code-editor-Bsyy7cuT.js} +2 -2
- package/apps/web/dist/assets/{host-D6H6Z9Jp.js → host-DaDyLfqT.js} +16 -16
- package/apps/web/dist/assets/i18n-CyrHWeGk.js +55 -0
- package/apps/web/dist/assets/index-Db9JthZr.css +1 -0
- package/apps/web/dist/assets/index-LjwVRoki.js +10 -0
- package/apps/web/dist/assets/minus-BpYkOkYw.js +1 -0
- package/apps/web/dist/assets/plug-De3mHDFV.js +1 -0
- package/apps/web/dist/assets/{read-aloud-CnFwDSGD.js → read-aloud-DCTouK7J.js} +1 -1
- package/apps/web/dist/assets/{runners-0sTPbWzr.js → runners-DtiBHvG7.js} +1 -1
- package/apps/web/dist/assets/session-DKGZUy6h.js +1 -0
- package/apps/web/dist/assets/{theme-CkNTe-_Z.js → theme-Bcj8TXQr.js} +2 -2
- package/apps/web/dist/assets/{ui-DAk_vjrL.js → ui-C6vSmisV.js} +1 -1
- package/apps/web/dist/assets/{useMutation-isHfB33W.js → useMutation-B8hJ5Z6N.js} +1 -1
- package/apps/web/dist/assets/{viewers-ijNZHJFG.js → viewers-b9FdC42r.js} +2 -2
- package/apps/web/dist/assets/{volume-2-BqlBtCIJ.js → volume-2-B1roRk6x.js} +1 -1
- package/apps/web/dist/index.html +15 -13
- package/apps/web/dist/mcp/flow.html +2 -2
- package/node_modules/@engenty/wizards-shared/dist/bundles.d.ts +219 -0
- package/node_modules/@engenty/wizards-shared/dist/bundles.js +19 -0
- package/node_modules/@engenty/wizards-shared/dist/connectors.d.ts +105 -4
- package/node_modules/@engenty/wizards-shared/dist/connectors.js +6 -0
- package/node_modules/@engenty/wizards-shared/dist/discover.d.ts +28 -1
- package/node_modules/@engenty/wizards-shared/dist/run.d.ts +8 -0
- package/node_modules/@engenty/wizards-shared/dist/run.js +16 -0
- package/node_modules/@engenty/wizards-shared/dist/rwx.d.ts +84 -1
- package/node_modules/@engenty/wizards-shared/dist/rwx.js +69 -1
- package/node_modules/@engenty/wizards-shared/dist/skills.d.ts +20 -3
- package/node_modules/@engenty/wizards-shared/dist/skills.js +5 -2
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugin.json +1 -1
- package/apps/web/dist/assets/CapabilitiesPage-C1th2cZE.js +0 -2
- package/apps/web/dist/assets/EditorPage-56sIqEfF.js +0 -3
- package/apps/web/dist/assets/LangSwitch-CJ00IgaO.js +0 -1
- package/apps/web/dist/assets/Marketplace-D7-ot9Dz.js +0 -2
- package/apps/web/dist/assets/NewWizardPage-CytheHxX.js +0 -7
- package/apps/web/dist/assets/OnboardingPage-_91Pa8Ad.js +0 -1
- package/apps/web/dist/assets/PreviewPane-BDsYm-_K.js +0 -7
- package/apps/web/dist/assets/ProtocolSection-D_zaxHEL.js +0 -1
- package/apps/web/dist/assets/PublicRunner-CEgXSk3r.js +0 -1
- package/apps/web/dist/assets/SettingsPage-Dr8SDk-L.js +0 -2
- package/apps/web/dist/assets/SetupPage-B68n0l4I.js +0 -1
- package/apps/web/dist/assets/SharePage-DfznN7ar.js +0 -1
- package/apps/web/dist/assets/SkillEditor-BIcIczRc.js +0 -1
- package/apps/web/dist/assets/SpacePage-DiVTwhnJ.js +0 -2
- package/apps/web/dist/assets/changelog-a_CuplMX.js +0 -1
- package/apps/web/dist/assets/i18n-BaPKbQ1s.js +0 -55
- package/apps/web/dist/assets/index-CCUG6Vnh.css +0 -1
- package/apps/web/dist/assets/index-De0Wb42y.js +0 -10
- package/apps/web/dist/assets/session-BMiUrqHg.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t}from"./jsx-runtime-BNakU3Ej.js";import{Cr as n,Dr as r,Lr as i,Pr as a,Rr as o,Sr as s,Tr as c,Vr as l,kr as u}from"./ui-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t}from"./jsx-runtime-BNakU3Ej.js";import{Cr as n,Dr as r,Lr as i,Pr as a,Rr as o,Sr as s,Tr as c,Vr as l,kr as u}from"./ui-C6vSmisV.js";var d=class extends s{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||f(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},i=this.#r=n({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),a=this.state.status===`pending`,o=!i.canStart();try{if(a)t();else{this.#i({type:`pending`,variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:o})}let n=await i.start();return await this.#n.config.onSuccess?.(n,e,this.state.context,this,r),await this.options.onSuccess?.(n,e,this.state.context,r),await this.#n.config.onSettled?.(n,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(n,null,e,this.state.context,r),this.#i({type:`success`,data:n}),n}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,r)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,r)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===i&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),c.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function f(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var p=class extends r{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),i(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&u(t.mutationKey)!==u(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??f();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){c.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},m=e(t(),1);function h(e,t){let n=l(t),[r]=m.useState(()=>new p(n,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);let i=m.useSyncExternalStore(m.useCallback(e=>r.subscribe(c.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=m.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(a)},[r]);if(i.error&&o(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}export{d as n,h as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BlockEditor-
|
|
2
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{hn as r,un as i}from"./ui-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BlockEditor-HyDf8fOb.js","assets/rolldown-runtime-hePW80VL.js","assets/jsx-runtime-BNakU3Ej.js","assets/react-dom-hf6EcyAr.js","assets/marked.esm-DQ7XA7AC.js","assets/code-DsnwzN1x.js","assets/list-checks-DaxmUPqK.js","assets/link-CPL8pB1P.js","assets/table-5B9G3oA6.js","assets/floating-ui.dom-pwdNGv4b.js","assets/upload-CAlHC232.js","assets/i18n-CyrHWeGk.js","assets/with-selector-CoMyWBAX.js","assets/w3c-keyname-BOAvb0qz.js","assets/BlockEditor-CtW6lw0y.css","assets/pdf-Dg-raaUo.js","assets/preload-helper-DpV6A1kQ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{hn as r,un as i}from"./ui-C6vSmisV.js";import{t as a}from"./preload-helper-DpV6A1kQ.js";import{n as o,s}from"./i18n-CyrHWeGk.js";import{t as c}from"./code-editor-Bsyy7cuT.js";import{r as l}from"./dist-CQpLJoQZ.js";var u=e(t(),1),d=e(n(),1),f=(0,u.lazy)(()=>a(()=>import(`./BlockEditor-HyDf8fOb.js`).then(e=>({default:e.BlockEditor})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),p=20971520,m=2097152;async function h(e,t){let n=await fetch(e,{credentials:`include`});if(!n.ok)throw Error(`${n.status} ${n.statusText}`);if(Number(n.headers.get(`content-length`)??0)>t)throw new g;let r=await n.arrayBuffer();if(r.byteLength>t)throw new g;return r}var g=class extends Error{};function _(e,t){let[n,r]=(0,u.useState)({});return(0,u.useEffect)(()=>{let t=!0;return r({}),e().then(e=>t&&r({value:e}),e=>t&&r({error:e instanceof g?s(`viewer.tooLarge`):String(e)})),()=>{t=!1}},[t]),n}var v=`h-[70dvh] w-full rounded-b-xl`;function y(){return(0,d.jsx)(`div`,{className:`flex h-40 items-center justify-center text-ink-3`,children:(0,d.jsx)(i,{})})}function b({error:e}){return(0,d.jsx)(`p`,{className:`px-4 py-8 text-center text-[0.875rem] text-ink-3`,children:e})}function x({kind:e,url:t,name:n,page:r,plain:i}){switch(e){case`pdf`:return(0,d.jsx)(C,{url:t,page:r});case`image`:return(0,d.jsx)(`img`,{src:t,alt:``,className:`mx-auto max-h-[70dvh] object-contain p-4`});case`sheet`:return(0,d.jsx)(O,{url:t,name:n,sheet:r});case`html`:return(0,d.jsx)(A,{url:t,name:n});case`text`:return/\.(md|markdown)$/i.test(n)?(0,d.jsx)(P,{url:t,name:n,plain:i}):(0,d.jsx)(F,{url:t,name:n})}}async function S(e){let[t,n]=await Promise.all([a(()=>import(`./pdf-Dg-raaUo.js`),__vite__mapDeps([15,16])),a(()=>import(`./pdf.worker.min-68CMzziE.js`),[])]);return t.GlobalWorkerOptions.workerSrc=n.default,t.getDocument({data:new Uint8Array(await h(e,p))}).promise}function C({url:e,page:t}){let{value:n,error:i}=_(()=>S(e),e),a=(0,u.useRef)(null),[c,l]=(0,u.useState)(0),[f,p]=(0,u.useState)(Math.SQRT2),[m,h]=(0,u.useState)(t??1);return(0,u.useEffect)(()=>{let e=a.current;if(!e)return;let t=()=>l(e.clientWidth-32);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]),(0,u.useEffect)(()=>(n?.getPage(1).then(e=>{let t=e.getViewport({scale:1});p(t.height/t.width)}),()=>{n?.loadingTask.destroy()}),[n]),(0,u.useEffect)(()=>{!n||!c||!t||t<2||a.current?.querySelector(`[data-page="${t}"]`)?.scrollIntoView({block:`start`})},[n,c,t]),(0,d.jsxs)(`div`,{className:`relative`,children:[(0,d.jsx)(`div`,{ref:a,className:r(v,`overflow-y-auto bg-paper-2`),onScroll:e=>{let t=e.currentTarget,r=c*f+16;h(Math.min(n?.numPages??1,Math.floor(t.scrollTop/r+.5)+1))},children:i?(0,d.jsx)(b,{error:i}):!n||!c?(0,d.jsx)(y,{}):(0,d.jsx)(`div`,{className:`flex flex-col items-center gap-4 p-4`,children:Array.from({length:n.numPages},(e,t)=>(0,d.jsx)(w,{doc:n,n:t+1,width:c,height:c*f,root:a.current},t+1))})}),n&&n.numPages>1?(0,d.jsx)(`span`,{className:`pointer-events-none absolute right-4 bottom-3 rounded-full bg-ink/70 px-2.5 py-1 text-[0.75rem] text-paper tabular-nums`,children:s(`viewer.pageOf`,{n:m.toLocaleString(o),total:n.numPages.toLocaleString(o)})}):null]})}function w({doc:e,n:t,width:n,height:r,root:i}){let a=(0,u.useRef)(null),[o,s]=(0,u.useState)(!1);return(0,u.useEffect)(()=>{let e=a.current;if(!e)return;let t=new IntersectionObserver(([e])=>s(!!e?.isIntersecting),{root:i,rootMargin:`800px 0px`});return t.observe(e),()=>t.disconnect()},[i]),(0,u.useEffect)(()=>{let r=a.current;if(!o||!r)return;let i=null;return e.getPage(t).then(e=>{let t=n/e.getViewport({scale:1}).width*(window.devicePixelRatio||1),a=e.getViewport({scale:t});r.width=Math.floor(a.width),r.height=Math.floor(a.height);let o=e.render({canvas:r,viewport:a});i=o,o.promise.catch(()=>void 0)}),()=>i?.cancel()},[o,e,t,n]),(0,d.jsx)(`canvas`,{ref:a,"data-page":t,style:{width:n,height:r},className:`shrink-0 bg-white shadow-[var(--shadow-ember-soft)]`})}async function T(e,t){let[n,r]=await Promise.all([a(()=>import(`./xlsx-CuSbHU4R.js`),[]),h(e,p)]),i=/\.(csv|tsv)$/i.test(t)?n.read(new TextDecoder().decode(r),{type:`string`,dense:!0,raw:!0}):n.read(r,{type:`array`,cellDates:!0,dense:!0,dateNF:`yyyy-mm-dd`,sheetStubs:!0});return i.SheetNames.map(e=>{let t=i.Sheets[e],r=t?.[`!ref`];if(!t||!r)return{name:e,rows:[]};let a=n.utils.decode_range(r),o=t[`!data`]??[],s=[];for(let e=a.s.r;e<=a.e.r;e++){let t=[];for(let n=a.s.c;n<=a.e.c;n++){let r=o[e]?.[n];t.push(r?r.t===`z`?r.f?`=${r.f}`:``:r.w??String(r.v??``):``)}s.push(t)}for(;s.length&&s[s.length-1]?.every(e=>e===``);)s.pop();let c=Math.max(0,...s.map(e=>e.findLastIndex(e=>e!==``)+1));return{name:e,rows:s.map(e=>e.slice(0,c))}})}function E(e){let t=``,n=e;do t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26)-1;while(n>=0);return t}var D=1e3;function O({url:e,name:t,sheet:n}){let{value:i,error:a}=_(()=>T(e,t),e),[o,c]=(0,u.useState)(Math.max(0,(n??1)-1));if(a)return(0,d.jsx)(b,{error:a});if(!i)return(0,d.jsx)(y,{});let l=i[o]??i[0],f=/\.(csv|tsv)$/i.test(t),p=f?l?.rows[0]??[]:null,m=(f?l?.rows.slice(1):l?.rows)??[],h=Math.max(p?.length??0,...m.map(e=>e.length));return(0,d.jsxs)(`div`,{className:`flex flex-col`,children:[i.length>1?(0,d.jsx)(`div`,{className:`flex gap-1 overflow-x-auto border-border-soft border-b px-2 py-1.5`,children:i.map((e,t)=>(0,d.jsx)(`button`,{type:`button`,"aria-pressed":t===o,onClick:()=>c(t),className:r(`shrink-0 rounded-md px-2.5 py-1 text-[0.8125rem] transition`,t===o?`bg-paper-2 font-medium text-ink`:`text-ink-3 hover:text-ink`),children:e.name},e.name))}):null,(0,d.jsxs)(`div`,{className:`max-h-[70dvh] overflow-auto`,children:[(0,d.jsxs)(`table`,{className:`border-separate border-spacing-0 text-[0.8125rem]`,children:[(0,d.jsx)(`thead`,{className:`sticky top-0 z-[1] bg-card`,children:(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`th`,{className:`sticky left-0 z-[1] border-border-soft border-r border-b bg-card px-2 py-1`}),Array.from({length:h},(e,t)=>(0,d.jsx)(`th`,{className:`whitespace-nowrap border-border-soft border-r border-b px-2 py-1 text-left font-medium text-ink-3`,children:p?p[t]:E(t)},t))]})}),(0,d.jsx)(`tbody`,{children:m.slice(0,D).map((e,t)=>(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`td`,{className:`sticky left-0 border-border-soft border-r border-b bg-card px-2 py-1 text-right text-ink-4 tabular-nums`,children:t+(f?2:1)}),Array.from({length:h},(t,n)=>(0,d.jsx)(`td`,{className:`max-w-80 truncate whitespace-nowrap border-border-soft border-r border-b px-2 py-1 text-ink-2`,title:e[n]&&e[n].length>40?e[n]:void 0,children:e[n]},n))]},t))})]}),m.length>D?(0,d.jsx)(`p`,{className:`px-3 py-2 text-[0.8125rem] text-ink-3`,children:s(`viewer.moreRows`,{n:m.length-D})}):null]})]})}var k=async(e,t)=>new TextDecoder().decode(await h(e,t));function A({url:e,name:t}){let{value:n,error:i}=_(()=>k(e,m),e);return i?(0,d.jsx)(b,{error:i}):n===void 0?(0,d.jsx)(y,{}):(0,d.jsx)(`iframe`,{srcDoc:n,title:t,sandbox:`allow-scripts allow-popups allow-popups-to-escape-sandbox`,referrerPolicy:`no-referrer`,className:r(v,`bg-white`)})}var j=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n|$)/;function M(e){let t=e.match(j);return t?{props:t[1].split(/\r?\n/).map(e=>e.match(/^([\w.-]+):\s*(.*)$/)).filter(e=>!!e).map(e=>[e[1],e[2].replace(/^["']|["']$/g,``)]),body:e.slice(t[0].length)}:{props:[],body:e}}var N=e=>/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`//`);function P({url:e,name:t,plain:n}){let{value:i,error:a}=_(()=>k(e,m),e),[o,c]=(0,u.useState)(!1);if(a)return(0,d.jsx)(b,{error:a});if(i===void 0)return(0,d.jsx)(y,{});let{props:l,body:p}=M(i),h=(e,t,n)=>(0,d.jsx)(`button`,{type:`button`,"aria-pressed":e,onClick:n,className:r(`rounded-md px-2.5 py-1 text-[0.8125rem] transition`,e?`bg-paper-2 font-medium text-ink`:`text-ink-3 hover:text-ink`),children:t});return(0,d.jsxs)(`div`,{className:`flex flex-col`,children:[n?null:(0,d.jsxs)(`div`,{className:`flex items-center gap-1 border-border-soft border-b px-2 py-1.5`,children:[h(!o,s(`viewer.read`),()=>c(!1)),h(o,s(`blocks.markdown`),()=>c(!0))]}),o?(0,d.jsx)(F,{url:e,name:t}):(0,d.jsxs)(`div`,{className:`flex flex-col`,children:[l.length?(0,d.jsx)(`dl`,{className:r(`grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-1 text-[0.8125rem]`,n?`px-1 pb-2`:`border-border-soft border-b px-5 py-3`),children:l.map(([e,t])=>(0,d.jsxs)(`div`,{className:`contents`,children:[(0,d.jsx)(`dt`,{className:`text-ink-3`,children:e}),(0,d.jsx)(`dd`,{className:`min-w-0 break-words text-ink-2`,children:t})]},e))}):null,(0,d.jsx)(u.Suspense,{fallback:(0,d.jsx)(y,{}),children:(0,d.jsx)(f,{text:p,onChange:()=>void 0,readOnly:!0,targets:[],resolve:t=>N(t)?t:new URL(t,e).href,onOpen:e=>{N(e)&&window.open(e,`_blank`,`noopener`)},ariaLabel:t})})]})]})}function F({url:e,name:t}){let{value:n,error:r}=_(()=>k(e,m),e);return r?(0,d.jsx)(b,{error:r}):n===void 0?(0,d.jsx)(y,{}):(0,d.jsx)(c,{value:n,onChange:()=>void 0,readOnly:!0,extensions:[l.editable.of(!1)],language:/\.json$/i.test(t)?`json`:`markdown`,ariaLabel:t,className:`max-h-[70dvh] overflow-auto sm:[&_.cm-content]:py-4 sm:[&_.cm-line]:px-4`})}export{x as Viewer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e}from"./marked.esm-DQ7XA7AC.js";var t={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};t.node;var n=e(t),r={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};r.node;var i=e(r),a={name:`
|
|
1
|
+
import{d as e}from"./marked.esm-DQ7XA7AC.js";var t={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};t.node;var n=e(t),r={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};r.node;var i=e(r),a={name:`volume-2`,size:24,node:[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]};a.node;var o=e(a);export{i as n,n as r,o as t};
|
package/apps/web/dist/index.html
CHANGED
|
@@ -34,34 +34,36 @@
|
|
|
34
34
|
dispatchEvent(new Event("wizard-install"));
|
|
35
35
|
});
|
|
36
36
|
</script>
|
|
37
|
-
<script type="module" crossorigin src="/studio/assets/index-
|
|
37
|
+
<script type="module" crossorigin src="/studio/assets/index-LjwVRoki.js"></script>
|
|
38
38
|
<link rel="modulepreload" crossorigin href="/studio/assets/rolldown-runtime-hePW80VL.js">
|
|
39
39
|
<link rel="modulepreload" crossorigin href="/studio/assets/jsx-runtime-BNakU3Ej.js">
|
|
40
40
|
<link rel="modulepreload" crossorigin href="/studio/assets/preload-helper-DpV6A1kQ.js">
|
|
41
41
|
<link rel="modulepreload" crossorigin href="/studio/assets/marked.esm-DQ7XA7AC.js">
|
|
42
|
-
<link rel="modulepreload" crossorigin href="/studio/assets/i18n-
|
|
43
|
-
<link rel="modulepreload" crossorigin href="/studio/assets/ui-
|
|
44
|
-
<link rel="modulepreload" crossorigin href="/studio/assets/useMutation-
|
|
45
|
-
<link rel="modulepreload" crossorigin href="/studio/assets/volume-2-
|
|
42
|
+
<link rel="modulepreload" crossorigin href="/studio/assets/i18n-CyrHWeGk.js">
|
|
43
|
+
<link rel="modulepreload" crossorigin href="/studio/assets/ui-C6vSmisV.js">
|
|
44
|
+
<link rel="modulepreload" crossorigin href="/studio/assets/useMutation-B8hJ5Z6N.js">
|
|
45
|
+
<link rel="modulepreload" crossorigin href="/studio/assets/volume-2-B1roRk6x.js">
|
|
46
46
|
<link rel="modulepreload" crossorigin href="/studio/assets/eye-TJSuiHHO.js">
|
|
47
47
|
<link rel="modulepreload" crossorigin href="/studio/assets/list-checks-DaxmUPqK.js">
|
|
48
48
|
<link rel="modulepreload" crossorigin href="/studio/assets/engenty-CNjaZCVM.js">
|
|
49
49
|
<link rel="modulepreload" crossorigin href="/studio/assets/logo-BpnjXTRy.js">
|
|
50
|
-
<link rel="modulepreload" crossorigin href="/studio/assets/
|
|
51
|
-
<link rel="modulepreload" crossorigin href="/studio/assets/
|
|
50
|
+
<link rel="modulepreload" crossorigin href="/studio/assets/brand-CG35IRgr.js">
|
|
51
|
+
<link rel="modulepreload" crossorigin href="/studio/assets/plug-De3mHDFV.js">
|
|
52
|
+
<link rel="modulepreload" crossorigin href="/studio/assets/session-DKGZUy6h.js">
|
|
53
|
+
<link rel="modulepreload" crossorigin href="/studio/assets/Marketplace-BkIxd1PW.js">
|
|
52
54
|
<link rel="modulepreload" crossorigin href="/studio/assets/react-dom-hf6EcyAr.js">
|
|
53
55
|
<link rel="modulepreload" crossorigin href="/studio/assets/scroll-text-BEnPzQEi.js">
|
|
54
|
-
<link rel="modulepreload" crossorigin href="/studio/assets/read-aloud-
|
|
56
|
+
<link rel="modulepreload" crossorigin href="/studio/assets/read-aloud-DCTouK7J.js">
|
|
55
57
|
<link rel="modulepreload" crossorigin href="/studio/assets/floating-ui.dom-pwdNGv4b.js">
|
|
56
58
|
<link rel="modulepreload" crossorigin href="/studio/assets/upload-CAlHC232.js">
|
|
57
59
|
<link rel="modulepreload" crossorigin href="/studio/assets/media-Cej-H610.js">
|
|
58
|
-
<link rel="modulepreload" crossorigin href="/studio/assets/UpdateCheck-
|
|
60
|
+
<link rel="modulepreload" crossorigin href="/studio/assets/UpdateCheck-B51jMIhp.js">
|
|
59
61
|
<link rel="modulepreload" crossorigin href="/studio/assets/with-selector-CoMyWBAX.js">
|
|
60
|
-
<link rel="modulepreload" crossorigin href="/studio/assets/code-editor-
|
|
61
|
-
<link rel="modulepreload" crossorigin href="/studio/assets/LangSwitch-
|
|
62
|
-
<link rel="modulepreload" crossorigin href="/studio/assets/host-
|
|
62
|
+
<link rel="modulepreload" crossorigin href="/studio/assets/code-editor-Bsyy7cuT.js">
|
|
63
|
+
<link rel="modulepreload" crossorigin href="/studio/assets/LangSwitch-B7UQlGh5.js">
|
|
64
|
+
<link rel="modulepreload" crossorigin href="/studio/assets/host-DaDyLfqT.js">
|
|
63
65
|
<link rel="stylesheet" crossorigin href="/studio/assets/host-BrP-ENHg.css">
|
|
64
|
-
<link rel="stylesheet" crossorigin href="/studio/assets/index-
|
|
66
|
+
<link rel="stylesheet" crossorigin href="/studio/assets/index-Db9JthZr.css">
|
|
65
67
|
</head>
|
|
66
68
|
<body>
|
|
67
69
|
<div id="root"></div>
|