@shell-shock/preset-cli 0.8.3 → 0.8.5
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/README.md +1 -1
- package/dist/components/{banner-function-declaration.cjs → banner-builtin.cjs} +47 -36
- package/dist/components/banner-builtin.d.cts +23 -0
- package/dist/components/banner-builtin.d.cts.map +1 -0
- package/dist/components/banner-builtin.d.mts +23 -0
- package/dist/components/banner-builtin.d.mts.map +1 -0
- package/dist/components/banner-builtin.mjs +88 -0
- package/dist/components/banner-builtin.mjs.map +1 -0
- package/dist/components/command-entry.cjs +182 -186
- package/dist/components/command-entry.d.cts +1 -1
- package/dist/components/command-entry.d.cts.map +1 -1
- package/dist/components/command-entry.d.mts.map +1 -1
- package/dist/components/command-entry.mjs +182 -186
- package/dist/components/command-entry.mjs.map +1 -1
- package/dist/components/command-router.cjs +1 -1
- package/dist/components/command-router.mjs +1 -1
- package/dist/components/command-router.mjs.map +1 -1
- package/dist/components/index.cjs +3 -2
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +2 -2
- package/dist/components/virtual-command-entry.cjs +18 -22
- package/dist/components/virtual-command-entry.d.cts +1 -1
- package/dist/components/virtual-command-entry.d.cts.map +1 -1
- package/dist/components/virtual-command-entry.d.mts.map +1 -1
- package/dist/components/virtual-command-entry.mjs +18 -22
- package/dist/components/virtual-command-entry.mjs.map +1 -1
- package/dist/index.cjs +37 -7
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +38 -8
- package/dist/index.mjs.map +1 -1
- package/dist/plugin-banner/dist/components/banner-builtin.cjs +63 -0
- package/dist/plugin-banner/dist/components/banner-builtin.mjs +62 -0
- package/dist/plugin-banner/dist/components/banner-builtin.mjs.map +1 -0
- package/dist/plugin-banner/dist/components/banner-function-declaration.cjs +135 -0
- package/dist/plugin-banner/dist/components/banner-function-declaration.d.cts +45 -0
- package/dist/plugin-banner/dist/components/banner-function-declaration.d.cts.map +1 -0
- package/dist/plugin-banner/dist/components/banner-function-declaration.d.mts +45 -0
- package/dist/plugin-banner/dist/components/banner-function-declaration.d.mts.map +1 -0
- package/dist/plugin-banner/dist/components/banner-function-declaration.mjs +133 -0
- package/dist/plugin-banner/dist/components/banner-function-declaration.mjs.map +1 -0
- package/dist/plugin-help/dist/components/display.cjs +16 -2
- package/dist/plugin-help/dist/components/display.mjs +16 -2
- package/dist/plugin-help/dist/components/display.mjs.map +1 -1
- package/dist/plugin-help/dist/index.cjs +2 -2
- package/dist/plugin-help/dist/index.mjs +2 -2
- package/dist/plugin-help/dist/index.mjs.map +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/constant-case.cjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/constant-case.mjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/constant-case.mjs.map +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/get-words.cjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/get-words.mjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/get-words.mjs.map +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/kebab-case.cjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/kebab-case.mjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/kebab-case.mjs.map +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/snake-case.cjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/snake-case.mjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/snake-case.mjs.map +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/upper-case-first.cjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/upper-case-first.mjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_string-format@0.17.4 → @stryke_string-format@0.17.6}/node_modules/@stryke/string-format/dist/upper-case-first.mjs.map +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-empty.cjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-empty.mjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-empty.mjs.map +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-null.cjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-null.mjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-null.mjs.map +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-set-string.cjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-set-string.mjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-set-string.mjs.map +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-set.cjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-set.mjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-set.mjs.map +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-string.cjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-string.mjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-string.mjs.map +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-undefined.cjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-undefined.mjs +1 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/{@stryke_type-checks@0.5.39 → @stryke_type-checks@0.5.41}/node_modules/@stryke/type-checks/dist/is-undefined.mjs.map +1 -1
- package/package.json +21 -21
- package/dist/components/banner-function-declaration.d.cts +0 -11
- package/dist/components/banner-function-declaration.d.cts.map +0 -1
- package/dist/components/banner-function-declaration.d.mts +0 -11
- package/dist/components/banner-function-declaration.d.mts.map +0 -1
- package/dist/components/banner-function-declaration.mjs +0 -78
- package/dist/components/banner-function-declaration.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
2
|
+
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-null.mjs
|
|
3
3
|
const isNull = (value) => {
|
|
4
4
|
try {
|
|
5
5
|
return value === null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
1
|
+
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-null.mjs
|
|
2
2
|
const isNull = (value) => {
|
|
3
3
|
try {
|
|
4
4
|
return value === null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-null.mjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
1
|
+
{"version":3,"file":"is-null.mjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-null.mjs"],"sourcesContent":["//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-null.mjs\nconst isNull = (value) => {\n\ttry {\n\t\treturn value === null;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isNull };\n//# sourceMappingURL=is-null.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,UAAU,UAAU;AACzB,KAAI;AACH,SAAO,UAAU;SACV;AACP,SAAO"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_is_string = require('./is-string.cjs');
|
|
2
2
|
const require_is_set = require('./is-set.cjs');
|
|
3
3
|
|
|
4
|
-
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
4
|
+
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.mjs
|
|
5
5
|
/**
|
|
6
6
|
* Determine if the type is string and is not empty (length greater than zero)
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isString } from "./is-string.mjs";
|
|
2
2
|
import { isSet } from "./is-set.mjs";
|
|
3
3
|
|
|
4
|
-
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
4
|
+
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.mjs
|
|
5
5
|
/**
|
|
6
6
|
* Determine if the type is string and is not empty (length greater than zero)
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-set-string.mjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
1
|
+
{"version":3,"file":"is-set-string.mjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.mjs"],"sourcesContent":["import { isString } from \"./is-string.mjs\";\nimport { isSet } from \"./is-set.mjs\";\n\n//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.mjs\n/**\n* Determine if the type is string and is not empty (length greater than zero)\n*\n* @param value - The value to type check\n* @returns An indicator specifying if the value provided is of type `string` and length greater than zero\n*/\nconst isSetString = (value) => {\n\ttry {\n\t\treturn isSet(value) && isString(value) && value.length > 0;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isSetString };\n//# sourceMappingURL=is-set-string.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAUA,MAAM,eAAe,UAAU;AAC9B,KAAI;AACH,SAAO,MAAM,MAAM,IAAI,SAAS,MAAM,IAAI,MAAM,SAAS;SAClD;AACP,SAAO"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_is_empty = require('./is-empty.cjs');
|
|
2
2
|
|
|
3
|
-
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
3
|
+
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set.mjs
|
|
4
4
|
/**
|
|
5
5
|
* The inverse of the `isEmpty` function
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isEmpty } from "./is-empty.mjs";
|
|
2
2
|
|
|
3
|
-
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
3
|
+
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set.mjs
|
|
4
4
|
/**
|
|
5
5
|
* The inverse of the `isEmpty` function
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-set.mjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
1
|
+
{"version":3,"file":"is-set.mjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set.mjs"],"sourcesContent":["import { isEmpty } from \"./is-empty.mjs\";\n\n//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set.mjs\n/**\n* The inverse of the `isEmpty` function\n*\n* @param value - The value to type check\n* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`\n*/\nconst isSet = (value) => {\n\ttry {\n\t\treturn !isEmpty(value);\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isSet };\n//# sourceMappingURL=is-set.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AASA,MAAM,SAAS,UAAU;AACxB,KAAI;AACH,SAAO,CAAC,QAAQ,MAAM;SACf;AACP,SAAO"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
2
|
+
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-string.mjs
|
|
3
3
|
const isString = (value) => {
|
|
4
4
|
try {
|
|
5
5
|
return typeof value === "string";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
1
|
+
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-string.mjs
|
|
2
2
|
const isString = (value) => {
|
|
3
3
|
try {
|
|
4
4
|
return typeof value === "string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-string.mjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
1
|
+
{"version":3,"file":"is-string.mjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-string.mjs"],"sourcesContent":["//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-string.mjs\nconst isString = (value) => {\n\ttry {\n\t\treturn typeof value === \"string\";\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isString };\n//# sourceMappingURL=is-string.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,YAAY,UAAU;AAC3B,KAAI;AACH,SAAO,OAAO,UAAU;SACjB;AACP,SAAO"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
2
|
+
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-undefined.mjs
|
|
3
3
|
const isUndefined = (value) => {
|
|
4
4
|
return value === void 0;
|
|
5
5
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
1
|
+
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-undefined.mjs
|
|
2
2
|
const isUndefined = (value) => {
|
|
3
3
|
return value === void 0;
|
|
4
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-undefined.mjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.
|
|
1
|
+
{"version":3,"file":"is-undefined.mjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-undefined.mjs"],"sourcesContent":["//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-undefined.mjs\nconst isUndefined = (value) => {\n\treturn value === void 0;\n};\n\n//#endregion\nexport { isUndefined };\n//# sourceMappingURL=is-undefined.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,eAAe,UAAU;AAC9B,QAAO,UAAU,KAAK"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/preset-cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Shell Shock plugin to generate source code given a list design tokens.",
|
|
6
6
|
"keywords": [
|
|
@@ -73,18 +73,18 @@
|
|
|
73
73
|
"default": "./dist/components/index.mjs"
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
|
-
"./components/banner-
|
|
76
|
+
"./components/banner-builtin": {
|
|
77
77
|
"require": {
|
|
78
|
-
"types": "./dist/components/banner-
|
|
79
|
-
"default": "./dist/components/banner-
|
|
78
|
+
"types": "./dist/components/banner-builtin.d.cts",
|
|
79
|
+
"default": "./dist/components/banner-builtin.cjs"
|
|
80
80
|
},
|
|
81
81
|
"import": {
|
|
82
|
-
"types": "./dist/components/banner-
|
|
83
|
-
"default": "./dist/components/banner-
|
|
82
|
+
"types": "./dist/components/banner-builtin.d.mts",
|
|
83
|
+
"default": "./dist/components/banner-builtin.mjs"
|
|
84
84
|
},
|
|
85
85
|
"default": {
|
|
86
|
-
"types": "./dist/components/banner-
|
|
87
|
-
"default": "./dist/components/banner-
|
|
86
|
+
"types": "./dist/components/banner-builtin.d.mts",
|
|
87
|
+
"default": "./dist/components/banner-builtin.mjs"
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
"./components/command-entry": {
|
|
@@ -181,20 +181,20 @@
|
|
|
181
181
|
"dependencies": {
|
|
182
182
|
"@alloy-js/core": "0.23.0-dev.8",
|
|
183
183
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
184
|
-
"@powerlines/deepkit": "^0.6.
|
|
185
|
-
"@powerlines/plugin-alloy": "^0.25.
|
|
186
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
187
|
-
"@shell-shock/core": "^0.13.
|
|
188
|
-
"@shell-shock/plugin-console": "^0.1.
|
|
189
|
-
"@shell-shock/plugin-prompts": "^0.3.
|
|
190
|
-
"@shell-shock/plugin-theme": "^0.3.
|
|
191
|
-
"@shell-shock/plugin-upgrade": "^0.1.
|
|
192
|
-
"@shell-shock/preset-script": "^0.6.
|
|
193
|
-
"@stryke/path": "^0.27.
|
|
194
|
-
"@stryke/string-format": "^0.17.
|
|
184
|
+
"@powerlines/deepkit": "^0.6.146",
|
|
185
|
+
"@powerlines/plugin-alloy": "^0.25.53",
|
|
186
|
+
"@powerlines/plugin-plugin": "^0.12.318",
|
|
187
|
+
"@shell-shock/core": "^0.13.2",
|
|
188
|
+
"@shell-shock/plugin-console": "^0.1.13",
|
|
189
|
+
"@shell-shock/plugin-prompts": "^0.3.14",
|
|
190
|
+
"@shell-shock/plugin-theme": "^0.3.17",
|
|
191
|
+
"@shell-shock/plugin-upgrade": "^0.1.19",
|
|
192
|
+
"@shell-shock/preset-script": "^0.6.28",
|
|
193
|
+
"@stryke/path": "^0.27.2",
|
|
194
|
+
"@stryke/string-format": "^0.17.6",
|
|
195
195
|
"cfonts": "^3.3.1",
|
|
196
196
|
"defu": "^6.1.4",
|
|
197
|
-
"powerlines": "^0.
|
|
197
|
+
"powerlines": "^0.42.8"
|
|
198
198
|
},
|
|
199
199
|
"devDependencies": {
|
|
200
200
|
"@babel/core": "^7.29.0",
|
|
@@ -224,5 +224,5 @@
|
|
|
224
224
|
"./package.json": "./package.json"
|
|
225
225
|
}
|
|
226
226
|
},
|
|
227
|
-
"gitHead": "
|
|
227
|
+
"gitHead": "64e1ac187a12cd18acfd8134768bb793bbda3947"
|
|
228
228
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
-
import { BannerFunctionDeclarationProps } from "@shell-shock/preset-script/components/banner-function-declaration";
|
|
3
|
-
|
|
4
|
-
//#region src/components/banner-function-declaration.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* A component to generate the `banner` function in the `shell-shock:console` builtin module.
|
|
7
|
-
*/
|
|
8
|
-
declare function BannerFunctionDeclaration(props: BannerFunctionDeclarationProps): _alloy_js_core0.Children;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { BannerFunctionDeclaration };
|
|
11
|
-
//# sourceMappingURL=banner-function-declaration.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"banner-function-declaration.d.cts","names":[],"sources":["../../src/components/banner-function-declaration.tsx"],"mappings":";;;;;;;iBA+BgB,yBAAA,CACd,KAAA,EAAO,8BAAA,GAA8B,eAAA,CAAA,QAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
-
import { BannerFunctionDeclarationProps } from "@shell-shock/preset-script/components/banner-function-declaration";
|
|
3
|
-
|
|
4
|
-
//#region src/components/banner-function-declaration.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* A component to generate the `banner` function in the `shell-shock:console` builtin module.
|
|
7
|
-
*/
|
|
8
|
-
declare function BannerFunctionDeclaration(props: BannerFunctionDeclarationProps): _alloy_js_core0.Children;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { BannerFunctionDeclaration };
|
|
11
|
-
//# sourceMappingURL=banner-function-declaration.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"banner-function-declaration.d.mts","names":[],"sources":["../../src/components/banner-function-declaration.tsx"],"mappings":";;;;;;;iBA+BgB,yBAAA,CACd,KAAA,EAAO,8BAAA,GAA8B,eAAA,CAAA,QAAA"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { createComponent, memo } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { code, computed } from "@alloy-js/core";
|
|
3
|
-
import { FunctionDeclaration, IfStatement } from "@alloy-js/typescript";
|
|
4
|
-
import { getAppDescription, getAppTitle } from "@shell-shock/core/plugin-utils";
|
|
5
|
-
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
6
|
-
import { useTheme } from "@shell-shock/plugin-theme/contexts/theme";
|
|
7
|
-
import { BannerFunctionBodyDeclaration } from "@shell-shock/preset-script/components/banner-function-declaration";
|
|
8
|
-
import { render } from "cfonts";
|
|
9
|
-
|
|
10
|
-
//#region src/components/banner-function-declaration.tsx
|
|
11
|
-
/**
|
|
12
|
-
* A component to generate the `banner` function in the `shell-shock:console` builtin module.
|
|
13
|
-
*/
|
|
14
|
-
function BannerFunctionDeclaration(props) {
|
|
15
|
-
const { consoleFnName = "log", variant = "primary", command } = props;
|
|
16
|
-
const theme = useTheme();
|
|
17
|
-
const context = usePowerlines();
|
|
18
|
-
const header = computed(() => `${theme.labels.banner.header[variant] || getAppTitle(context)} v${context.packageJson.version || "1.0.0"}`);
|
|
19
|
-
const footer = computed(() => theme.labels.banner.footer[variant]);
|
|
20
|
-
const title = computed(() => getAppTitle(context, true).replace(`v${context.packageJson.version || "1.0.0"}`, ""));
|
|
21
|
-
const description = computed(() => command?.description || getAppDescription(context));
|
|
22
|
-
const titleLines = computed(() => {
|
|
23
|
-
const result = render(getAppTitle(context, true), {
|
|
24
|
-
font: "tiny",
|
|
25
|
-
align: "left",
|
|
26
|
-
background: "transparent",
|
|
27
|
-
letterSpacing: 1,
|
|
28
|
-
lineHeight: 1,
|
|
29
|
-
gradient: false,
|
|
30
|
-
transitionGradient: false,
|
|
31
|
-
env: "node"
|
|
32
|
-
});
|
|
33
|
-
if (!result) return [`${getAppTitle(context, true)} Command-Line Interface`];
|
|
34
|
-
return result.array;
|
|
35
|
-
});
|
|
36
|
-
const bannerPadding = computed(() => Math.max(theme.padding.app, 0) * 2 + theme.borderStyles.banner.outline[variant].left.length + theme.borderStyles.banner.outline[variant].right.length);
|
|
37
|
-
const totalPadding = computed(() => Math.max(theme.padding.banner, 0) * 2 + bannerPadding.value);
|
|
38
|
-
return [createComponent(FunctionDeclaration, {
|
|
39
|
-
async: true,
|
|
40
|
-
name: "banner",
|
|
41
|
-
get doc() {
|
|
42
|
-
return `Write the ${getAppTitle(context, true)} application banner ${command ? `for the ${command.title} command ` : ""}to the console.`;
|
|
43
|
-
},
|
|
44
|
-
parameters: [{
|
|
45
|
-
name: "pause",
|
|
46
|
-
type: "number",
|
|
47
|
-
default: 500
|
|
48
|
-
}],
|
|
49
|
-
get children() {
|
|
50
|
-
return [createComponent(BannerFunctionBodyDeclaration, {
|
|
51
|
-
get header() {
|
|
52
|
-
return header.value;
|
|
53
|
-
},
|
|
54
|
-
get description() {
|
|
55
|
-
return description.value;
|
|
56
|
-
},
|
|
57
|
-
get footer() {
|
|
58
|
-
return footer.value;
|
|
59
|
-
},
|
|
60
|
-
variant,
|
|
61
|
-
consoleFnName,
|
|
62
|
-
command,
|
|
63
|
-
insertNewlineAfterDescription: true,
|
|
64
|
-
get children() {
|
|
65
|
-
return code`const titleLines = [${titleLines.value.map((line) => JSON.stringify(line.trim())).join(", ")}];
|
|
66
|
-
const title = Math.max(...titleLines.map(line => stripAnsi(line).length)) > Math.max(process.stdout.columns - ${totalPadding.value}, 0) ? "${title.value}" : \`\\n\${titleLines.join("\\n")}\\n\`; `;
|
|
67
|
-
}
|
|
68
|
-
}), createComponent(IfStatement, {
|
|
69
|
-
condition: code`isInteractive && !isHelp`,
|
|
70
|
-
children: code`await sleep(pause);`
|
|
71
|
-
})];
|
|
72
|
-
}
|
|
73
|
-
})];
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
//#endregion
|
|
77
|
-
export { BannerFunctionDeclaration };
|
|
78
|
-
//# sourceMappingURL=banner-function-declaration.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"banner-function-declaration.mjs","names":[],"sources":["../../src/components/banner-function-declaration.tsx"],"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 { code, computed } from \"@alloy-js/core\";\nimport { FunctionDeclaration, IfStatement } from \"@alloy-js/typescript\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { getAppDescription, getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { useTheme } from \"@shell-shock/plugin-theme/contexts/theme\";\nimport type { BannerFunctionDeclarationProps } from \"@shell-shock/preset-script/components/banner-function-declaration\";\nimport { BannerFunctionBodyDeclaration } from \"@shell-shock/preset-script/components/banner-function-declaration\";\nimport { render } from \"cfonts\";\nimport type { CLIPresetContext } from \"../types/plugin\";\n\n/**\n * A component to generate the `banner` function in the `shell-shock:console` builtin module.\n */\nexport function BannerFunctionDeclaration(\n props: BannerFunctionDeclarationProps\n) {\n const { consoleFnName = \"log\", variant = \"primary\", command } = props;\n\n const theme = useTheme();\n const context = usePowerlines<CLIPresetContext>();\n\n const header = computed(\n () =>\n `${theme.labels.banner.header[variant] || getAppTitle(context)} v${\n context.packageJson.version || \"1.0.0\"\n }`\n );\n const footer = computed(() => theme.labels.banner.footer[variant]);\n const title = computed(() =>\n getAppTitle(context, true).replace(\n `v${context.packageJson.version || \"1.0.0\"}`,\n \"\"\n )\n );\n const description = computed(\n () => command?.description || getAppDescription(context)\n );\n\n const titleLines = computed(() => {\n const result = render(getAppTitle(context, true), {\n font: \"tiny\",\n align: \"left\",\n background: \"transparent\",\n letterSpacing: 1,\n lineHeight: 1,\n gradient: false,\n transitionGradient: false,\n env: \"node\"\n });\n if (!result) {\n return [`${getAppTitle(context, true)} Command-Line Interface`];\n }\n\n return result.array;\n });\n\n const bannerPadding = computed(\n () =>\n Math.max(theme.padding.app, 0) * 2 +\n theme.borderStyles.banner.outline[variant].left.length +\n theme.borderStyles.banner.outline[variant].right.length\n );\n const totalPadding = computed(\n () => Math.max(theme.padding.banner, 0) * 2 + bannerPadding.value\n );\n\n return (\n <>\n <FunctionDeclaration\n async\n name=\"banner\"\n doc={`Write the ${getAppTitle(context, true)} application banner ${\n command ? `for the ${command.title} command ` : \"\"\n }to the console.`}\n parameters={[{ name: \"pause\", type: \"number\", default: 500 }]}>\n <BannerFunctionBodyDeclaration\n header={header.value}\n description={description.value}\n footer={footer.value}\n variant={variant}\n consoleFnName={consoleFnName}\n command={command}\n insertNewlineAfterDescription>\n {code`const titleLines = [${titleLines.value\n .map(line => JSON.stringify(line.trim()))\n .join(\", \")}];\n const title = Math.max(...titleLines.map(line => stripAnsi(line).length)) > Math.max(process.stdout.columns - ${\n totalPadding.value\n }, 0) ? \"${title.value}\" : \\`\\\\n\\${titleLines.join(\"\\\\n\")}\\\\n\\`; `}\n </BannerFunctionBodyDeclaration>\n <IfStatement condition={code`isInteractive && !isHelp`}>\n {code`await sleep(pause);`}\n </IfStatement>\n </FunctionDeclaration>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAgCA,SAAS,0BAAA,OAAA;CACP,MAAA,EACA,gBAAQ,4BAER,YACA;;CAEA,MAAM,UAAS,eAAQ;CACvB,MAAM,SAAA,eAAA,GAAA,MAAA,OAAA,OAAA,OAAA,YAAA,YAAA,QAAA,CAAA,IAAA,QAAA,YAAA,WAAA,UAAA;CACN,MAAM,SAAO,eAAc,MAAO,OAAS,OAAG,OAAW,SAAS;CAClE,MAAM,QAAQ,eAAY,YAAe,SAAE,KAAA,CAAA,QAAA,IAAA,QAAA,YAAA,WAAA,WAAA,GAAA,CAAA;CAC3C,MAAK,cAAA,eAAA,SAAA,eAAA,kBAAA,QAAA,CAAA;CACL,MAAC,aAAA,eAAA;EACD,MAAM,SAAS,OAAS,YAAY,SAAO,KAAO,EAAA;GAClD,MAAM;GACJ,OAAA;GACE,YAAY;GACZ,eAAC;GACH,YAAA;GACD,UAAA;GACD,oBAAoB;GAChB,KAAI;GACP,CAAA;cAED,QAAM,CAAA,GAAA,YAAqB,SAAO,KAAA,CAAA,yBAAA;AAEhC,SAAO,OAAO;GACd;CACF,MAAI,gBAAa,eAAY,KAAA,IAAA,MAAA,QAAA,KAAA,EAAA,GAAA,IAAA,MAAA,aAAA,OAAA,QAAA,SAAA,KAAA,SAAA,MAAA,aAAA,OAAA,QAAA,SAAA,MAAA,OAAA;CAC7B,MAAI,eAAgB,eAAA,KAAA,IAAA,MAAA,QAAA,QAAA,EAAA,GAAA,IAAA,cAAA,MAAA;AACpB,QAAI,CAAA,gBAAa,qBAAA;EACf,OAAE;EACF,MAAE;EACF,IAAE,MAAM;AACN,UAAA,aAAA,YAAA,SAAA,KAAA,CAAA,sBAAA,UAAA,WAAA,QAAA,MAAA,aAAA,GAAA;;EAEF,YAAY,CAAC;GACb,MAAA;;GAEA,SAAO;GACP,CAAA;;AAEF,UAAM,CAAA,gBAAwB,+BAAA;IACxB,IAAA,SAAA;AACE,YAAK,OAAM;;IAEf,IAAM,cAAa;AACtB,YAAA,YAAA;;IAEK,IAAE,SAAS;AAChB,YAAA,OAAA;;IAEM;IACJ;IACE;IACC,+BAAA;IACA,IAAI,WAAQ;AACZ,YAAM,IAAM,uBAAkB,WAAgB,MAAA,KAAW,SAAQ,KAAC,UAAA,KAAA,MAAA,CAAA,CAAA,CAAA,KAAA,KAAA,CAAA;wHACf,aAAA,MAAA,UAAA,MAAA,MAAA;;IAEpD,CAAC,EAAA,gBAAoB,aAAU;IAC9B,WAAC,IAAA;IACD,UAAU,IAAA;IACX,CAAC,CAAC;;EAEN,CAAC,CAAC"}
|