@calcit/procs 0.8.38 → 0.8.40

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.
@@ -10,6 +10,9 @@ let embedObject = (x) => {
10
10
  if (x == null) {
11
11
  return null;
12
12
  }
13
+ if (typeof x === "string") {
14
+ return span({ whiteSpace: "pre-line", color: hsl(120, 70, 50), maxWidth: "100vw" }, `|${x}`);
15
+ }
13
16
  return [
14
17
  "object",
15
18
  {
@@ -122,13 +125,13 @@ export let load_console_formatter_$x_ = () => {
122
125
  break;
123
126
  }
124
127
  }
125
- return div({ color: hasCollection ? hsl(280, 80, 60, 0.4) : undefined }, "{}", preview);
128
+ return div({ color: hasCollection ? hsl(280, 80, 60, 0.4) : undefined, maxWidth: "100%", whiteSpace: "normal" }, "{}", preview);
126
129
  }
127
130
  if (obj instanceof CalcitSet) {
128
131
  return div({ color: hsl(280, 80, 60, 0.4) }, obj.toString(true));
129
132
  }
130
133
  if (obj instanceof CalcitRecord) {
131
- let ret = div({ color: hsl(280, 80, 60, 0.4) }, `%{} ${obj.name} ...`);
134
+ let ret = div({ color: hsl(280, 80, 60, 0.4), maxWidth: "100%" }, `%{} ${obj.name} ...`);
132
135
  return ret;
133
136
  }
134
137
  if (obj instanceof CalcitTuple) {
@@ -184,6 +187,7 @@ export let load_console_formatter_$x_ = () => {
184
187
  color: hsl(280, 80, 90),
185
188
  flexShrink: 0,
186
189
  fontSize: "10px",
190
+ whiteSpace: "nowrap",
187
191
  }, idx), embedObject(x));
188
192
  }));
189
193
  }
@@ -214,18 +218,14 @@ export let load_console_formatter_$x_ = () => {
214
218
  });
215
219
  for (let idx = 0; idx < pairs.length; idx++) {
216
220
  let [k, v] = pairs[idx];
217
- ret.push(tr({
218
- marginLeft: "8px",
219
- }, td({ marginLeft: "8px", verticalAlign: "top" }, embedObject(k)), td({ marginLeft: "8px" }, embedObject(v))));
221
+ ret.push(tr({}, td({ paddingLeft: "8px", verticalAlign: "top", whiteSpace: "nowrap", minWidth: "40px" }, embedObject(k)), td({ paddingLeft: "8px" }, embedObject(v))));
220
222
  }
221
223
  return ret;
222
224
  }
223
225
  if (obj instanceof CalcitRecord) {
224
226
  let ret = table({ color: hsl(280, 80, 60), borderLeft: "1px solid #eee" });
225
227
  for (let idx = 0; idx < obj.fields.length; idx++) {
226
- ret.push(tr({
227
- marginLeft: "8px",
228
- }, td({ marginLeft: "8px", verticalAlign: "top" }, embedObject(obj.fields[idx])), td({ marginLeft: "8px" }, embedObject(obj.values[idx]))));
228
+ ret.push(tr({}, td({ paddingLeft: "8px", verticalAlign: "top", whiteSpace: "pre", minWidth: "40px" }, embedObject(obj.fields[idx])), td({ paddingLeft: "8px" }, embedObject(obj.values[idx]))));
229
229
  }
230
230
  return ret;
231
231
  }
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.8.38",
3
+ "version": "0.8.40",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^20.11.8",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.8.38",
3
+ "version": "0.8.40",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^20.11.8",
@@ -22,6 +22,9 @@ let embedObject = (x: CalcitValue) => {
22
22
  if (x == null) {
23
23
  return null;
24
24
  }
25
+ if (typeof x === "string") {
26
+ return span({ whiteSpace: "pre-line", color: hsl(120, 70, 50), maxWidth: "100vw" }, `|${x}`);
27
+ }
25
28
  return [
26
29
  "object",
27
30
  {
@@ -144,13 +147,13 @@ export let load_console_formatter_$x_ = () => {
144
147
  break;
145
148
  }
146
149
  }
147
- return div({ color: hasCollection ? hsl(280, 80, 60, 0.4) : undefined }, "{}", preview);
150
+ return div({ color: hasCollection ? hsl(280, 80, 60, 0.4) : undefined, maxWidth: "100%", whiteSpace: "normal" }, "{}", preview);
148
151
  }
149
152
  if (obj instanceof CalcitSet) {
150
153
  return div({ color: hsl(280, 80, 60, 0.4) }, obj.toString(true));
151
154
  }
152
155
  if (obj instanceof CalcitRecord) {
153
- let ret: any[] = div({ color: hsl(280, 80, 60, 0.4) }, `%{} ${obj.name} ...`);
156
+ let ret: any[] = div({ color: hsl(280, 80, 60, 0.4), maxWidth: "100%" }, `%{} ${obj.name} ...`);
154
157
  return ret;
155
158
  }
156
159
  if (obj instanceof CalcitTuple) {
@@ -230,6 +233,7 @@ export let load_console_formatter_$x_ = () => {
230
233
  color: hsl(280, 80, 90),
231
234
  flexShrink: 0,
232
235
  fontSize: "10px",
236
+ whiteSpace: "nowrap",
233
237
  },
234
238
  idx
235
239
  ),
@@ -265,11 +269,9 @@ export let load_console_formatter_$x_ = () => {
265
269
  let [k, v] = pairs[idx];
266
270
  ret.push(
267
271
  tr(
268
- {
269
- marginLeft: "8px",
270
- },
271
- td({ marginLeft: "8px", verticalAlign: "top" }, embedObject(k)),
272
- td({ marginLeft: "8px" }, embedObject(v))
272
+ {},
273
+ td({ paddingLeft: "8px", verticalAlign: "top", whiteSpace: "nowrap", minWidth: "40px" }, embedObject(k)),
274
+ td({ paddingLeft: "8px" }, embedObject(v))
273
275
  )
274
276
  );
275
277
  }
@@ -280,11 +282,9 @@ export let load_console_formatter_$x_ = () => {
280
282
  for (let idx = 0; idx < obj.fields.length; idx++) {
281
283
  ret.push(
282
284
  tr(
283
- {
284
- marginLeft: "8px",
285
- },
286
- td({ marginLeft: "8px", verticalAlign: "top" }, embedObject(obj.fields[idx])),
287
- td({ marginLeft: "8px" }, embedObject(obj.values[idx]))
285
+ {},
286
+ td({ paddingLeft: "8px", verticalAlign: "top", whiteSpace: "pre", minWidth: "40px" }, embedObject(obj.fields[idx])),
287
+ td({ paddingLeft: "8px" }, embedObject(obj.values[idx]))
288
288
  )
289
289
  );
290
290
  }