drafted 1.11.4 → 1.11.5

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 (2) hide show
  1. package/mcp/server.mjs +10 -3
  2. package/package.json +3 -1
package/mcp/server.mjs CHANGED
@@ -1919,7 +1919,7 @@ tool('frame', 'Frame CRUD in the ACTIVE PROJECT. Dispatch by `action`: read (by
1919
1919
  officeType: z.enum(['xlsx', 'docx']).optional().describe('[create_office] native Drafted-owned Office format to author: xlsx (spreadsheet) or docx (document). Real OOXML bytes — download is the file itself, no conversion.'),
1920
1920
  rows: z.array(z.array(z.union([z.string(), z.number(), z.boolean(), z.null()]))).optional().describe('[create_office xlsx] initial rows for a single-sheet xlsx (2D array of cell values).'),
1921
1921
  sheets: z.array(z.object({ name: z.string().optional(), rows: z.array(z.array(z.union([z.string(), z.number(), z.boolean(), z.null()]))).optional() })).optional().describe('[create_office xlsx] multiple sheets: [{ name, rows }].'),
1922
- paragraphs: z.array(z.object({ html: z.string().optional(), text: z.string().optional(), style: z.string().optional() })).optional().describe('[create_office docx] document paragraphs: [{ html?, text?, style? }]. html uses the inline subset <b>,<i>,<u>,<s>,<span style="color:#c00;font-size:12pt;font-family:Arial">. style = Heading1..Heading6 or Title.'),
1922
+ paragraphs: z.array(z.object({ html: z.string().optional(), text: z.string().optional(), style: z.string().optional(), align: z.string().optional(), list: z.string().optional() })).optional().describe('[create_office docx] document paragraphs: [{ html?, text?, style?, align?, list? }]. html uses the inline subset <b>,<i>,<u>,<s>,<span style="color:#c00;font-size:12pt;font-family:Arial">. style = Heading1..Heading6 or Title. align = left|center|right|justify. list = bullet|number.'),
1923
1923
  sheet: z.string().optional().describe('[read_office xlsx] limit the read to one sheet by name.'),
1924
1924
  maxCells: z.number().optional().describe('[read_office xlsx] cap non-empty cells returned (default 5000).'),
1925
1925
  ops: z.array(z.object({
@@ -1928,7 +1928,7 @@ tool('frame', 'Frame CRUD in the ACTIVE PROJECT. Dispatch by `action`: read (by
1928
1928
  ref: z.string().optional(),
1929
1929
  value: z.union([z.string(), z.number(), z.boolean(), z.null()]).optional(),
1930
1930
  formula: z.string().optional(),
1931
- cells: z.array(z.object({ ref: z.string(), value: z.union([z.string(), z.number(), z.boolean(), z.null()]).optional(), formula: z.string().optional() })).optional(),
1931
+ cells: z.array(z.object({ ref: z.string(), value: z.union([z.string(), z.number(), z.boolean(), z.null()]).optional(), formula: z.string().optional(), cellStyle: z.object({ bold: z.boolean().optional(), italic: z.boolean().optional(), underline: z.boolean().optional(), fontSize: z.number().optional(), fontName: z.string().optional(), color: z.string().optional(), bg: z.string().optional(), align: z.string().optional(), valign: z.string().optional(), numFmt: z.string().optional(), border: z.boolean().optional() }).optional() })).optional(),
1932
1932
  range: z.string().optional(),
1933
1933
  name: z.string().optional(),
1934
1934
  from: z.string().optional(),
@@ -1943,10 +1943,17 @@ tool('frame', 'Frame CRUD in the ACTIVE PROJECT. Dispatch by `action`: read (by
1943
1943
  start: z.number().optional(),
1944
1944
  end: z.number().optional(),
1945
1945
  style: z.string().optional(),
1946
+ align: z.string().optional(),
1947
+ list: z.string().optional(),
1948
+ header: z.boolean().optional(),
1949
+ col: z.string().optional(),
1950
+ width: z.number().optional(),
1951
+ columns: z.array(z.object({ col: z.string(), width: z.number() })).optional(),
1952
+ cellStyle: z.object({ bold: z.boolean().optional(), italic: z.boolean().optional(), underline: z.boolean().optional(), fontSize: z.number().optional(), fontName: z.string().optional(), color: z.string().optional(), bg: z.string().optional(), align: z.string().optional(), valign: z.string().optional(), numFmt: z.string().optional(), border: z.boolean().optional() }).optional(),
1946
1953
  after: z.string().optional(),
1947
1954
  before: z.string().optional(),
1948
1955
  attrs: z.object({ b: z.boolean().optional(), i: z.boolean().optional(), u: z.boolean().optional(), strike: z.boolean().optional(), color: z.string().optional(), size: z.number().optional(), font: z.string().optional() }).optional(),
1949
- })).optional().describe('[edit_office] edit ops, resolved against stable addresses (no index drift). xlsx: {type:"setCell",sheet?,ref,value|formula} | {type:"setCells",sheet?,cells:[{ref,value|formula}]} | {type:"clearRange",sheet?,range} | {type:"addSheet",name,rows?} | {type:"renameSheet",from,to} | {type:"deleteSheet",name}. docx (id = paraId from read_office): {type:"setParagraph",id,html|text,style?} | {type:"format",id,start,end,attrs:{b,i,u,strike,color,size,font}} (run-level, char range) | {type:"replaceText",id,find,replace,all?} | {type:"setStyle",id,style} | {type:"insertParagraph",after|before,html|text,style?} | {type:"deleteParagraph",id}.'),
1956
+ })).optional().describe('[edit_office] edit ops, resolved against stable addresses (no index drift). xlsx: {type:"setCell",sheet?,ref,value|formula,cellStyle?} | {type:"setCells",sheet?,cells:[{ref,value|formula,cellStyle?}]} | {type:"styleRange",sheet?,range,cellStyle} | {type:"setColumnWidth",sheet?,columns:[{col,width}]} | {type:"clearRange",sheet?,range} | {type:"addSheet",name,rows?} | {type:"renameSheet",from,to} | {type:"deleteSheet",name}. cellStyle:{bold,italic,underline,fontSize,fontName,color,bg,align,valign,numFmt,border}. docx (id = paraId from read_office): {type:"setParagraph",id,html|text,style?,align?,list?} | {type:"format",id,start,end,attrs:{b,i,u,strike,color,size,font}} (run-level char range) | {type:"replaceText",id,find,replace,all?} | {type:"setStyle",id,style?,align?,list?} | {type:"insertParagraph",after|before,html|text,style?,align?,list?} | {type:"insertTable",after|before,rows:[[...]],header?} | {type:"deleteParagraph",id}. align=left|center|right|justify; list=bullet|number.'),
1950
1957
  format: z.enum(['plain_text', 'markdown']).optional().describe('[write_doc_content|append_doc_content] Source format hint. Currently plain_text and minimal markdown are accepted as text.'),
1951
1958
  mode: z.enum(['replace', 'append', 'clear']).optional().describe('[Doc/Slide content actions] Optional mode hint for clients; prefer the explicit write/append/clear action names.'),
1952
1959
  slides: z.array(z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drafted",
3
- "version": "1.11.4",
3
+ "version": "1.11.5",
4
4
  "description": "Drafted — visual thinking surface for humans and AI agents. Renders HTML, markdown, images, and code as frames on a zoomable canvas, with MCP tools for AI agents and real-time sync for humans.",
5
5
  "type": "module",
6
6
  "files": [
@@ -35,6 +35,7 @@
35
35
  "postpublish": "bash scripts/sync-plugin.sh \"chore: sync plugin to v$npm_package_version\" && bash scripts/sync-web-plugin.sh \"chore: sync web-plugin to v$npm_package_version\"",
36
36
  "deploy:check:google": "node scripts/check-google-drive-deploy.mjs",
37
37
  "build:excalidraw": "node scripts/build-excalidraw-editor.mjs",
38
+ "build:office-viewer": "node scripts/build-office-viewer.mjs",
38
39
  "prepublishOnly": "node scripts/check-npm-package.mjs"
39
40
  },
40
41
  "dependencies": {
@@ -91,6 +92,7 @@
91
92
  "@types/express": "^5.0.6",
92
93
  "@types/nodemailer": "^7.0.11",
93
94
  "@types/pg": "^8.18.0",
95
+ "docx-preview": "^0.3.7",
94
96
  "drizzle-kit": "^0.31.9",
95
97
  "tsx": "^4.19.0",
96
98
  "typescript": "^5.9.3",