@orgajs/orgx 1.0.4 → 1.0.8

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/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @orgajs/orgx
2
2
 
3
+ ## 1.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - eeccc870: - get image links out of paragraph
8
+ - some other minor fixes
9
+ - Updated dependencies [eeccc870]
10
+ - @orgajs/reorg-rehype@3.0.10
11
+ - @orgajs/reorg-parse@3.1.7
12
+
13
+ ## 1.0.7
14
+
15
+ ### Patch Changes
16
+
17
+ - 6c1ddb9f: add latex support
18
+ - @orgajs/reorg-rehype@3.0.9
19
+ - @orgajs/reorg-parse@3.1.6
20
+
21
+ ## 1.0.6
22
+
23
+ ### Patch Changes
24
+
25
+ - 4bde5155: tidy up dependencies
26
+ - @orgajs/reorg-parse@3.1.5
27
+ - @orgajs/reorg-rehype@3.0.8
28
+
29
+ ## 1.0.5
30
+
31
+ ### Patch Changes
32
+
33
+ - @orgajs/reorg-rehype@3.0.7
34
+ - @orgajs/reorg-parse@3.1.4
35
+
3
36
  ## 1.0.4
4
37
 
5
38
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { createProcessor } from './processor';
2
2
  export { compile, compileSync } from './compile';
3
- export { evaluate, evaluateSync } from './evaluate';
3
+ export { evaluate, evaluateSync, RuntimeOptions } from './evaluate';
4
4
  export type { ProcessorOptions } from './processor';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACnD,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AACnE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,yCAA6C;AAApC,4GAAA,eAAe,OAAA;AACxB,qCAAgD;AAAvC,kGAAA,OAAO,OAAA;AAAE,sGAAA,WAAW,OAAA;AAC7B,uCAAmD;AAA1C,oGAAA,QAAQ,OAAA;AAAE,wGAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,yCAA6C;AAApC,4GAAA,eAAe,OAAA;AACxB,qCAAgD;AAAvC,kGAAA,OAAO,OAAA;AAAE,sGAAA,WAAW,OAAA;AAC7B,uCAAmE;AAA1D,oGAAA,QAAQ,OAAA;AAAE,wGAAA,YAAY,OAAA"}
@@ -1,10 +1,11 @@
1
+ import { Options as ReorgRehpyeOptions } from '@orgajs/reorg-rehype';
1
2
  import unified, { PluggableList } from 'unified';
2
3
  import { Options as EstreeJsxBuildOptions } from './plugin/estree-jsx-build';
3
4
  import { Options as JSXRewriteOptions } from './plugin/estree-jsx-rewrite';
4
5
  import { Options as EstreeWrapInContentOptions } from './plugin/estree-wrap-in-content';
5
6
  import { Options as RehypeEstreeOptions } from './plugin/rehype-estree';
6
7
  import { Options as RehypeSetLayoutOptions } from './plugin/rehype-set-layout';
7
- export interface ProcessorOptions extends RehypeEstreeOptions, EstreeWrapInContentOptions, JSXRewriteOptions, RehypeSetLayoutOptions, EstreeJsxBuildOptions {
8
+ export interface ProcessorOptions extends Partial<Omit<ReorgRehpyeOptions, 'handlers'>>, RehypeEstreeOptions, EstreeWrapInContentOptions, JSXRewriteOptions, RehypeSetLayoutOptions, EstreeJsxBuildOptions {
8
9
  jsx: boolean;
9
10
  reorgPlugins: PluggableList;
10
11
  rehypePlugins: PluggableList;
@@ -1 +1 @@
1
- {"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../src/processor.ts"],"names":[],"mappings":"AAEA,OAAO,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAEL,OAAO,IAAI,qBAAqB,EACjC,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAEL,OAAO,IAAI,iBAAiB,EAC7B,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAEL,OAAO,IAAI,0BAA0B,EACtC,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACL,OAAO,IAAI,mBAAmB,EAE/B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,OAAO,IAAI,sBAAsB,EAElC,MAAM,4BAA4B,CAAA;AAEnC,MAAM,WAAW,gBACf,SAAQ,mBAAmB,EACzB,0BAA0B,EAC1B,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB;IACvB,GAAG,EAAE,OAAO,CAAA;IACZ,YAAY,EAAE,aAAa,CAAA;IAC3B,aAAa,EAAE,aAAa,CAAA;IAC5B,aAAa,EAAE,aAAa,CAAA;CAC7B;AAyBD,wBAAgB,eAAe,CAC7B,gBAAgB,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAC/C,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAoBrC"}
1
+ {"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../src/processor.ts"],"names":[],"mappings":"AACA,OAAoB,EAClB,OAAO,IAAI,kBAAkB,EAC9B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAEL,OAAO,IAAI,qBAAqB,EACjC,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAEL,OAAO,IAAI,iBAAiB,EAC7B,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAEL,OAAO,IAAI,0BAA0B,EACtC,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACL,OAAO,IAAI,mBAAmB,EAE/B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,OAAO,IAAI,sBAAsB,EAElC,MAAM,4BAA4B,CAAA;AAEnC,MAAM,WAAW,gBACf,SAAQ,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,EACnD,mBAAmB,EACnB,0BAA0B,EAC1B,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB;IACvB,GAAG,EAAE,OAAO,CAAA;IACZ,YAAY,EAAE,aAAa,CAAA;IAC3B,aAAa,EAAE,aAAa,CAAA;IAC5B,aAAa,EAAE,aAAa,CAAA;CAC7B;AAyBD,wBAAgB,eAAe,CAC7B,gBAAgB,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAC/C,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAuBrC"}
package/dist/processor.js CHANGED
@@ -31,14 +31,17 @@ const defaultOptions = {
31
31
  passNamedExportsToLayout: true,
32
32
  };
33
33
  function createProcessor(processorOptions = {}) {
34
- const { jsx, ...options } = { ...defaultOptions, ...processorOptions };
34
+ const { jsx, handlers, ...options } = {
35
+ ...defaultOptions,
36
+ ...processorOptions,
37
+ };
35
38
  const pipeline = unified_1.default()
36
39
  .use(reorg_parse_1.default)
37
40
  .use(options.reorgPlugins)
38
- .use(reorg_rehype_1.default)
41
+ .use(reorg_rehype_1.default, options)
39
42
  .use(rehype_set_layout_1.rehypeSetLayout, options)
40
43
  .use(options.rehypePlugins)
41
- .use(rehype_estree_1.rehypeEstree, options)
44
+ .use(rehype_estree_1.rehypeEstree, { ...options, handlers })
42
45
  .use(estree_wrap_in_content_1.estreeWrapInContent, options)
43
46
  .use(options.estreePlugins)
44
47
  .use(estree_jsx_rewrite_1.estreeJsxRewrite, options);
@@ -1 +1 @@
1
- {"version":3,"file":"processor.js","sourceRoot":"","sources":["../src/processor.ts"],"names":[],"mappings":";;;;;AAAA,sEAA4C;AAC5C,wEAA8C;AAC9C,sDAAgD;AAChD,gEAGkC;AAClC,oEAGoC;AACpC,gEAA2D;AAC3D,4EAGwC;AACxC,0DAG+B;AAC/B,kEAGmC;AAcnC,MAAM,cAAc,GAAqB;IACvC,GAAG,EAAE,KAAK;IACV,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE,EAAE;IACjB,aAAa,EAAE,EAAE;IACjB,YAAY,EAAE,SAAS;IAGvB,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,CAAC,WAAW,CAAC;IACvB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,EAAE;IAGZ,OAAO,EAAE,SAAS;IAClB,gBAAgB,EAAE,KAAK;IACvB,MAAM,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE;IAClD,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE;IACjD,eAAe,EAAE,OAAO;IACxB,UAAU,EAAE,WAAsC;IAClD,wBAAwB,EAAE,IAAI;CAC/B,CAAA;AAED,SAAgB,eAAe,CAC7B,mBAA8C,EAAE;IAEhD,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,gBAAgB,EAAE,CAAA;IAEtE,MAAM,QAAQ,GAAG,iBAAO,EAAE;SACvB,GAAG,CAAC,qBAAU,CAAC;SACf,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC;SACzB,GAAG,CAAC,sBAAW,CAAC;SAChB,GAAG,CAAC,mCAAe,EAAE,OAAO,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M,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,GAAG;QACpC,GAAG,cAAc;QACjB,GAAG,gBAAgB;KACpB,CAAA;IAED,MAAM,QAAQ,GAAG,iBAAO,EAAE;SACvB,GAAG,CAAC,qBAAU,CAAC;SACf,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC;SACzB,GAAG,CAAC,sBAAW,EAAE,OAAO,CAAC;SACzB,GAAG,CAAC,mCAAe,EAAE,OAAO,CAAC;SAC7B,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC;SAC1B,GAAG,CAAC,4BAAY,EAAE,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC;SAC3C,GAAG,CAAC,4CAAmB,EAAE,OAAO,CAAC;SACjC,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC;SAC1B,GAAG,CAAC,qCAAgB,EAAE,OAAO,CAAC,CAAA;IAEjC,IAAI,CAAC,GAAG,EAAE;QACR,QAAQ,CAAC,GAAG,CAAC,iCAAc,EAAE,OAAO,CAAC,CAAA;KACtC;IACD,QAAQ,CAAC,GAAG,CAAC,kCAAe,CAAC,CAAA;IAE7B,OAAO,QAAQ,CAAA;AACjB,CAAC;AAzBD,0CAyBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orgajs/orgx",
3
- "version": "1.0.4",
3
+ "version": "1.0.8",
4
4
  "description": "orga compiler with jsx support",
5
5
  "main": "dist/index.js",
6
6
  "author": "Xiaoxing Hu <xiaoxing@huxx.org>",
@@ -21,15 +21,19 @@
21
21
  "compile": "tsc -b"
22
22
  },
23
23
  "devDependencies": {
24
+ "@types/estree": "^0.0.50",
24
25
  "@types/estree-jsx": "^0.0.1",
26
+ "@types/hast": "^2.3.4",
25
27
  "@types/jest": "^27.0.1",
28
+ "@types/node": "^16.11.1",
26
29
  "jest": "^27.1.1",
27
30
  "jest-cli": "^27.1.1",
31
+ "react": "^17.0.2",
28
32
  "ts-jest": "^27.0.5"
29
33
  },
30
34
  "dependencies": {
31
- "@orgajs/reorg-parse": "3.1.3",
32
- "@orgajs/reorg-rehype": "3.0.6",
35
+ "@orgajs/reorg-parse": "3.1.7",
36
+ "@orgajs/reorg-rehype": "3.0.10",
33
37
  "acorn": "^8.5.0",
34
38
  "acorn-jsx": "^5.3.2",
35
39
  "astring": "^1.7.5",
@@ -39,6 +43,7 @@
39
43
  "hast-util-to-estree": "1.4.0",
40
44
  "periscopic": "2.0.3",
41
45
  "unified": "9.2.2",
42
- "unist-util-stringify-position": "2.0.3"
46
+ "unist-util-stringify-position": "2.0.3",
47
+ "vfile": "4.2.1"
43
48
  }
44
49
  }