@mdgate/numbers 0.5.2 → 0.5.4
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/dist/index.js +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{documentToMarkdown as
|
|
1
|
+
import{documentToMarkdown as x}from"@mdgate/document";import{detectIWorkKind as B}from"@mdgate/iwork-common";import{fileExtension as C}from"@mdgate/utils";import{ConvertError as k}from"@mdgate/core";import{emptyDocument as b,heading as T,plain as I}from"@mdgate/document";import{collectDrawableBlocks as l,getObject as g,numbersSheets as w,openIWork as y,parsePreIwa as D,sheetsToDocument as v,TYPE as h,tableInfoToRows as A}from"@mdgate/iwork-common";function d(r){let e;try{e=y(r,"numbers")}catch(o){if(o instanceof k&&o.code==="encrypted")throw o;return D(r,"numbers")}let u=w(e),f=[],s=b();for(let o of u){let t=[],n=[];for(let p of o.drawables){let c=g(e,p);if(c===void 0)continue;if(c.type===h.TST_TABLE_INFO||c.type===h.TST_WP_TABLE_INFO){let a=A(e,c.fields);if(a.length>0){if(t.length===0)t.push(...a);else n.push(...l(e,p));continue}}n.push(...l(e,p))}if(t.length>0)f.push({name:o.name,rows:t});if(n.length>0){if(u.length>1)s.blocks.push(T(2,[I(o.name)]));s.blocks.push(...n)}}let i=v(f);return i.blocks.push(...s.blocks),i}function m(){return{id:"numbers",sniff(r,e){if(B(r)==="numbers")return 2;if(e?.path!==void 0&&C(e.path)==="numbers")return 1;return 0},convert(r){return{markdown:x(d(r))}}}}import{create as E}from"@mdgate/core";var S=E([m()]);function W(r,e){return S(r,e)}export{W as toMarkdown,m as numbers};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mdgate/numbers",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "mdgate Apple Numbers converter",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"prepublishOnly": "bun run build"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@mdgate/core": "0.5.
|
|
26
|
-
"@mdgate/document": "0.5.
|
|
27
|
-
"@mdgate/iwork-common": "0.5.
|
|
28
|
-
"@mdgate/utils": "0.5.
|
|
25
|
+
"@mdgate/core": "0.5.4",
|
|
26
|
+
"@mdgate/document": "0.5.4",
|
|
27
|
+
"@mdgate/iwork-common": "0.5.4",
|
|
28
|
+
"@mdgate/utils": "0.5.4"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|