@sheetxl/sdk 0.8.0-beta.6 → 0.8.0-beta.9

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 (115) hide show
  1. package/browser/cjs/BAtZ8a7H7zsRvWqe.cjs +90 -0
  2. package/browser/cjs/CQPMWBxBUmkORmxV.cjs +1 -0
  3. package/browser/cjs/{CMrcyRRWS0gjwpr2.cjs → CvQ1tIq7wZ7HIGPq.cjs} +1 -1
  4. package/browser/cjs/CwvGOe42j8KpAF0v.cjs +1 -0
  5. package/browser/cjs/{KMBs7XyoINajcR-L.cjs → DCOqoH-T4Ux_1dQj.cjs} +1 -1
  6. package/browser/cjs/index.cjs +2 -2
  7. package/browser/esm/{7_M82_Otn5kHQ0qd.mjs → BdHD3v-u8irI1XhZ.mjs} +2 -2
  8. package/browser/esm/{DRsp6JAObqXYGvhz.mjs → C8btlUQcQwNyzHY3.mjs} +2 -2
  9. package/browser/esm/{CfoNUsKHL7SzfO8c.mjs → CF3VfWX7bJu8kO_Z.mjs} +2 -2
  10. package/browser/esm/{DBjWjEUK9qrHG5VD.mjs → D3ll0ybMQOP4uPyW.mjs} +1 -1
  11. package/browser/esm/{CEk-nufZXNFx5jDl.mjs → DXmFrSnh3xSBfoD7.mjs} +9233 -8740
  12. package/browser/esm/{iLZfKwfSx5bQgCOp.mjs → DzgIc4oyekwA-fkl.mjs} +96 -96
  13. package/browser/esm/{J1egfq2ajlXPw3Ki.mjs → Iw280tlGmTHKDqzd.mjs} +2 -2
  14. package/browser/esm/index.mjs +920 -593
  15. package/node/esm/{BMtLBfP7JzIsG9_G.mjs → B_FOXd5PSfVcg0ED.mjs} +1 -1
  16. package/node/esm/{CynxiHhVY9UGe_h6.mjs → BzgnLKSVfN-mrMSW.mjs} +1 -1
  17. package/node/esm/{DYRjFZ75QYgmgEWF.mjs → D4PsEIRHxAahp5kn.mjs} +1 -1
  18. package/node/esm/{DpyQm1VnGyCmRRKJ.mjs → dinqlP3jU8gDOjso.mjs} +1 -1
  19. package/node/esm/index.mjs +10520 -9698
  20. package/package.json +7 -6
  21. package/resources/locales/de/model.msg.json +19 -0
  22. package/resources/locales/en/model.msg.json +25 -0
  23. package/types/scripting-api.json +7337 -6890
  24. package/types/scripting-enums.json +101 -21
  25. package/types/scripting.d.ts +1961 -466
  26. package/types/src/calculation/Calculation.d.ts +37 -45
  27. package/types/src/calculation/grid/CalcGrid.d.ts +12 -4
  28. package/types/src/calculation/grid/CalcGridBackend.d.ts +0 -6
  29. package/types/src/calculation/grid/CalcGridProxy.d.ts +1 -6
  30. package/types/src/calculation/grid/ICalcGrid.d.ts +12 -4
  31. package/types/src/calculation/grid/_CalcRequest.d.ts +4 -9
  32. package/types/src/cell/ICell.d.ts +3 -3
  33. package/types/src/cell/ICellHeader.d.ts +24 -2
  34. package/types/src/cellRange/ICellRange.d.ts +67 -3
  35. package/types/src/cellRange/ICellRanges.d.ts +12 -12
  36. package/types/src/chart/Chart.d.ts +2 -13
  37. package/types/src/condition/AnchoredConditional.d.ts +2 -0
  38. package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +4 -0
  39. package/types/src/condition/BuiltInOperators/IconOperator.d.ts +4 -0
  40. package/types/src/condition/ICondition.d.ts +36 -28
  41. package/types/src/condition/_ConditionUtils.d.ts +32 -8
  42. package/types/src/fill/IFill.d.ts +46 -11
  43. package/types/src/fill/IStroke.d.ts +34 -42
  44. package/types/src/filter/IFilter.d.ts +51 -6
  45. package/types/src/hyperlink/IHyperlink.d.ts +8 -0
  46. package/types/src/index.d.ts +1 -0
  47. package/types/src/movable/AbstractMovableContent.d.ts +6 -0
  48. package/types/src/movable/FormControl.d.ts +206 -0
  49. package/types/src/movable/IFormControl.d.ts +424 -0
  50. package/types/src/movable/IMovable.d.ts +37 -8
  51. package/types/src/movable/IMovableCollection.d.ts +19 -1
  52. package/types/src/movable/Movable.d.ts +20 -0
  53. package/types/src/movable/MovableContentRegistry.d.ts +64 -0
  54. package/types/src/movable/_BuiltInContents.d.ts +2 -0
  55. package/types/src/movable/_DrawnBounds.d.ts +33 -0
  56. package/types/src/movable/_RotatedFrame.d.ts +20 -0
  57. package/types/src/movable/index.d.ts +6 -4
  58. package/types/src/numFmt/BuiltInFormats.d.ts +5 -0
  59. package/types/src/numFmt/_NumFmtUtils.d.ts +0 -1
  60. package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +6 -0
  61. package/types/src/outline/IOutline.d.ts +186 -0
  62. package/types/src/outline/Outline.d.ts +157 -0
  63. package/types/src/outline/index.d.ts +2 -0
  64. package/types/src/shape/GeometryPreset.d.ts +197 -0
  65. package/types/src/shape/IGeometry.d.ts +398 -0
  66. package/types/src/shape/IShape.d.ts +177 -204
  67. package/types/src/shape/Shape.d.ts +39 -13
  68. package/types/src/shape/ShapeStyleUtils.d.ts +48 -0
  69. package/types/src/shape/_Geometry.d.ts +14 -0
  70. package/types/src/shape/_GeometryLoader.d.ts +21 -0
  71. package/types/src/shape/_builtIn/_BuiltInChunks.d.ts +10 -0
  72. package/types/src/shape/_builtIn/_BuiltInDef.d.ts +9 -0
  73. package/types/src/shape/_builtIn/arrows.d.ts +6 -0
  74. package/types/src/shape/_builtIn/basic.d.ts +6 -0
  75. package/types/src/shape/_builtIn/callouts.d.ts +6 -0
  76. package/types/src/shape/_builtIn/flowchart.d.ts +6 -0
  77. package/types/src/shape/_builtIn/lines.d.ts +6 -0
  78. package/types/src/shape/_builtIn/math.d.ts +6 -0
  79. package/types/src/shape/_builtIn/other.d.ts +6 -0
  80. package/types/src/shape/_builtIn/rectangles.d.ts +6 -0
  81. package/types/src/shape/_builtIn/starsBanners.d.ts +6 -0
  82. package/types/src/shape/geometry/_strokeEnds.d.ts +7 -0
  83. package/types/src/shape/geometry/format.d.ts +3 -0
  84. package/types/src/shape/geometry/geometry.d.ts +84 -0
  85. package/types/src/shape/geometry/guides.d.ts +54 -0
  86. package/types/src/shape/geometry/handles.d.ts +14 -0
  87. package/types/src/shape/geometry/index.d.ts +7 -0
  88. package/types/src/shape/geometry/lineEnds.d.ts +53 -0
  89. package/types/src/shape/geometry/paths.d.ts +35 -0
  90. package/types/src/shape/geometry/segments.d.ts +114 -0
  91. package/types/src/shape/index.d.ts +2 -0
  92. package/types/src/sheet/ISheet.d.ts +10 -45
  93. package/types/src/sheet/Sheet.d.ts +19 -5
  94. package/types/src/sheet/SheetRange.d.ts +16 -1
  95. package/types/src/sheet/_SheetUtils.d.ts +10 -2
  96. package/types/src/sheetHeader/ISheetHeader.d.ts +4 -0
  97. package/types/src/sheetHeader/SheetCellHeader.d.ts +4 -0
  98. package/types/src/sheetHeader/SheetHeader.d.ts +10 -0
  99. package/types/src/sheetHeader/_HeaderUtils.d.ts +3 -1
  100. package/types/src/sheetView/ISheetView.d.ts +17 -0
  101. package/types/src/sheetView/SheetView.d.ts +4 -0
  102. package/types/src/table/AnchoredTable.d.ts +7 -2
  103. package/types/src/text/IText.d.ts +182 -0
  104. package/types/src/text/ITextFrame.d.ts +85 -0
  105. package/types/src/text/TextRotation.d.ts +3 -3
  106. package/types/src/text/TextStacked.d.ts +2 -2
  107. package/types/src/theme/ITheme.d.ts +24 -0
  108. package/types/src/workbook/Workbook.d.ts +16 -5
  109. package/browser/cjs/-wfVn4ubg563jjqj.cjs +0 -93
  110. package/browser/cjs/B2GVAGA-CBeu_7U4.cjs +0 -1
  111. package/browser/cjs/DFKGFVvoELb8_p_B.cjs +0 -1
  112. package/types/src/movable/Control.d.ts +0 -55
  113. package/types/src/movable/IControl.d.ts +0 -86
  114. package/types/src/movable/IGroup.d.ts +0 -30
  115. package/types/src/shape/_ShapeXml.d.ts +0 -28
@@ -1 +0,0 @@
1
- const e=require("./-wfVn4ubg563jjqj.cjs");exports.initializeFunctions=e.R;
@@ -1 +0,0 @@
1
- const e=require("./-wfVn4ubg563jjqj.cjs");let t=require("@sheetxl/primitives"),n=require("@sheetxl/utils");function r(t,n,r,i){if(!t||!n)return;let a=t.bind(e.ct.Table,``,{at:{scope:n,rowIndex:r,colIndex:i}});return a?t.resolve(e.ct.Table,a)?.toString():void 0}var i=/[A-Za-z_\\\u007F-\uFFFF][A-Za-z0-9_.\u007F-\uFFFF]*$/,a=/[A-Za-z0-9_.)\]}"'!#\u007F-\uFFFF]/;function o(e,t){for(let n=t+1;n<e.length;n++){let t=e[n];if(t!==`'`){if(t===`]`)return n+1;if(t===`[`)return null}else n++}return-1}function s(t,n,r,s){let c=0,l=-1;for(let e=0;e<n.length;e++){let t=n[e];c>0&&t===`'`?e++:t===`[`?(c===0&&(l=e),c++):t===`]`&&c>0&&c--}if(c===0)return!1;let u=n.slice(0,l);if((u.split(`"`).length-1)%2==1)return!1;let d=t.length>0?t[t.length-1]:void 0,f=``,p=!1,m=i.exec(u);if(m){let e=m.index>0?u[m.index-1]:d?.text?.at(-1)??``;if(/[A-Za-z0-9_.]/.test(e))return!1;f=m[0],u=u.slice(0,m.index)}else u.length===0&&d?.text&&i.exec(d.text)?.index===0&&(d.type===e._t.Named&&!d.value?.scope||d.type===e._t.TableReference)&&(f=d.text,p=!0);if(!p){let e=u.length>0?u[u.length-1]:d?.text?.at(-1)??``;if(e&&a.test(e))return!1}let h=f||(s?.()??``),g=[],_=(e,t,n)=>{g.push({type:e,value:t,text:t,context:{name:h,argIndex:n,type:`table`}})},v=(t,n,r,i)=>{let a=t.startsWith(`#`),o=r?i?`column`:a?`specifier`:t?`column`:`any`:void 0,s=o?{table:h,name:t,partial:o}:{table:h,name:t};g.push({type:a?e._t.TableSpecifier:e._t.TableColumn,value:s,text:t,context:{name:h,argIndex:n,type:`table`}})},y=(t,n,r,i)=>{_(e._t.Paren,`[`,r),v(t.slice(1,n?-1:void 0),r,!n,i),n&&_(e._t.Paren,`]`,r)};_(e._t.Paren,`[`,-1);let b=n.slice(l+1);if(b.startsWith(`[`)){let t=0,n=!1,r=0;for(;r<b.length;){let i=b[r];if(i===`[`){let e=o(b,r);if(e===null)return!1;let i=e!==-1;if(y(b.slice(r,i?e:b.length),i,t,n),n=!1,!i)break;r=e}else if(i===`,`)_(e._t.Separator,`,`,t++),r++;else if(i===`:`)_(e._t.Infix,`:`,t),r++;else if(i===`@`)_(e._t.Prefix,`@`,t),n=!0,r++;else{if(i!==` `)return!1;{let n=r;for(;b[n]===` `;)n++;_(e._t.Whitespace,b.slice(r,n),t),r=n}}}}else{let t=b,n=t.startsWith(`@`);if(n&&(_(e._t.Prefix,`@`,0),t=t.slice(1)),t.startsWith(`[`)){if(o(t,0)!==-1)return!1;y(t,!1,0,n)}else{if(/(^|[^'])[[\]]/.test(t)||t.startsWith(`#`)&&t.includes(`,`))return!1;v(t,0,!0,n)}}if(u){let n={type:e._t.Unparsed,value:u,text:u};r&&(n.context=r),t.push(n)}if(p){let n={...d,type:e._t.TableReference,value:f,text:f};delete n.referenceIndex,t[t.length-1]=n}else if(f){let n={type:e._t.TableReference,value:f,text:f};r&&(n.context=r),t.push(n)}for(let e of g)t.push(e);return!0}exports.FormulaCompiler=class{constructor(t){t={...t},this._editing=t.profile===`editing`,this._parser=new e.dt(t)}compile(n,i,a,o,s,c,l,u,d){if(o.length===0){let r=new t.FormulaError.Parse(e.lt);return this._compileUnparsed(n,s,o,{input:o,cause:r,causes:[r]})}if(o.length>e.vt.MAX_EXPRESSION_LENGTH){let r=new t.FormulaError.Parse(e.ut(o.length,e.vt.MAX_EXPRESSION_LENGTH));return this._compileUnparsed(n,s,o,{input:o,cause:r,causes:[r]})}let f,p,m=[];try{let e=this._parser.parse(i,a,o);f=e.root,m=e.errors,u&&f&&m.length===0&&(f.legacyIntersect=!0)}catch(e){p=t.FormulaError.isError(e,t.FormulaError.Code.Parse)?e:new t.FormulaError.Parse(e.message,e)}let h=[];for(let t of m)h.push(e.X(t));if(f){let n=e.Q(f,c??null);typeof n==`string`?h.push(new t.FormulaError.Parse(n)):f=n,e.q(f,c??null)&&h.push(new t.FormulaError.Parse(`The implicit intersection operator ' ' requires a cell or range on both sides`)),e.K(f,c??null)&&h.push(new t.FormulaError.Parse(`The spill anchor operator '#' requires a cell or range`)),e.Y(f,c??null)&&h.push(new t.FormulaError.Parse(`Expected a reference; a value cannot be converted to one.`));let r=e.H(f,c??null);r&&h.push(new t.FormulaError.Parse(r));let i=e.U(f,c??null);i&&h.push(new t.FormulaError.Parse(i));let a=e.W(f,c??null);a&&h.push(new t.FormulaError.Parse(a));let o=e.G(f);o&&h.push(new t.FormulaError.Parse(o))}h.length>0&&!p&&(p=h[0]);let g=null;if(p&&(g={input:o,cause:p,causes:h.length>0?h:[p]}),!f){if(this._editing){let e=this._recoverCompiled(n,i,a,o,s,g,l);if(e)return e}return this._compileUnparsed(n,s,o,g,this._editing,()=>r(s,l,i,a))}if(f=e.$(f,c??null),f=e.B(f,c??null),s){let n=this._editing?d:{mint:!d?.book,...d};f=e.Z(f,s,l,n,{rowIndex:i,colIndex:a});let r=e.J(f,s);if(r){let e=new t.FormulaError.Parse(r);h.push(e),g={input:o,cause:g?.cause??e,causes:g?[...g.causes,e]:[e]}}}let _=e.V(n,s,f,this._editing,g,c??null);return this._editing&&g&&e.et(_.getTokens(),s)!==o?this._recoverCompiled(n,i,a,o,s,g,l)||this._compileUnparsed(n,s,o,g,!0):_}autoCorrect(e){let t=function(e){let t=0,n=null;for(let r=0;r<e.length;r++){let i=e[r];n?i===n&&(n=null):t>0?i===`'`?r++:i===`[`?t++:i===`]`&&t--:i===`"`||i===`'`?n=i:i===`[`&&t++}return n?0:t}(e),n=e+`]`.repeat(t),r;try{let e=this._parser.getLexer().tokenize(n,!1);if(e.errors.length>0)return null;r=e.tokens}catch{return null}let i=[];for(let e of r){let t=e.tokenType?.name;if(t===`OpenParen`)i.push(`)`);else if(t===`OpenCurlyParen`)i.push(`}`);else if((t===`CloseParen`||t===`CloseCurlyParen`)&&i.pop()!==(t===`CloseParen`?`)`:`}`))return null}return i.length===0&&t===0?null:n+i.reverse().join(``)}_compileUnparsed(t,r,i,a,o=!1,c){let l={runtime:t,symbols:r,getFunction:null,ast:null,evaluations:n.CommonUtils.EmptyArray,executions:n.CommonUtils.EmptyArray,bindings:n.CommonUtils.EmptyArray,referencesAbsolute:n.CommonUtils.EmptyArray,referencesExecute:n.CommonUtils.EmptyArray,referencesRelative:n.CommonUtils.EmptyArray,referencesRoot:n.CommonUtils.EmptyArray,referenceIndices:n.CommonUtils.EmptyArray,formatReferenceIndices:n.CommonUtils.EmptyArray,getTokens:()=>{let t=[];return o&&s(t,i,void 0,c)?t:[{type:e._t.Unparsed,value:i,text:i}]},namedIds:n.CommonUtils.EmptyArray,symbolIds:n.CommonUtils.EmptyArray,hasTotals:!1,hasVolatile:!1,isBlankCacheable:!1,isBlankCacheableArray:!1,isReferenceOnly:!1,error:a,transform:()=>l};return l}_recoverCompiled(t,n,i,a,o,s,c){let l,u=a.length;try{let e=this._parser.getLexer().tokenize(a,!1);l=e.tokens,e.errors.length>0&&(u=Math.min(u,e.errors[0].offset))}catch{return null}let d=[];for(let e=l.length-1;e>=0&&d.length<24;e--){let t=(l[e].endOffset??-1)+1;t>0&&t<a.length&&t<=u&&d.push(t)}for(let l of d){let u=a.slice(0,l),d,f;try{d=this._parser.parse(n,i,u).root}catch{continue}if(!d||d.type===e._t.Unparsed)continue;try{let r=e.B(d,null),a=o?e.Z(r,o,c,void 0,{rowIndex:n,colIndex:i}):r;f=e.V(t,o,a,!0,s)}catch{continue}if(e.et(f.getTokens(),o)!==u)continue;let p=a.slice(l);if(p.length===0)return f;let m,h={...f,getTokens:()=>(m||(m=[...f.getTokens()],this._appendUnparsedTail(m,p,()=>r(o,c,n,i))),m),transform:()=>h};return h}return null}_appendUnparsedTail(t,n,r){let i=[];for(let n of t){if(n.type===e._t.Whitespace)continue;let t=n.type===e._t.Paren||n.type===e._t.Type?n.text:void 0,r=i.length>0?i[i.length-1]:void 0;if(n.type===e._t.Separator&&r){let e=r.declared[r.declared.length-1];r.ctx?.type===`let`&&r.ctx.argIndex===-1&&r.lambda?.argTokens===r.argTokens&&e?.argIndex===r.argIndex-1&&(e.params=r.lambda.params),r.argIndex++,r.argTokens=0,r.lambda=void 0;continue}if(r&&r.argTokens++,t===`(`||t===`[`||t===`{`)i.push({ctx:n.context,argIndex:0,declared:[],argTokens:0,leadsArg:r?.argTokens===2});else if(t===`)`||t===`]`||t===`}`){let e=i.pop(),t=i.length>0?i[i.length-1]:void 0;t&&e?.leadsArg&&e.ctx?.type===`lambda`&&e.ctx.argIndex===-1&&(t.lambda={params:e.declared.map(({name:e,optional:t})=>t?{name:e,optional:t}:{name:e}),argTokens:t.argTokens})}else if(n.type===e._t.Parameter&&r&&n.value?.declaration){let e=n.value;r.declared.push(e.optional?{name:e.name,argIndex:r.argIndex,optional:!0}:{name:e.name,argIndex:r.argIndex})}}let a=i.length>0?i[i.length-1]:void 0,o=a?.ctx?{...a.ctx,argIndex:a.ctx.argIndex===-1?a.argIndex:a.ctx.argIndex}:void 0;if(o&&a.ctx.argIndex===-1&&(o.type===`let`||o.type===`lambda`)){let t=o.type===`let`?2:1,n=o.bound;for(let r of a.declared){if(o.argIndex<r.argIndex+t)continue;let{name:i,params:a}=r;n=e.z(n,a?{name:i,params:a}:{name:i})}n&&(o.bound=n)}let c=(n,r)=>{let i=r?{type:e._t.Named,value:{name:n},text:n}:{type:e._t.Unparsed,value:n,text:n};o&&(i.context=o),t.push(i)};if(s(t,n,o,r))return;let l=/[A-Za-z_][A-Za-z0-9_]*$/.exec(n),u=l?l.index:-1,d=u>0?n[u-1]:``;for(let e=t.length-1;u===0&&e>=0&&!d;e--)d=t[e].text?.at(-1)??``;u>=0&&!/[A-Za-z0-9_.]/.test(d)?(u>0&&c(n.slice(0,u)),c(n.slice(u),!0)):c(n)}},exports.appendPartialStructuredReference=s;
@@ -1,55 +0,0 @@
1
- import { IResource, IResourceCollection } from '../resource';
2
- import { IEmbeddedPart } from '../io';
3
- import { IControl } from './IControl';
4
- import { AbstractMovableContent } from './AbstractMovableContent';
5
- interface State extends AbstractMovableContent.State {
6
- data?: IControl.JSON;
7
- }
8
- /**
9
- * Implementation for {@link IControl}.
10
- */
11
- export declare class Control extends AbstractMovableContent<State, IControl.JSON> implements IControl {
12
- /**
13
- * The part describing the control. Held beside {@link State.data} rather than in it because the
14
- * resources it may carry are model references, not JSON, and have to be re-persisted per save.
15
- */
16
- protected _part: IEmbeddedPart | null;
17
- constructor(options: Control.ConstructorOptions);
18
- /** {@inheritDoc IModel.getType} */
19
- getType(): string;
20
- /** {@inheritDoc IControl.getShapeId} */
21
- getShapeId(): number | null;
22
- /** {@inheritDoc IControl.getXML} */
23
- getXML(): string | null;
24
- /** {@inheritDoc Movable.Content.toJSON} */
25
- toJSON(toResourceId?: (resource: IResource) => number | null): IControl.JSON | null;
26
- /** {@inheritDoc IMovable.IContent.getTypeDescription} */
27
- getTypeDescription(): string;
28
- /** {@inheritDoc IControl.isIControl} */
29
- get isIControl(): true;
30
- }
31
- /**
32
- * Interfaces for creating `Control` items.
33
- *
34
- * @see
35
- * ### **Interface**
36
- *
37
- * {@link Control}
38
- */
39
- export declare namespace Control {
40
- /**
41
- * Options for creating a Control.
42
- */
43
- interface ConstructorOptions extends AbstractMovableContent.ConstructorOptions<IControl.JSON> {
44
- /**
45
- * Returns an IResource from the resourceId or null if not found.
46
- */
47
- fromResourceId?: (resourceId: number) => IResource;
48
- /**
49
- * Useful for load/save/copying.
50
- */
51
- beginPersistResource: () => IResourceCollection.IPersistScope<IResource.JSON>;
52
- }
53
- }
54
- export {};
55
- //# sourceMappingURL=Control.d.ts.map
@@ -1,86 +0,0 @@
1
- import { IListener } from '../listener';
2
- import { ITransaction } from '../transaction';
3
- import { IResource } from '../resource';
4
- import { IModel } from '../model';
5
- import { IEmbeddedPart } from '../io';
6
- import { IMovable } from './IMovable';
7
- /**
8
- * Interface for working with form controls — a button, a checkbox, a scrollbar placed on a sheet.
9
- *
10
- * **PLACEHOLDER** - This is under development and not made public yet.
11
- */
12
- export interface IControl extends IModel, IMovable.IContent {
13
- /**
14
- * Returns the id of the shape that draws this control, or `null` if it has none.
15
- *
16
- * @remarks
17
- * The shape lives in the sheet's legacy drawing, which is still opaque markup — this is the only
18
- * link between the two, and it is what lets the shape be kept over the same cells as the control
19
- * when rows and columns move.
20
- */
21
- getShapeId(): number | null;
22
- /**
23
- * Returns the markup of the part describing the control, or `null` if none was captured.
24
- *
25
- * @remarks
26
- * Read-only, and the one escape hatch for what the control does not model yet: it is the
27
- * `<formControlPr>` the control was read from — its kind, its linked cell, its macro. It will be
28
- * removed when the control is modeled.
29
- */
30
- getXML(): string | null;
31
- toJSON(toResourceId?: (resource: IResource) => number | null): IControl.JSON | null;
32
- /**
33
- * Deletes the control, and with it the movable that places it.
34
- */
35
- delete(options?: ITransaction.OperationOptions): void;
36
- /** For runtime type checking. */
37
- readonly isIControl: true;
38
- }
39
- /**
40
- * {@inheritDoc IControl}
41
- * @see
42
- * ### **Interface**
43
- *
44
- * {@link IControl}
45
- */
46
- export declare namespace IControl {
47
- interface JSON {
48
- /**
49
- * The id of the shape that draws this control.
50
- *
51
- * @see {@link IControl.getShapeId}
52
- */
53
- shapeId?: number;
54
- /**
55
- * The control's own properties, as they were read.
56
- *
57
- * @remarks
58
- * Opaque. What they describe — a button's macro, a checkbox's linked cell — has no model yet,
59
- * so they are held as they were read and written back unchanged. The position is *not* among
60
- * them: it is the movable's own anchor, and is written from that.
61
- */
62
- props?: Record<string, string>;
63
- /**
64
- * Anything else the properties contained, as markup.
65
- *
66
- * @remarks
67
- * Empty for every control this version has seen — a control's properties are attributes and an
68
- * anchor, and the anchor is the movable's. Kept so a producer that writes more than that does
69
- * not lose it.
70
- */
71
- xml?: string;
72
- /**
73
- * The part describing what kind of control this is and how it behaves.
74
- *
75
- * @remarks
76
- * A control is drawn by a shape in the sheet's legacy drawing ({@link ISheet.LegacyDrawingJSON})
77
- * and described by a part of its own; this is that part.
78
- */
79
- part?: IEmbeddedPart.JSON;
80
- }
81
- interface Events extends IModel.Events {
82
- }
83
- interface IListeners extends IListener.Callbacks<IControl, IControl.Events> {
84
- }
85
- }
86
- //# sourceMappingURL=IControl.d.ts.map
@@ -1,30 +0,0 @@
1
- import { IListener } from '../listener';
2
- import { IResource } from '../resource';
3
- import { IModel } from '../model';
4
- /**
5
- * Interface for working with Groups.
6
- *
7
- * @remarks
8
- * **PLACEHOLDER**
9
- */
10
- export interface IGroup extends IModel {
11
- toJSON(toResourceId?: (resource: IResource) => number): IGroup.JSON;
12
- getDescription(): string;
13
- }
14
- /**
15
- * {@inheritDoc IGroup}
16
- * @see
17
- * ### **Interface**
18
- *
19
- * {@link IGroup}
20
- */
21
- export declare namespace IGroup {
22
- interface JSON {
23
- grpSp?: any;
24
- }
25
- interface Events extends IModel.Events {
26
- }
27
- interface IListeners extends IListener.Callbacks<IGroup, IGroup.Events> {
28
- }
29
- }
30
- //# sourceMappingURL=IGroup.d.ts.map
@@ -1,28 +0,0 @@
1
- /**
2
- * Reads the two facts a shape's captured DrawingML fragment can answer without a model behind
3
- * it: the text written on the shape, and its preset geometry.
4
- *
5
- * @remarks
6
- * An imported shape is kept as the source's markup ({@link IShape.JSON.xml}) and replayed on
7
- * save, so this is a reader over a small fragment, not an XML library: elements, attributes and
8
- * character data, matched by LOCAL name — prefixes are the producer's choice (`xdr:sp` and `a:t`
9
- * are only Excel's). The fragment is a few kilobytes and was already parsed once, as part of a
10
- * whole document, by the reader that captured it.
11
- */
12
- /** What {@link readShapeXml} answers with. */
13
- export interface ShapeXmlFacts {
14
- /** The root element's local name: `sp`, `cxnSp` or `grpSp`. */
15
- element: string;
16
- /** `prstGeom/@prst`, `'custom'` for a `custGeom`, or `null` when the fragment states neither. */
17
- geometry: string | null;
18
- /** The plain text, or `null` when the fragment has no text body at all. */
19
- text: string | null;
20
- }
21
- /**
22
- * Reads a captured shape fragment.
23
- *
24
- * @param xml The fragment as captured on import.
25
- * @returns `null` when `xml` holds no element.
26
- */
27
- export declare const readShapeXml: (xml: string) => ShapeXmlFacts | null;
28
- //# sourceMappingURL=_ShapeXml.d.ts.map