@ycodium-ai/plugin-office 0.2.2800 → 0.2.2816

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +4 -1
  2. package/package.json +2 -2
  3. package/ui/ui.js +1 -1
package/README.md CHANGED
@@ -89,7 +89,10 @@ runtime. Language catalogs live in `locales/`.
89
89
  Python 3 is found; point `YCODIUM_OFFICE_TEST_PYTHON` at one to run it.
90
90
 
91
91
  To move to other versions, regenerate the whole of `src/lock.ts`; do not edit
92
- single entries.
92
+ single entries. Then run `scripts/remote-check.ts` on a real Linux and macOS
93
+ machine: it installs and runs everything outside Ycodium, and its header says how
94
+ to bundle it, which steps exist, and how to simulate a machine without Chinese
95
+ fonts.
93
96
 
94
97
  ## License
95
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/plugin-office",
3
- "version": "0.2.2800",
3
+ "version": "0.2.2816",
4
4
  "description": "Lets agents create, check, and render Word, PowerPoint, and Excel files, and previews Office files in the app.",
5
5
  "keywords": [
6
6
  "docx",
@@ -28,7 +28,7 @@
28
28
  "esbuild": "0.28.1",
29
29
  "typescript": "~6.0.3",
30
30
  "vite-plus": "0.2.2",
31
- "@ycodium-ai/plugin-api": "0.2.2800"
31
+ "@ycodium-ai/plugin-api": "0.2.0"
32
32
  },
33
33
  "ycodium": {
34
34
  "plugin": "./dist/index.js",
package/ui/ui.js CHANGED
@@ -1 +1 @@
1
- var p=window.__ycodiumPluginHost.modules?.["@ycodium-ai/plugin-api/ui"];if(!p)throw new Error("This plugin needs a newer Ycodium app. Update the app.");var{PLUGIN_UI_BRIDGE_VERSION:R,PLUGIN_UI_GLOBAL_KEY:w,PLUGIN_UI_HOST_CAPABILITIES:E,PLUGIN_UI_HOST_COMMAND_PALETTE_UNAVAILABLE_MESSAGE:_,PLUGIN_UI_HOST_UPGRADE_MESSAGE:x,pluginUiHostHasCapability:c}=p;var y=/^- page (\S+): (.+?)(?: \((\d+)x(\d+)\))?$/u,f=/^Missing fonts \(substituted\): (.+)\.$/u,m=a=>{let e=[],s=null,d=[];for(let i of a.split(/\r?\n/u)){let t=y.exec(i);if(t!==null){e.push({page:t[1],path:t[2],width:t[3]===void 0?null:Number(t[3]),height:t[4]===void 0?null:Number(t[4])});continue}i.startsWith("Warning:")&&(s=i);let n=f.exec(i);n!==null&&(d=n[1].split(", "))}return{pages:e,warning:s,missingFonts:d}};var h="render-result";function I(a){let e=a.react.createElement,s=c(a,"workspaceFileUrl");function d(n){let o=a.i18n.usePluginTranslation(),l=a.useWorkspaceFileUrl({environmentId:n.environmentId,threadId:n.threadId,path:n.page.path}),r=o("card.page",{page:n.page.page});return e("figure",{style:{margin:0,display:"flex",flexDirection:"column",gap:4,width:168}},l.status==="ready"?e("img",{src:l.url,alt:r,loading:"lazy",style:{width:"100%",height:"auto",border:"1px solid var(--border)",borderRadius:6,background:"#fff"}}):e("div",{style:{height:120,display:"flex",alignItems:"center",justifyContent:"center",border:"1px dashed var(--border)",borderRadius:6,fontSize:12,color:"var(--muted-foreground)"}},l.status==="failed"?o("card.imageUnavailable"):o("card.loading")),e("figcaption",{style:{fontSize:12,color:"var(--muted-foreground)"}},r))}function i(n){return e("pre",{style:{margin:0,padding:8,whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:12}},n.text)}function t(n){let o=a.i18n.usePluginTranslation(),l=n.details.output?.text??"",r=m(l),u=n.threadRef?.threadId;return!s||u===void 0||n.entry.displayFailed||r.pages.length===0?e(i,{text:l}):e("div",{style:{display:"flex",flexDirection:"column",gap:8,padding:8}},r.warning===null?null:e("p",{role:"status",style:{margin:0,fontSize:12,color:"var(--destructive)"}},o("card.noCjkFont")),e("div",{style:{display:"flex",flexWrap:"wrap",gap:8}},...r.pages.map(g=>e(d,{key:g.path,environmentId:n.environmentId,threadId:u,page:g}))),r.missingFonts.length===0?null:e("p",{style:{margin:0,fontSize:12,color:"var(--muted-foreground)"}},o("card.missingFonts",{fonts:r.missingFonts.join(", ")})))}return{pages:{},panels:{},views:{[h]:t}}}export{h as RENDER_RESULT_VIEW,I as default};
1
+ var p=window.__ycodiumPluginHost.modules?.["@ycodium-ai/plugin-api/ui"];if(!p)throw new Error("This plugin needs a newer Ycodium app. Update the app.");var{PLUGIN_UI_BRIDGE_VERSION:_,PLUGIN_UI_FLOATING_VIEW_PROP:R,PLUGIN_UI_GLOBAL_KEY:P,PLUGIN_UI_HOST_CAPABILITIES:w,PLUGIN_UI_HOST_COMMAND_PALETTE_UNAVAILABLE_MESSAGE:E,PLUGIN_UI_HOST_UPGRADE_MESSAGE:x,pluginUiHostHasCapability:c}=p;var y=/^- page (\S+): (.+?)(?: \((\d+)x(\d+)\))?$/u,f=/^Missing fonts \(substituted\): (.+)\.$/u,m=a=>{let e=[],s=null,d=[];for(let i of a.split(/\r?\n/u)){let t=y.exec(i);if(t!==null){e.push({page:t[1],path:t[2],width:t[3]===void 0?null:Number(t[3]),height:t[4]===void 0?null:Number(t[4])});continue}i.startsWith("Warning:")&&(s=i);let n=f.exec(i);n!==null&&(d=n[1].split(", "))}return{pages:e,warning:s,missingFonts:d}};var I="render-result";function h(a){let e=a.react.createElement,s=c(a,"workspaceFileUrl");function d(n){let o=a.i18n.usePluginTranslation(),l=a.useWorkspaceFileUrl({environmentId:n.environmentId,threadId:n.threadId,path:n.page.path}),r=o("card.page",{page:n.page.page});return e("figure",{style:{margin:0,display:"flex",flexDirection:"column",gap:4,width:168}},l.status==="ready"?e("img",{src:l.url,alt:r,loading:"lazy",style:{width:"100%",height:"auto",border:"1px solid var(--border)",borderRadius:6,background:"#fff"}}):e("div",{style:{height:120,display:"flex",alignItems:"center",justifyContent:"center",border:"1px dashed var(--border)",borderRadius:6,fontSize:12,color:"var(--muted-foreground)"}},l.status==="failed"?o("card.imageUnavailable"):o("card.loading")),e("figcaption",{style:{fontSize:12,color:"var(--muted-foreground)"}},r))}function i(n){return e("pre",{style:{margin:0,padding:8,whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:12}},n.text)}function t(n){let o=a.i18n.usePluginTranslation(),l=n.details.output?.text??"",r=m(l),u=n.threadRef?.threadId;return!s||u===void 0||n.entry.displayFailed||r.pages.length===0?e(i,{text:l}):e("div",{style:{display:"flex",flexDirection:"column",gap:8,padding:8}},r.warning===null?null:e("p",{role:"status",style:{margin:0,fontSize:12,color:"var(--destructive)"}},o("card.noCjkFont")),e("div",{style:{display:"flex",flexWrap:"wrap",gap:8}},...r.pages.map(g=>e(d,{key:g.path,environmentId:n.environmentId,threadId:u,page:g}))),r.missingFonts.length===0?null:e("p",{style:{margin:0,fontSize:12,color:"var(--muted-foreground)"}},o("card.missingFonts",{fonts:r.missingFonts.join(", ")})))}return{pages:{},panels:{},views:{[I]:t}}}export{I as RENDER_RESULT_VIEW,h as default};