@xsynaptic/unified-tools 0.0.4 → 0.0.6
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/{chunk-5RPJUYTO.js → chunk-22KUJHGV.js} +2 -2
- package/dist/chunk-22KUJHGV.js.map +1 -0
- package/dist/chunk-FAO346AP.js +2 -0
- package/dist/chunk-FAO346AP.js.map +1 -0
- package/dist/chunk-IWTHDXJM.js +2 -0
- package/dist/chunk-IWTHDXJM.js.map +1 -0
- package/dist/{chunk-CDY2GI2P.js → chunk-UEE5G5GV.js} +2 -2
- package/dist/chunk-UEE5G5GV.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/sanitize-html.cjs +1 -1
- package/dist/sanitize-html.cjs.map +1 -1
- package/dist/sanitize-html.js +1 -1
- package/dist/stylize-text.cjs.map +1 -1
- package/dist/stylize-text.js +1 -1
- package/dist/transform-markdown.cjs +1 -1
- package/dist/transform-markdown.cjs.map +1 -1
- package/dist/transform-markdown.js +1 -1
- package/dist/wrap-cjk.cjs +1 -1
- package/dist/wrap-cjk.cjs.map +1 -1
- package/dist/wrap-cjk.js +1 -1
- package/package.json +14 -14
- package/src/sanitize-html.ts +3 -8
- package/src/stylize-text.ts +1 -4
- package/src/transform-markdown.ts +1 -1
- package/src/wrap-cjk.ts +1 -1
- package/dist/chunk-5RPJUYTO.js.map +0 -1
- package/dist/chunk-7QE4BXN4.js +0 -2
- package/dist/chunk-7QE4BXN4.js.map +0 -1
- package/dist/chunk-CDY2GI2P.js.map +0 -1
- package/dist/chunk-EGSAYCRK.js +0 -2
- package/dist/chunk-EGSAYCRK.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {retext}from'retext';import n from'retext-smartypants';function i(t,r){let e=retext().use(n,r).processSync(t);return String(e)}export{i as a};//# sourceMappingURL=chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {retext}from'retext';import n from'retext-smartypants';function i(t,r){let e=retext().use(n,r).processSync(t);return String(e)}export{i as a};//# sourceMappingURL=chunk-22KUJHGV.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-22KUJHGV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/stylize-text.ts"],"names":["stylizeText","input","options","output","retext","retextSmartypants"],"mappings":"8DAKO,SAASA,CAAAA,CAAYC,CAAeC,CAAAA,CAAAA,CAAoC,CAC7E,IAAMC,EAASC,MAAO,EAAA,CAAE,GAAIC,CAAAA,CAAAA,CAAmBH,CAAO,CAAA,CAAE,WAAYD,CAAAA,CAAK,CAEzE,CAAA,OAAO,MAAOE,CAAAA,CAAM,CACtB","file":"chunk-22KUJHGV.js","sourcesContent":["import { retext } from 'retext';\nimport retextSmartypants from 'retext-smartypants';\n\nimport type { Options as RetextSmartypantsOptions } from 'retext-smartypants';\n\nexport function stylizeText(input: string, options?: RetextSmartypantsOptions) {\n const output = retext().use(retextSmartypants, options).processSync(input);\n\n return String(output);\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import r from'rehype-parse';import n from'rehype-sanitize';import p from'rehype-stringify';import {unified}from'unified';function s(e,t){let i=unified().use(r,{fragment:true}).use(n,t).use(p).processSync(e);return String(i)}var u=(e,t)=>s(e,{...t,tagNames:[]});export{s as a,u as b};//# sourceMappingURL=chunk-FAO346AP.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-FAO346AP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/sanitize-html.ts"],"names":["sanitizeHtml","input","options","output","unified","rehypeParse","rehypeSanitize","rehypeStringify","stripTags"],"mappings":"yHAOO,SAASA,EAAaC,CAAeC,CAAAA,CAAAA,CAAiC,CAC3E,IAAMC,CAASC,CAAAA,OAAAA,EACZ,CAAA,GAAA,CAAIC,CAAa,CAAA,CAAE,QAAU,CAAA,IAAK,CAAC,CAAA,CACnC,IAAIC,CAAgBJ,CAAAA,CAAO,CAC3B,CAAA,GAAA,CAAIK,CAAe,CAAA,CACnB,WAAYN,CAAAA,CAAK,CAEpB,CAAA,OAAO,MAAOE,CAAAA,CAAM,CACtB,KAGaK,CAAY,CAAA,CAACP,CAAeC,CAAAA,CAAAA,GACvCF,CAAaC,CAAAA,CAAAA,CAAO,CAAE,GAAGC,CAAS,CAAA,QAAA,CAAU,EAAG,CAAC","file":"chunk-FAO346AP.js","sourcesContent":["import rehypeParse from 'rehype-parse';\nimport rehypeSanitize from 'rehype-sanitize';\nimport rehypeStringify from 'rehype-stringify';\nimport { unified } from 'unified';\n\nimport type { Options as RehypeSanitizeOptions } from 'rehype-sanitize';\n\nexport function sanitizeHtml(input: string, options?: RehypeSanitizeOptions) {\n const output = unified()\n .use(rehypeParse, { fragment: true })\n .use(rehypeSanitize, options)\n .use(rehypeStringify)\n .processSync(input);\n\n return String(output);\n}\n\n// Handy shortcut for when you just want to strip tags from text\nexport const stripTags = (input: string, options?: RehypeSanitizeOptions) =>\n sanitizeHtml(input, { ...options, tagNames: [] });\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t from'rehype-parse';import o from'rehype-sanitize';import i from'rehype-stringify';import p from'rehype-wrap-cjk';import {unified}from'unified';function a(r){let e=unified().use(t,{fragment:true}).use(p).use(o).use(i).processSync(r);return String(e)}export{a};//# sourceMappingURL=chunk-IWTHDXJM.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-IWTHDXJM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/wrap-cjk.ts"],"names":["wrapCjk","input","output","unified","rehypeParse","rehypeWrapCjk","rehypeSanitize","rehypeStringify"],"mappings":"wJAMO,SAASA,EAAQC,CAAe,CAAA,CACrC,IAAMC,CAASC,CAAAA,OAAAA,GACZ,GAAIC,CAAAA,CAAAA,CAAa,CAAE,QAAU,CAAA,IAAK,CAAC,CACnC,CAAA,GAAA,CAAIC,CAAa,CACjB,CAAA,GAAA,CAAIC,CAAc,CAClB,CAAA,GAAA,CAAIC,CAAe,CACnB,CAAA,WAAA,CAAYN,CAAK,CAEpB,CAAA,OAAO,MAAOC,CAAAA,CAAM,CACtB","file":"chunk-IWTHDXJM.js","sourcesContent":["import rehypeParse from 'rehype-parse';\nimport rehypeSanitize from 'rehype-sanitize';\nimport rehypeStringify from 'rehype-stringify';\nimport rehypeWrapCjk from 'rehype-wrap-cjk';\nimport { unified } from 'unified';\n\nexport function wrapCjk(input: string) {\n const output = unified()\n .use(rehypeParse, { fragment: true })\n .use(rehypeWrapCjk)\n .use(rehypeSanitize)\n .use(rehypeStringify)\n .processSync(input);\n\n return String(output);\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from'rehype-sanitize';import t from'rehype-stringify';import m from'rehype-wrap-cjk';import i from'remark-parse';import p from'remark-rehype';import n from'remark-smartypants';import {unified}from'unified';function
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import o from'rehype-sanitize';import t from'rehype-stringify';import m from'rehype-wrap-cjk';import i from'remark-parse';import p from'remark-rehype';import n from'remark-smartypants';import {unified}from'unified';function h(r){let e=unified().use(i).use(n).use(p).use(m).use(o).use(t).processSync(r);return String(e)}export{h as a};//# sourceMappingURL=chunk-UEE5G5GV.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-UEE5G5GV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/transform-markdown.ts"],"names":["transformMarkdown","input","output","unified","remarkParse","remarkSmartyPants","remarkRehype","rehypeWrapCjk","rehypeSanitize","rehypeStringify"],"mappings":"uNAQO,SAASA,CAAkBC,CAAAA,CAAAA,CAAe,CAC/C,IAAMC,EAASC,OAAQ,EAAA,CACpB,GAAIC,CAAAA,CAAW,CACf,CAAA,GAAA,CAAIC,CAAiB,CACrB,CAAA,GAAA,CAAIC,CAAY,CAAA,CAChB,GAAIC,CAAAA,CAAa,EACjB,GAAIC,CAAAA,CAAc,CAClB,CAAA,GAAA,CAAIC,CAAe,CAAA,CACnB,WAAYR,CAAAA,CAAK,CAEpB,CAAA,OAAO,MAAOC,CAAAA,CAAM,CACtB","file":"chunk-UEE5G5GV.js","sourcesContent":["import rehypeSanitize from 'rehype-sanitize';\nimport rehypeStringify from 'rehype-stringify';\nimport rehypeWrapCjk from 'rehype-wrap-cjk';\nimport remarkParse from 'remark-parse';\nimport remarkRehype from 'remark-rehype';\nimport remarkSmartyPants from 'remark-smartypants';\nimport { unified } from 'unified';\n\nexport function transformMarkdown(input: string) {\n const output = unified()\n .use(remarkParse)\n .use(remarkSmartyPants)\n .use(remarkRehype)\n .use(rehypeWrapCjk)\n .use(rehypeSanitize)\n .use(rehypeStringify)\n .processSync(input);\n\n return String(output);\n}\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var i=require('rehype-parse'),p=require('rehype-sanitize'),n=require('rehype-stringify'),unified=require('unified'),retext=require('retext'),f=require('retext-smartypants'),
|
|
1
|
+
'use strict';var i=require('rehype-parse'),p=require('rehype-sanitize'),n=require('rehype-stringify'),unified=require('unified'),retext=require('retext'),f=require('retext-smartypants'),c=require('rehype-wrap-cjk'),g=require('remark-parse'),x=require('remark-rehype'),h=require('remark-smartypants');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var i__default=/*#__PURE__*/_interopDefault(i);var p__default=/*#__PURE__*/_interopDefault(p);var n__default=/*#__PURE__*/_interopDefault(n);var f__default=/*#__PURE__*/_interopDefault(f);var c__default=/*#__PURE__*/_interopDefault(c);var g__default=/*#__PURE__*/_interopDefault(g);var x__default=/*#__PURE__*/_interopDefault(x);var h__default=/*#__PURE__*/_interopDefault(h);function o(r,t){let e=unified.unified().use(i__default.default,{fragment:true}).use(p__default.default,t).use(n__default.default).processSync(r);return String(e)}var m=(r,t)=>o(r,{...t,tagNames:[]});function u(r,t){let e=retext.retext().use(f__default.default,t).processSync(r);return String(e)}function k(r){let t=unified.unified().use(g__default.default).use(h__default.default).use(x__default.default).use(c__default.default).use(p__default.default).use(n__default.default).processSync(r);return String(t)}function w(r){let t=unified.unified().use(i__default.default,{fragment:true}).use(c__default.default).use(p__default.default).use(n__default.default).processSync(r);return String(t)}Object.defineProperty(exports,"defaultSchema",{enumerable:true,get:function(){return p.defaultSchema}});exports.sanitizeHtml=o;exports.stripTags=m;exports.stylizeText=u;exports.transformMarkdown=k;exports.wrapCjk=w;//# sourceMappingURL=index.cjs.map
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/sanitize-html.ts","../src/stylize-text.ts","../src/transform-markdown.ts","../src/wrap-cjk.ts"],"names":["sanitizeHtml","input","options","output","unified","rehypeParse","rehypeSanitize","rehypeStringify","stripTags","stylizeText","retext","retextSmartypants","transformMarkdown","remarkParse","remarkSmartyPants","remarkRehype","rehypeWrapCjk","wrapCjk"],"mappings":"quBAOO,SAASA,
|
|
1
|
+
{"version":3,"sources":["../src/sanitize-html.ts","../src/stylize-text.ts","../src/transform-markdown.ts","../src/wrap-cjk.ts"],"names":["sanitizeHtml","input","options","output","unified","rehypeParse","rehypeSanitize","rehypeStringify","stripTags","stylizeText","retext","retextSmartypants","transformMarkdown","remarkParse","remarkSmartyPants","remarkRehype","rehypeWrapCjk","wrapCjk"],"mappings":"quBAOO,SAASA,EAAaC,CAAeC,CAAAA,CAAAA,CAAiC,CAC3E,IAAMC,CAAAA,CAASC,iBACZ,CAAA,GAAA,CAAIC,mBAAa,CAAE,QAAA,CAAU,IAAK,CAAC,CAAA,CACnC,IAAIC,kBAAgBJ,CAAAA,CAAO,EAC3B,GAAIK,CAAAA,kBAAe,EACnB,WAAYN,CAAAA,CAAK,EAEpB,OAAO,MAAA,CAAOE,CAAM,CACtB,CAGaK,IAAAA,CAAAA,CAAY,CAACP,CAAAA,CAAeC,IACvCF,CAAaC,CAAAA,CAAAA,CAAO,CAAE,GAAGC,CAAAA,CAAS,SAAU,EAAG,CAAC,ECd3C,SAASO,CAAYR,CAAAA,CAAAA,CAAeC,EAAoC,CAC7E,IAAMC,EAASO,aAAO,EAAA,CAAE,IAAIC,kBAAmBT,CAAAA,CAAO,EAAE,WAAYD,CAAAA,CAAK,EAEzE,OAAO,MAAA,CAAOE,CAAM,CACtB,CCDO,SAASS,CAAkBX,CAAAA,CAAAA,CAAe,CAC/C,IAAME,CAAAA,CAASC,iBACZ,CAAA,GAAA,CAAIS,kBAAW,CACf,CAAA,GAAA,CAAIC,kBAAiB,CACrB,CAAA,GAAA,CAAIC,kBAAY,CAChB,CAAA,GAAA,CAAIC,kBAAa,CACjB,CAAA,GAAA,CAAIV,kBAAc,CAClB,CAAA,GAAA,CAAIC,kBAAe,CACnB,CAAA,WAAA,CAAYN,CAAK,CAEpB,CAAA,OAAO,OAAOE,CAAM,CACtB,CCbO,SAASc,CAAAA,CAAQhB,EAAe,CACrC,IAAME,EAASC,eAAQ,EAAA,CACpB,IAAIC,kBAAa,CAAA,CAAE,SAAU,IAAK,CAAC,EACnC,GAAIW,CAAAA,kBAAa,EACjB,GAAIV,CAAAA,kBAAc,EAClB,GAAIC,CAAAA,kBAAe,EACnB,WAAYN,CAAAA,CAAK,EAEpB,OAAO,MAAA,CAAOE,CAAM,CACtB","file":"index.cjs","sourcesContent":["import rehypeParse from 'rehype-parse';\nimport rehypeSanitize from 'rehype-sanitize';\nimport rehypeStringify from 'rehype-stringify';\nimport { unified } from 'unified';\n\nimport type { Options as RehypeSanitizeOptions } from 'rehype-sanitize';\n\nexport function sanitizeHtml(input: string, options?: RehypeSanitizeOptions) {\n const output = unified()\n .use(rehypeParse, { fragment: true })\n .use(rehypeSanitize, options)\n .use(rehypeStringify)\n .processSync(input);\n\n return String(output);\n}\n\n// Handy shortcut for when you just want to strip tags from text\nexport const stripTags = (input: string, options?: RehypeSanitizeOptions) =>\n sanitizeHtml(input, { ...options, tagNames: [] });\n","import { retext } from 'retext';\nimport retextSmartypants from 'retext-smartypants';\n\nimport type { Options as RetextSmartypantsOptions } from 'retext-smartypants';\n\nexport function stylizeText(input: string, options?: RetextSmartypantsOptions) {\n const output = retext().use(retextSmartypants, options).processSync(input);\n\n return String(output);\n}\n","import rehypeSanitize from 'rehype-sanitize';\nimport rehypeStringify from 'rehype-stringify';\nimport rehypeWrapCjk from 'rehype-wrap-cjk';\nimport remarkParse from 'remark-parse';\nimport remarkRehype from 'remark-rehype';\nimport remarkSmartyPants from 'remark-smartypants';\nimport { unified } from 'unified';\n\nexport function transformMarkdown(input: string) {\n const output = unified()\n .use(remarkParse)\n .use(remarkSmartyPants)\n .use(remarkRehype)\n .use(rehypeWrapCjk)\n .use(rehypeSanitize)\n .use(rehypeStringify)\n .processSync(input);\n\n return String(output);\n}\n","import rehypeParse from 'rehype-parse';\nimport rehypeSanitize from 'rehype-sanitize';\nimport rehypeStringify from 'rehype-stringify';\nimport rehypeWrapCjk from 'rehype-wrap-cjk';\nimport { unified } from 'unified';\n\nexport function wrapCjk(input: string) {\n const output = unified()\n .use(rehypeParse, { fragment: true })\n .use(rehypeWrapCjk)\n .use(rehypeSanitize)\n .use(rehypeStringify)\n .processSync(input);\n\n return String(output);\n}\n"]}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as sanitizeHtml,b as stripTags}from'./chunk-
|
|
1
|
+
export{a as sanitizeHtml,b as stripTags}from'./chunk-FAO346AP.js';export{a as stylizeText}from'./chunk-22KUJHGV.js';export{a as transformMarkdown}from'./chunk-UEE5G5GV.js';export{a as wrapCjk}from'./chunk-IWTHDXJM.js';export{defaultSchema}from'rehype-sanitize';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/sanitize-html.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var r=require('rehype-parse'),n=require('rehype-sanitize'),p=require('rehype-stringify'),unified=require('unified');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var r__default=/*#__PURE__*/_interopDefault(r);var n__default=/*#__PURE__*/_interopDefault(n);var p__default=/*#__PURE__*/_interopDefault(p);function
|
|
1
|
+
'use strict';var r=require('rehype-parse'),n=require('rehype-sanitize'),p=require('rehype-stringify'),unified=require('unified');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var r__default=/*#__PURE__*/_interopDefault(r);var n__default=/*#__PURE__*/_interopDefault(n);var p__default=/*#__PURE__*/_interopDefault(p);function s(e,t){let i=unified.unified().use(r__default.default,{fragment:true}).use(n__default.default,t).use(p__default.default).processSync(e);return String(i)}var u=(e,t)=>s(e,{...t,tagNames:[]});exports.sanitizeHtml=s;exports.stripTags=u;//# sourceMappingURL=sanitize-html.cjs.map
|
|
2
2
|
//# sourceMappingURL=sanitize-html.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/sanitize-html.ts"],"names":["sanitizeHtml","input","options","output","unified","rehypeParse","rehypeSanitize","rehypeStringify","stripTags"],"mappings":"+UAOO,SAASA,
|
|
1
|
+
{"version":3,"sources":["../src/sanitize-html.ts"],"names":["sanitizeHtml","input","options","output","unified","rehypeParse","rehypeSanitize","rehypeStringify","stripTags"],"mappings":"+UAOO,SAASA,EAAaC,CAAeC,CAAAA,CAAAA,CAAiC,CAC3E,IAAMC,CAASC,CAAAA,eAAAA,EACZ,CAAA,GAAA,CAAIC,kBAAa,CAAA,CAAE,QAAU,CAAA,IAAK,CAAC,CAAA,CACnC,IAAIC,kBAAgBJ,CAAAA,CAAO,CAC3B,CAAA,GAAA,CAAIK,kBAAe,CAAA,CACnB,WAAYN,CAAAA,CAAK,CAEpB,CAAA,OAAO,MAAOE,CAAAA,CAAM,CACtB,KAGaK,CAAY,CAAA,CAACP,CAAeC,CAAAA,CAAAA,GACvCF,CAAaC,CAAAA,CAAAA,CAAO,CAAE,GAAGC,CAAS,CAAA,QAAA,CAAU,EAAG,CAAC","file":"sanitize-html.cjs","sourcesContent":["import rehypeParse from 'rehype-parse';\nimport rehypeSanitize from 'rehype-sanitize';\nimport rehypeStringify from 'rehype-stringify';\nimport { unified } from 'unified';\n\nimport type { Options as RehypeSanitizeOptions } from 'rehype-sanitize';\n\nexport function sanitizeHtml(input: string, options?: RehypeSanitizeOptions) {\n const output = unified()\n .use(rehypeParse, { fragment: true })\n .use(rehypeSanitize, options)\n .use(rehypeStringify)\n .processSync(input);\n\n return String(output);\n}\n\n// Handy shortcut for when you just want to strip tags from text\nexport const stripTags = (input: string, options?: RehypeSanitizeOptions) =>\n sanitizeHtml(input, { ...options, tagNames: [] });\n"]}
|
package/dist/sanitize-html.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as sanitizeHtml,b as stripTags}from'./chunk-
|
|
1
|
+
export{a as sanitizeHtml,b as stripTags}from'./chunk-FAO346AP.js';//# sourceMappingURL=sanitize-html.js.map
|
|
2
2
|
//# sourceMappingURL=sanitize-html.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/stylize-text.ts"],"names":["stylizeText","input","options","output","retext","retextSmartypants"],"mappings":"0LAKO,SAASA,CAAAA,
|
|
1
|
+
{"version":3,"sources":["../src/stylize-text.ts"],"names":["stylizeText","input","options","output","retext","retextSmartypants"],"mappings":"0LAKO,SAASA,CAAAA,CAAYC,CAAeC,CAAAA,CAAAA,CAAoC,CAC7E,IAAMC,EAASC,aAAO,EAAA,CAAE,GAAIC,CAAAA,kBAAAA,CAAmBH,CAAO,CAAA,CAAE,WAAYD,CAAAA,CAAK,CAEzE,CAAA,OAAO,MAAOE,CAAAA,CAAM,CACtB","file":"stylize-text.cjs","sourcesContent":["import { retext } from 'retext';\nimport retextSmartypants from 'retext-smartypants';\n\nimport type { Options as RetextSmartypantsOptions } from 'retext-smartypants';\n\nexport function stylizeText(input: string, options?: RetextSmartypantsOptions) {\n const output = retext().use(retextSmartypants, options).processSync(input);\n\n return String(output);\n}\n"]}
|
package/dist/stylize-text.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as stylizeText}from'./chunk-
|
|
1
|
+
export{a as stylizeText}from'./chunk-22KUJHGV.js';//# sourceMappingURL=stylize-text.js.map
|
|
2
2
|
//# sourceMappingURL=stylize-text.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var o=require('rehype-sanitize'),t=require('rehype-stringify'),m=require('rehype-wrap-cjk'),i=require('remark-parse'),p=require('remark-rehype'),n=require('remark-smartypants'),unified=require('unified');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var o__default=/*#__PURE__*/_interopDefault(o);var t__default=/*#__PURE__*/_interopDefault(t);var m__default=/*#__PURE__*/_interopDefault(m);var i__default=/*#__PURE__*/_interopDefault(i);var p__default=/*#__PURE__*/_interopDefault(p);var n__default=/*#__PURE__*/_interopDefault(n);function
|
|
1
|
+
'use strict';var o=require('rehype-sanitize'),t=require('rehype-stringify'),m=require('rehype-wrap-cjk'),i=require('remark-parse'),p=require('remark-rehype'),n=require('remark-smartypants'),unified=require('unified');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var o__default=/*#__PURE__*/_interopDefault(o);var t__default=/*#__PURE__*/_interopDefault(t);var m__default=/*#__PURE__*/_interopDefault(m);var i__default=/*#__PURE__*/_interopDefault(i);var p__default=/*#__PURE__*/_interopDefault(p);var n__default=/*#__PURE__*/_interopDefault(n);function h(r){let e=unified.unified().use(i__default.default).use(n__default.default).use(p__default.default).use(m__default.default).use(o__default.default).use(t__default.default).processSync(r);return String(e)}exports.transformMarkdown=h;//# sourceMappingURL=transform-markdown.cjs.map
|
|
2
2
|
//# sourceMappingURL=transform-markdown.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/transform-markdown.ts"],"names":["transformMarkdown","input","output","unified","remarkParse","remarkSmartyPants","remarkRehype","rehypeWrapCjk","rehypeSanitize","rehypeStringify"],"mappings":"ojBAQO,SAASA,CAAkBC,CAAAA,CAAAA,
|
|
1
|
+
{"version":3,"sources":["../src/transform-markdown.ts"],"names":["transformMarkdown","input","output","unified","remarkParse","remarkSmartyPants","remarkRehype","rehypeWrapCjk","rehypeSanitize","rehypeStringify"],"mappings":"ojBAQO,SAASA,CAAkBC,CAAAA,CAAAA,CAAe,CAC/C,IAAMC,EAASC,eAAQ,EAAA,CACpB,GAAIC,CAAAA,kBAAW,CACf,CAAA,GAAA,CAAIC,kBAAiB,CACrB,CAAA,GAAA,CAAIC,kBAAY,CAAA,CAChB,GAAIC,CAAAA,kBAAa,EACjB,GAAIC,CAAAA,kBAAc,CAClB,CAAA,GAAA,CAAIC,kBAAe,CAAA,CACnB,WAAYR,CAAAA,CAAK,CAEpB,CAAA,OAAO,MAAOC,CAAAA,CAAM,CACtB","file":"transform-markdown.cjs","sourcesContent":["import rehypeSanitize from 'rehype-sanitize';\nimport rehypeStringify from 'rehype-stringify';\nimport rehypeWrapCjk from 'rehype-wrap-cjk';\nimport remarkParse from 'remark-parse';\nimport remarkRehype from 'remark-rehype';\nimport remarkSmartyPants from 'remark-smartypants';\nimport { unified } from 'unified';\n\nexport function transformMarkdown(input: string) {\n const output = unified()\n .use(remarkParse)\n .use(remarkSmartyPants)\n .use(remarkRehype)\n .use(rehypeWrapCjk)\n .use(rehypeSanitize)\n .use(rehypeStringify)\n .processSync(input);\n\n return String(output);\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as transformMarkdown}from'./chunk-
|
|
1
|
+
export{a as transformMarkdown}from'./chunk-UEE5G5GV.js';//# sourceMappingURL=transform-markdown.js.map
|
|
2
2
|
//# sourceMappingURL=transform-markdown.js.map
|
package/dist/wrap-cjk.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var t=require('rehype-parse'),
|
|
1
|
+
'use strict';var t=require('rehype-parse'),o=require('rehype-sanitize'),i=require('rehype-stringify'),p=require('rehype-wrap-cjk'),unified=require('unified');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var t__default=/*#__PURE__*/_interopDefault(t);var o__default=/*#__PURE__*/_interopDefault(o);var i__default=/*#__PURE__*/_interopDefault(i);var p__default=/*#__PURE__*/_interopDefault(p);function a(r){let e=unified.unified().use(t__default.default,{fragment:true}).use(p__default.default).use(o__default.default).use(i__default.default).processSync(r);return String(e)}exports.wrapCjk=a;//# sourceMappingURL=wrap-cjk.cjs.map
|
|
2
2
|
//# sourceMappingURL=wrap-cjk.cjs.map
|
package/dist/wrap-cjk.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/wrap-cjk.ts"],"names":["wrapCjk","input","output","unified","rehypeParse","rehypeWrapCjk","rehypeSanitize","rehypeStringify"],"mappings":"2ZAMO,SAASA,EAAQC,
|
|
1
|
+
{"version":3,"sources":["../src/wrap-cjk.ts"],"names":["wrapCjk","input","output","unified","rehypeParse","rehypeWrapCjk","rehypeSanitize","rehypeStringify"],"mappings":"2ZAMO,SAASA,EAAQC,CAAe,CAAA,CACrC,IAAMC,CAASC,CAAAA,eAAAA,GACZ,GAAIC,CAAAA,kBAAAA,CAAa,CAAE,QAAU,CAAA,IAAK,CAAC,CACnC,CAAA,GAAA,CAAIC,kBAAa,CACjB,CAAA,GAAA,CAAIC,kBAAc,CAClB,CAAA,GAAA,CAAIC,kBAAe,CACnB,CAAA,WAAA,CAAYN,CAAK,CAEpB,CAAA,OAAO,MAAOC,CAAAA,CAAM,CACtB","file":"wrap-cjk.cjs","sourcesContent":["import rehypeParse from 'rehype-parse';\nimport rehypeSanitize from 'rehype-sanitize';\nimport rehypeStringify from 'rehype-stringify';\nimport rehypeWrapCjk from 'rehype-wrap-cjk';\nimport { unified } from 'unified';\n\nexport function wrapCjk(input: string) {\n const output = unified()\n .use(rehypeParse, { fragment: true })\n .use(rehypeWrapCjk)\n .use(rehypeSanitize)\n .use(rehypeStringify)\n .processSync(input);\n\n return String(output);\n}\n"]}
|
package/dist/wrap-cjk.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as wrapCjk}from'./chunk-
|
|
1
|
+
export{a as wrapCjk}from'./chunk-IWTHDXJM.js';//# sourceMappingURL=wrap-cjk.js.map
|
|
2
2
|
//# sourceMappingURL=wrap-cjk.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsynaptic/unified-tools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "A common set of tools for transforming and manipulating markup and text",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -51,26 +51,26 @@
|
|
|
51
51
|
"rehype-parse": "^9.0.1",
|
|
52
52
|
"rehype-sanitize": "^6.0.0",
|
|
53
53
|
"rehype-stringify": "^10.0.1",
|
|
54
|
-
"rehype-wrap-cjk": "^0.2.
|
|
54
|
+
"rehype-wrap-cjk": "^0.2.7",
|
|
55
55
|
"remark-parse": "^11.0.0",
|
|
56
|
-
"remark-rehype": "^11.1.
|
|
56
|
+
"remark-rehype": "^11.1.2",
|
|
57
57
|
"remark-smartypants": "^3.0.2",
|
|
58
58
|
"retext": "^9.0.0",
|
|
59
59
|
"retext-smartypants": "^6.2.0",
|
|
60
60
|
"unified": "^11.0.5"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@eslint/js": "^9.
|
|
64
|
-
"@types/jest": "^
|
|
65
|
-
"eslint": "^9.
|
|
63
|
+
"@eslint/js": "^9.30.1",
|
|
64
|
+
"@types/jest": "^30.0.0",
|
|
65
|
+
"eslint": "^9.30.1",
|
|
66
66
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
67
|
-
"eslint-plugin-unicorn": "^
|
|
68
|
-
"globals": "^16.
|
|
69
|
-
"prettier": "^3.
|
|
70
|
-
"tsup": "^8.
|
|
71
|
-
"typescript": "^5.8.
|
|
72
|
-
"typescript-eslint": "^8.
|
|
73
|
-
"vitest": "^3.
|
|
67
|
+
"eslint-plugin-unicorn": "^59.0.1",
|
|
68
|
+
"globals": "^16.3.0",
|
|
69
|
+
"prettier": "^3.6.2",
|
|
70
|
+
"tsup": "^8.5.0",
|
|
71
|
+
"typescript": "^5.8.3",
|
|
72
|
+
"typescript-eslint": "^8.35.1",
|
|
73
|
+
"vitest": "^3.2.4"
|
|
74
74
|
},
|
|
75
|
-
"packageManager": "pnpm@10.
|
|
75
|
+
"packageManager": "pnpm@10.12.1+sha512.f0dda8580f0ee9481c5c79a1d927b9164f2c478e90992ad268bbb2465a736984391d6333d2c327913578b2804af33474ca554ba29c04a8b13060a717675ae3ac"
|
|
76
76
|
}
|
package/src/sanitize-html.ts
CHANGED
|
@@ -5,10 +5,7 @@ import { unified } from 'unified';
|
|
|
5
5
|
|
|
6
6
|
import type { Options as RehypeSanitizeOptions } from 'rehype-sanitize';
|
|
7
7
|
|
|
8
|
-
export function sanitizeHtml(
|
|
9
|
-
input: string,
|
|
10
|
-
options?: RehypeSanitizeOptions
|
|
11
|
-
): string {
|
|
8
|
+
export function sanitizeHtml(input: string, options?: RehypeSanitizeOptions) {
|
|
12
9
|
const output = unified()
|
|
13
10
|
.use(rehypeParse, { fragment: true })
|
|
14
11
|
.use(rehypeSanitize, options)
|
|
@@ -19,7 +16,5 @@ export function sanitizeHtml(
|
|
|
19
16
|
}
|
|
20
17
|
|
|
21
18
|
// Handy shortcut for when you just want to strip tags from text
|
|
22
|
-
export const stripTags = (
|
|
23
|
-
input:
|
|
24
|
-
options?: RehypeSanitizeOptions
|
|
25
|
-
): string => sanitizeHtml(input, { ...options, tagNames: [] });
|
|
19
|
+
export const stripTags = (input: string, options?: RehypeSanitizeOptions) =>
|
|
20
|
+
sanitizeHtml(input, { ...options, tagNames: [] });
|
package/src/stylize-text.ts
CHANGED
|
@@ -3,10 +3,7 @@ import retextSmartypants from 'retext-smartypants';
|
|
|
3
3
|
|
|
4
4
|
import type { Options as RetextSmartypantsOptions } from 'retext-smartypants';
|
|
5
5
|
|
|
6
|
-
export function stylizeText(
|
|
7
|
-
input: string,
|
|
8
|
-
options?: RetextSmartypantsOptions
|
|
9
|
-
): string {
|
|
6
|
+
export function stylizeText(input: string, options?: RetextSmartypantsOptions) {
|
|
10
7
|
const output = retext().use(retextSmartypants, options).processSync(input);
|
|
11
8
|
|
|
12
9
|
return String(output);
|
|
@@ -6,7 +6,7 @@ import remarkRehype from 'remark-rehype';
|
|
|
6
6
|
import remarkSmartyPants from 'remark-smartypants';
|
|
7
7
|
import { unified } from 'unified';
|
|
8
8
|
|
|
9
|
-
export function transformMarkdown(input: string)
|
|
9
|
+
export function transformMarkdown(input: string) {
|
|
10
10
|
const output = unified()
|
|
11
11
|
.use(remarkParse)
|
|
12
12
|
.use(remarkSmartyPants)
|
package/src/wrap-cjk.ts
CHANGED
|
@@ -4,7 +4,7 @@ import rehypeStringify from 'rehype-stringify';
|
|
|
4
4
|
import rehypeWrapCjk from 'rehype-wrap-cjk';
|
|
5
5
|
import { unified } from 'unified';
|
|
6
6
|
|
|
7
|
-
export function wrapCjk(input: string)
|
|
7
|
+
export function wrapCjk(input: string) {
|
|
8
8
|
const output = unified()
|
|
9
9
|
.use(rehypeParse, { fragment: true })
|
|
10
10
|
.use(rehypeWrapCjk)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/stylize-text.ts"],"names":["stylizeText","input","options","output","retext","retextSmartypants"],"mappings":"8DAKO,SAASA,CAAAA,CACdC,CACAC,CAAAA,CAAAA,CACQ,CACR,IAAMC,EAASC,MAAO,EAAA,CAAE,GAAIC,CAAAA,CAAAA,CAAmBH,CAAO,CAAA,CAAE,WAAYD,CAAAA,CAAK,CAEzE,CAAA,OAAO,MAAOE,CAAAA,CAAM,CACtB","file":"chunk-5RPJUYTO.js","sourcesContent":["import { retext } from 'retext';\nimport retextSmartypants from 'retext-smartypants';\n\nimport type { Options as RetextSmartypantsOptions } from 'retext-smartypants';\n\nexport function stylizeText(\n input: string,\n options?: RetextSmartypantsOptions\n): string {\n const output = retext().use(retextSmartypants, options).processSync(input);\n\n return String(output);\n}\n"]}
|
package/dist/chunk-7QE4BXN4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import r from'rehype-parse';import n from'rehype-sanitize';import p from'rehype-stringify';import {unified}from'unified';function o(t,e){let i=unified().use(r,{fragment:true}).use(n,e).use(p).processSync(t);return String(i)}var g=(t,e)=>o(t,{...e,tagNames:[]});export{o as a,g as b};//# sourceMappingURL=chunk-7QE4BXN4.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-7QE4BXN4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/sanitize-html.ts"],"names":["sanitizeHtml","input","options","output","unified","rehypeParse","rehypeSanitize","rehypeStringify","stripTags"],"mappings":"yHAOO,SAASA,EACdC,CACAC,CAAAA,CAAAA,CACQ,CACR,IAAMC,CAASC,CAAAA,OAAAA,EACZ,CAAA,GAAA,CAAIC,CAAa,CAAA,CAAE,QAAU,CAAA,IAAK,CAAC,CAAA,CACnC,IAAIC,CAAgBJ,CAAAA,CAAO,CAC3B,CAAA,GAAA,CAAIK,CAAe,CAAA,CACnB,WAAYN,CAAAA,CAAK,CAEpB,CAAA,OAAO,MAAOE,CAAAA,CAAM,CACtB,KAGaK,CAAY,CAAA,CACvBP,CACAC,CAAAA,CAAAA,GACWF,CAAaC,CAAAA,CAAAA,CAAO,CAAE,GAAGC,CAAS,CAAA,QAAA,CAAU,EAAG,CAAC","file":"chunk-7QE4BXN4.js","sourcesContent":["import rehypeParse from 'rehype-parse';\nimport rehypeSanitize from 'rehype-sanitize';\nimport rehypeStringify from 'rehype-stringify';\nimport { unified } from 'unified';\n\nimport type { Options as RehypeSanitizeOptions } from 'rehype-sanitize';\n\nexport function sanitizeHtml(\n input: string,\n options?: RehypeSanitizeOptions\n): string {\n const output = unified()\n .use(rehypeParse, { fragment: true })\n .use(rehypeSanitize, options)\n .use(rehypeStringify)\n .processSync(input);\n\n return String(output);\n}\n\n// Handy shortcut for when you just want to strip tags from text\nexport const stripTags = (\n input: string,\n options?: RehypeSanitizeOptions\n): string => sanitizeHtml(input, { ...options, tagNames: [] });\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/transform-markdown.ts"],"names":["transformMarkdown","input","output","unified","remarkParse","remarkSmartyPants","remarkRehype","rehypeWrapCjk","rehypeSanitize","rehypeStringify"],"mappings":"uNAQO,SAASA,CAAkBC,CAAAA,CAAAA,CAAuB,CACvD,IAAMC,EAASC,OAAQ,EAAA,CACpB,GAAIC,CAAAA,CAAW,CACf,CAAA,GAAA,CAAIC,CAAiB,CACrB,CAAA,GAAA,CAAIC,CAAY,CAAA,CAChB,GAAIC,CAAAA,CAAa,EACjB,GAAIC,CAAAA,CAAc,CAClB,CAAA,GAAA,CAAIC,CAAe,CAAA,CACnB,WAAYR,CAAAA,CAAK,CAEpB,CAAA,OAAO,MAAOC,CAAAA,CAAM,CACtB","file":"chunk-CDY2GI2P.js","sourcesContent":["import rehypeSanitize from 'rehype-sanitize';\nimport rehypeStringify from 'rehype-stringify';\nimport rehypeWrapCjk from 'rehype-wrap-cjk';\nimport remarkParse from 'remark-parse';\nimport remarkRehype from 'remark-rehype';\nimport remarkSmartyPants from 'remark-smartypants';\nimport { unified } from 'unified';\n\nexport function transformMarkdown(input: string): string {\n const output = unified()\n .use(remarkParse)\n .use(remarkSmartyPants)\n .use(remarkRehype)\n .use(rehypeWrapCjk)\n .use(rehypeSanitize)\n .use(rehypeStringify)\n .processSync(input);\n\n return String(output);\n}\n"]}
|
package/dist/chunk-EGSAYCRK.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import t from'rehype-parse';import i from'rehype-sanitize';import o from'rehype-stringify';import p from'rehype-wrap-cjk';import {unified}from'unified';function a(r){let e=unified().use(t,{fragment:true}).use(p).use(i).use(o).processSync(r);return String(e)}export{a};//# sourceMappingURL=chunk-EGSAYCRK.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-EGSAYCRK.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/wrap-cjk.ts"],"names":["wrapCjk","input","output","unified","rehypeParse","rehypeWrapCjk","rehypeSanitize","rehypeStringify"],"mappings":"wJAMO,SAASA,EAAQC,CAAuB,CAAA,CAC7C,IAAMC,CAASC,CAAAA,OAAAA,GACZ,GAAIC,CAAAA,CAAAA,CAAa,CAAE,QAAU,CAAA,IAAK,CAAC,CACnC,CAAA,GAAA,CAAIC,CAAa,CACjB,CAAA,GAAA,CAAIC,CAAc,CAClB,CAAA,GAAA,CAAIC,CAAe,CACnB,CAAA,WAAA,CAAYN,CAAK,CAEpB,CAAA,OAAO,MAAOC,CAAAA,CAAM,CACtB","file":"chunk-EGSAYCRK.js","sourcesContent":["import rehypeParse from 'rehype-parse';\nimport rehypeSanitize from 'rehype-sanitize';\nimport rehypeStringify from 'rehype-stringify';\nimport rehypeWrapCjk from 'rehype-wrap-cjk';\nimport { unified } from 'unified';\n\nexport function wrapCjk(input: string): string {\n const output = unified()\n .use(rehypeParse, { fragment: true })\n .use(rehypeWrapCjk)\n .use(rehypeSanitize)\n .use(rehypeStringify)\n .processSync(input);\n\n return String(output);\n}\n"]}
|