@shell-shock/unified 0.1.0 → 0.1.1
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.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/markdown/index.cjs +1 -1
- package/dist/markdown/index.d.cts.map +1 -1
- package/dist/markdown/index.d.mts.map +1 -1
- package/dist/markdown/index.mjs +1 -2
- package/dist/markdown-Bs-BRrSC.mjs +3 -0
- package/dist/markdown-Bs-BRrSC.mjs.map +1 -0
- package/dist/markdown-TYR6_cQU.cjs +2 -0
- package/package.json +4 -4
- package/dist/markdown/index.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./html/index.cjs`),t=require(`./markdown
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./html/index.cjs`),t=require(`./markdown-TYR6_cQU.cjs`),n={heading:(e,t=1)=>`bold(textColors.heading.${t===1?`primary`:t===2?`secondary`:`tertiary`}("${e}"))`,body:e=>`textColors.body.primary("${e}")`,bold:e=>`bold("${e}")`,italic:e=>`italic("${e}")`,strikethrough:e=>`strikethrough("${e}")`,underline:e=>`underline("${e}")`,blockquote:e=>`blockquote("${e}")`,link:(e,t)=>`link("${e}"${t?`, "${t}"`:``})`,table:e=>`table(${JSON.stringify(e)})`,code:(e,t)=>`code(${JSON.stringify(e)}${t?`, "${t}"`:``})`,inlineCode:e=>`inlineCode("${e}")`,break:()=>`writeLine("")`,divider:()=>`divider({ border: "primary" })`};exports.defaultRenderAdapter=n,exports.html=e,exports.markdown=t.t;
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"./html/index.mjs";import
|
|
1
|
+
import e from"./html/index.mjs";import{t}from"./markdown-Bs-BRrSC.mjs";const n={heading:(e,t=1)=>`bold(textColors.heading.${t===1?`primary`:t===2?`secondary`:`tertiary`}("${e}"))`,body:e=>`textColors.body.primary("${e}")`,bold:e=>`bold("${e}")`,italic:e=>`italic("${e}")`,strikethrough:e=>`strikethrough("${e}")`,underline:e=>`underline("${e}")`,blockquote:e=>`blockquote("${e}")`,link:(e,t)=>`link("${e}"${t?`, "${t}"`:``})`,table:e=>`table(${JSON.stringify(e)})`,code:(e,t)=>`code(${JSON.stringify(e)}${t?`, "${t}"`:``})`,inlineCode:e=>`inlineCode("${e}")`,break:()=>`writeLine("")`,divider:()=>`divider({ border: "primary" })`};export{n as defaultRenderAdapter,e as html,t as markdown};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/adapter.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { RenderAdapter } from \"./types\";\n\n/**\n * Default render adapter that converts markdown nodes into Shell Shock source code strings. This adapter can be customized by providing a different implementation of the `RenderAdapter` interface in the options when using the `outputPlugin`. Each method in the adapter corresponds to a specific markdown construct and defines how it should be rendered in the output string.\n */\nexport const defaultRenderAdapter: RenderAdapter = {\n /**\n * Heading text.\n */\n heading: (text: string, level = 1) =>\n `bold(textColors.heading.${\n level === 1 ? \"primary\" : level === 2 ? \"secondary\" : \"tertiary\"\n }(\"${text}\"))`,\n\n /**\n * Body text.\n */\n body: (text: string) => `textColors.body.primary(\"${text}\")`,\n\n /**\n * Bold text.\n */\n bold: (text: string) => `bold(\"${text}\")`,\n\n /**\n * Italic text.\n */\n italic: (text: string) => `italic(\"${text}\")`,\n\n /**\n * Strikethrough text.\n */\n strikethrough: (text: string) => `strikethrough(\"${text}\")`,\n\n /**\n * Underlined text.\n */\n underline: (text: string) => `underline(\"${text}\")`,\n\n /**\n * Blockquote text.\n */\n blockquote: (text: string) => `blockquote(\"${text}\")`,\n\n /**\n * Link text.\n */\n link: (url: string, text?: string) =>\n `link(\"${url}\"${text ? `, \"${text}\"` : \"\"})`,\n\n /**\n * Table.\n */\n table: (cells: string[][]) => `table(${JSON.stringify(cells)})`,\n\n /**\n * Code block.\n */\n code: (text: string, language?: string) =>\n `code(${JSON.stringify(text)}${language ? `, \"${language}\"` : \"\"})`,\n\n /**\n * Inline code.\n */\n inlineCode: (text: string) => `inlineCode(\"${text}\")`,\n\n /**\n * Line break.\n */\n break: () => 'writeLine(\"\")',\n\n /**\n * Horizontal divider.\n */\n divider: () => 'divider({ border: \"primary\" })'\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/adapter.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { RenderAdapter } from \"./types\";\n\n/**\n * Default render adapter that converts markdown nodes into Shell Shock source code strings. This adapter can be customized by providing a different implementation of the `RenderAdapter` interface in the options when using the `outputPlugin`. Each method in the adapter corresponds to a specific markdown construct and defines how it should be rendered in the output string.\n */\nexport const defaultRenderAdapter: RenderAdapter = {\n /**\n * Heading text.\n */\n heading: (text: string, level = 1) =>\n `bold(textColors.heading.${\n level === 1 ? \"primary\" : level === 2 ? \"secondary\" : \"tertiary\"\n }(\"${text}\"))`,\n\n /**\n * Body text.\n */\n body: (text: string) => `textColors.body.primary(\"${text}\")`,\n\n /**\n * Bold text.\n */\n bold: (text: string) => `bold(\"${text}\")`,\n\n /**\n * Italic text.\n */\n italic: (text: string) => `italic(\"${text}\")`,\n\n /**\n * Strikethrough text.\n */\n strikethrough: (text: string) => `strikethrough(\"${text}\")`,\n\n /**\n * Underlined text.\n */\n underline: (text: string) => `underline(\"${text}\")`,\n\n /**\n * Blockquote text.\n */\n blockquote: (text: string) => `blockquote(\"${text}\")`,\n\n /**\n * Link text.\n */\n link: (url: string, text?: string) =>\n `link(\"${url}\"${text ? `, \"${text}\"` : \"\"})`,\n\n /**\n * Table.\n */\n table: (cells: string[][]) => `table(${JSON.stringify(cells)})`,\n\n /**\n * Code block.\n */\n code: (text: string, language?: string) =>\n `code(${JSON.stringify(text)}${language ? `, \"${language}\"` : \"\"})`,\n\n /**\n * Inline code.\n */\n inlineCode: (text: string) => `inlineCode(\"${text}\")`,\n\n /**\n * Line break.\n */\n break: () => 'writeLine(\"\")',\n\n /**\n * Horizontal divider.\n */\n divider: () => 'divider({ border: \"primary\" })'\n};\n"],"mappings":"uEAuBA,MAAa,EAAsC,CAIjD,SAAU,EAAc,EAAQ,IAC9B,2BACE,IAAU,EAAI,UAAY,IAAU,EAAI,YAAc,WACvD,IAAI,EAAK,KAKZ,KAAO,GAAiB,4BAA4B,EAAK,IAKzD,KAAO,GAAiB,SAAS,EAAK,IAKtC,OAAS,GAAiB,WAAW,EAAK,IAK1C,cAAgB,GAAiB,kBAAkB,EAAK,IAKxD,UAAY,GAAiB,cAAc,EAAK,IAKhD,WAAa,GAAiB,eAAe,EAAK,IAKlD,MAAO,EAAa,IAClB,SAAS,EAAI,GAAG,EAAO,MAAM,EAAK,GAAK,GAAG,GAK5C,MAAQ,GAAsB,SAAS,KAAK,UAAU,EAAM,CAAC,GAK7D,MAAO,EAAc,IACnB,QAAQ,KAAK,UAAU,EAAK,GAAG,EAAW,MAAM,EAAS,GAAK,GAAG,GAKnE,WAAa,GAAiB,eAAe,EAAK,IAKlD,UAAa,gBAKb,YAAe,iCAChB"}
|
package/dist/markdown/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=
|
|
1
|
+
const e=require(`../markdown-TYR6_cQU.cjs`);module.exports=e.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/markdown/index.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/markdown/index.ts"],"mappings":";cAoBM,QAAA,GAAY,IAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/markdown/index.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/markdown/index.ts"],"mappings":";cAoBM,QAAA,GAAY,IAAA"}
|
package/dist/markdown/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
import{t as e}from"../markdown-Bs-BRrSC.mjs";export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-Bs-BRrSC.mjs","names":[],"sources":["../src/helpers.ts","../src/markdown/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport function escapeText(text: string) {\n return text\n .replaceAll(\"`\", \"\\\\`\")\n .replaceAll(\"${\", \"\\\\${\")\n .replaceAll(\"\\\\\", \"\\\\\\\\\")\n .replaceAll(\"\\n\", \"\\\\n\")\n .replaceAll(\"\\r\", \"\\\\r\")\n .replaceAll(\"\\t\", \"\\\\t\");\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { escapeText } from \"../helpers\";\n\nconst markdown = (text: string) => {\n return `textColors.heading.primary(\\`${escapeText(text)}\\`)`;\n};\n\nexport default markdown;\n"],"mappings":"AAkBA,SAAgB,EAAW,EAAc,CACvC,OAAO,EACJ,WAAW,IAAK,MAAM,CACtB,WAAW,KAAM,OAAO,CACxB,WAAW,KAAM,OAAO,CACxB,WAAW;EAAM,MAAM,CACvB,WAAW,KAAM,MAAM,CACvB,WAAW,IAAM,MAAM,CCL5B,MAAM,EAAY,GACT,gCAAgC,EAAW,EAAK,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e){return e.replaceAll("`","\\`").replaceAll("${","\\${").replaceAll(`\\`,`\\\\`).replaceAll(`
|
|
2
|
+
`,`\\n`).replaceAll(`\r`,`\\r`).replaceAll(` `,`\\t`)}const t=t=>`textColors.heading.primary(\`${e(t)}\`)`;Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/unified",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Shell Shock plugin to generate unified built-in modules that display information about the application.",
|
|
6
6
|
"keywords": ["unified", "shell-shock", "powerlines", "storm-software"],
|
|
@@ -90,10 +90,10 @@
|
|
|
90
90
|
"typings": "dist/index.d.mts",
|
|
91
91
|
"files": ["dist/**/*"],
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@shell-shock/core": "^0.16.
|
|
93
|
+
"@shell-shock/core": "^0.16.1",
|
|
94
94
|
"@stryke/path": "^0.27.4",
|
|
95
95
|
"@stryke/type-checks": "^0.6.1",
|
|
96
|
-
"defu": "^6.1.
|
|
96
|
+
"defu": "^6.1.7",
|
|
97
97
|
"parse5": "^8.0.0",
|
|
98
98
|
"powerlines": "^0.42.33"
|
|
99
99
|
},
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"@types/node": "^25.5.2"
|
|
103
103
|
},
|
|
104
104
|
"publishConfig": { "access": "public" },
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "5620dfed15a7d3ff47ad3f1665f6fdd8c6fd5d08"
|
|
106
106
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/markdown/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nconst markdown = (text: string) => {\n return `textColors.heading.primary(\\`${text}\\`)`;\n};\n\nexport default markdown;\n"],"mappings":"AAkBA,MAAM,EAAY,GACT,gCAAgC,EAAK"}
|