@calcit/procs 0.6.6 → 0.6.7
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/lib/calcit.procs.mjs +1 -1
- package/lib/custom-formatter.mjs +13 -0
- package/lib/js-cirru.mjs +5 -1
- package/package.json +3 -3
- package/ts-src/calcit.procs.mts +1 -1
- package/ts-src/custom-formatter.mts +13 -0
- package/ts-src/js-cirru.mts +5 -1
package/lib/calcit.procs.mjs
CHANGED
package/lib/custom-formatter.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { CalcitMap, CalcitSliceMap } from "./js-map.mjs";
|
|
|
5
5
|
import { CalcitList, CalcitSliceList } from "./js-list.mjs";
|
|
6
6
|
import { CalcitSet } from "./js-set.mjs";
|
|
7
7
|
import { CalcitTuple } from "./js-tuple.mjs";
|
|
8
|
+
import { CalcitCirruQuote } from "./js-cirru.mjs";
|
|
8
9
|
let embedObject = (x) => {
|
|
9
10
|
if (x == null) {
|
|
10
11
|
return null;
|
|
@@ -68,6 +69,18 @@ export let load_console_formatter_$x_ = () => {
|
|
|
68
69
|
["div", { style: "color: hsl(280, 80%, 60%)" }, ["div", { style: "margin-left: 8px;" }, embedObject(obj.value)]],
|
|
69
70
|
];
|
|
70
71
|
}
|
|
72
|
+
if (obj instanceof CalcitCirruQuote) {
|
|
73
|
+
return [
|
|
74
|
+
"div",
|
|
75
|
+
{ style: "color: hsl(240, 80%, 60%); display: flex;" },
|
|
76
|
+
`CirruQuote`,
|
|
77
|
+
[
|
|
78
|
+
"div",
|
|
79
|
+
{ style: "color: hsl(280, 80%, 60%); padding: 4px 4px; margin: 0 4px 2px; border: 1px solid hsl(0,70%,90%); border-radius: 4px;" },
|
|
80
|
+
obj.textForm().trim(),
|
|
81
|
+
],
|
|
82
|
+
];
|
|
83
|
+
}
|
|
71
84
|
return null;
|
|
72
85
|
},
|
|
73
86
|
hasBody: (obj) => {
|
package/lib/js-cirru.mjs
CHANGED
|
@@ -12,11 +12,15 @@ export class CalcitCirruQuote {
|
|
|
12
12
|
this.value = value;
|
|
13
13
|
}
|
|
14
14
|
toString() {
|
|
15
|
-
return `(cirru-quote ${JSON.stringify(this.value)})`;
|
|
15
|
+
return `(&cirru-quote ${JSON.stringify(this.value)})`;
|
|
16
16
|
}
|
|
17
17
|
toList() {
|
|
18
18
|
return to_calcit_data(this.value, true);
|
|
19
19
|
}
|
|
20
|
+
/** provide a simple text representation in Console or std out, with indentations */
|
|
21
|
+
textForm() {
|
|
22
|
+
return writeCirruCode(this.value);
|
|
23
|
+
}
|
|
20
24
|
}
|
|
21
25
|
export let format_cirru = (data, useInline) => {
|
|
22
26
|
if (data instanceof CalcitCirruQuote) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@calcit/procs",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"main": "./lib/calcit.procs.mjs",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@types/node": "^18.7.
|
|
7
|
-
"typescript": "^4.8.
|
|
6
|
+
"@types/node": "^18.7.23",
|
|
7
|
+
"typescript": "^4.8.4"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"compile": "rm -rfv lib/* && tsc",
|
package/ts-src/calcit.procs.mts
CHANGED
|
@@ -6,6 +6,7 @@ import { CalcitMap, CalcitSliceMap } from "./js-map.mjs";
|
|
|
6
6
|
import { CalcitList, CalcitSliceList } from "./js-list.mjs";
|
|
7
7
|
import { CalcitSet } from "./js-set.mjs";
|
|
8
8
|
import { CalcitTuple } from "./js-tuple.mjs";
|
|
9
|
+
import { CalcitCirruQuote } from "./js-cirru.mjs";
|
|
9
10
|
|
|
10
11
|
declare global {
|
|
11
12
|
interface Window {
|
|
@@ -81,6 +82,18 @@ export let load_console_formatter_$x_ = () => {
|
|
|
81
82
|
["div", { style: "color: hsl(280, 80%, 60%)" }, ["div", { style: "margin-left: 8px;" }, embedObject(obj.value)]],
|
|
82
83
|
];
|
|
83
84
|
}
|
|
85
|
+
if (obj instanceof CalcitCirruQuote) {
|
|
86
|
+
return [
|
|
87
|
+
"div",
|
|
88
|
+
{ style: "color: hsl(240, 80%, 60%); display: flex;" },
|
|
89
|
+
`CirruQuote`,
|
|
90
|
+
[
|
|
91
|
+
"div",
|
|
92
|
+
{ style: "color: hsl(280, 80%, 60%); padding: 4px 4px; margin: 0 4px 2px; border: 1px solid hsl(0,70%,90%); border-radius: 4px;" },
|
|
93
|
+
obj.textForm().trim(),
|
|
94
|
+
],
|
|
95
|
+
];
|
|
96
|
+
}
|
|
84
97
|
return null;
|
|
85
98
|
},
|
|
86
99
|
hasBody: (obj) => {
|
package/ts-src/js-cirru.mts
CHANGED
|
@@ -17,11 +17,15 @@ export class CalcitCirruQuote {
|
|
|
17
17
|
this.value = value;
|
|
18
18
|
}
|
|
19
19
|
toString(): string {
|
|
20
|
-
return `(cirru-quote ${JSON.stringify(this.value)})`;
|
|
20
|
+
return `(&cirru-quote ${JSON.stringify(this.value)})`;
|
|
21
21
|
}
|
|
22
22
|
toList(): CalcitValue {
|
|
23
23
|
return to_calcit_data(this.value, true);
|
|
24
24
|
}
|
|
25
|
+
/** provide a simple text representation in Console or std out, with indentations */
|
|
26
|
+
textForm(): string {
|
|
27
|
+
return writeCirruCode(this.value);
|
|
28
|
+
}
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
export let format_cirru = (data: CalcitCirruQuote | CalcitList, useInline: boolean): string => {
|