@gramlot/gramlot 0.3.35 → 0.3.36

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.
@@ -7187,6 +7187,213 @@
7187
7187
  "ns": null,
7188
7188
  "parent_tags": null,
7189
7189
  "sub_tags": ""
7190
+ },
7191
+ "terminal": {
7192
+ "_meta": {
7193
+ "gramlot_component": {
7194
+ "command": false,
7195
+ "dataScope": false,
7196
+ "parameters": {
7197
+ "columns": {
7198
+ "binding": "write",
7199
+ "default": 0,
7200
+ "dtype": "L"
7201
+ },
7202
+ "connected": {
7203
+ "binding": "write",
7204
+ "default": false,
7205
+ "dtype": "B"
7206
+ },
7207
+ "fontFamily": {
7208
+ "binding": "read",
7209
+ "default": "monospace",
7210
+ "dtype": "T"
7211
+ },
7212
+ "fontSize": {
7213
+ "binding": "read",
7214
+ "default": 14,
7215
+ "dtype": "L"
7216
+ },
7217
+ "rows": {
7218
+ "binding": "write",
7219
+ "default": 0,
7220
+ "dtype": "L"
7221
+ },
7222
+ "session": {
7223
+ "binding": "read",
7224
+ "default": "",
7225
+ "dtype": "T"
7226
+ }
7227
+ },
7228
+ "presentationDefaults": [],
7229
+ "sourceContext": true
7230
+ },
7231
+ "render_tag": "gramlot-terminal"
7232
+ },
7233
+ "attributes": {
7234
+ "accepts_var_keyword": true,
7235
+ "accepts_var_positional": false,
7236
+ "parameters": [
7237
+ {
7238
+ "annotation": {
7239
+ "dtype": "T",
7240
+ "kind": "dtype"
7241
+ },
7242
+ "default": "",
7243
+ "has_default": true,
7244
+ "kind": "keyword_only",
7245
+ "name": "session",
7246
+ "role": "attribute"
7247
+ },
7248
+ {
7249
+ "annotation": {
7250
+ "items": [
7251
+ {
7252
+ "dtype": "L",
7253
+ "kind": "dtype"
7254
+ },
7255
+ {
7256
+ "base": {
7257
+ "dtype": "T",
7258
+ "kind": "dtype"
7259
+ },
7260
+ "kind": "annotated",
7261
+ "metadata": [
7262
+ {
7263
+ "flags": 0,
7264
+ "kind": "regex",
7265
+ "pattern": "^[\\^=].+"
7266
+ }
7267
+ ]
7268
+ }
7269
+ ],
7270
+ "kind": "union"
7271
+ },
7272
+ "default": 14,
7273
+ "has_default": true,
7274
+ "kind": "keyword_only",
7275
+ "name": "fontSize",
7276
+ "role": "attribute"
7277
+ },
7278
+ {
7279
+ "annotation": {
7280
+ "dtype": "T",
7281
+ "kind": "dtype"
7282
+ },
7283
+ "default": "monospace",
7284
+ "has_default": true,
7285
+ "kind": "keyword_only",
7286
+ "name": "fontFamily",
7287
+ "role": "attribute"
7288
+ },
7289
+ {
7290
+ "annotation": {
7291
+ "items": [
7292
+ {
7293
+ "dtype": "B",
7294
+ "kind": "dtype"
7295
+ },
7296
+ {
7297
+ "base": {
7298
+ "dtype": "T",
7299
+ "kind": "dtype"
7300
+ },
7301
+ "kind": "annotated",
7302
+ "metadata": [
7303
+ {
7304
+ "flags": 0,
7305
+ "kind": "regex",
7306
+ "pattern": "^[\\^=].+"
7307
+ }
7308
+ ]
7309
+ }
7310
+ ],
7311
+ "kind": "union"
7312
+ },
7313
+ "default": false,
7314
+ "has_default": true,
7315
+ "kind": "keyword_only",
7316
+ "name": "connected",
7317
+ "role": "attribute"
7318
+ },
7319
+ {
7320
+ "annotation": {
7321
+ "items": [
7322
+ {
7323
+ "dtype": "L",
7324
+ "kind": "dtype"
7325
+ },
7326
+ {
7327
+ "base": {
7328
+ "dtype": "T",
7329
+ "kind": "dtype"
7330
+ },
7331
+ "kind": "annotated",
7332
+ "metadata": [
7333
+ {
7334
+ "flags": 0,
7335
+ "kind": "regex",
7336
+ "pattern": "^[\\^=].+"
7337
+ }
7338
+ ]
7339
+ }
7340
+ ],
7341
+ "kind": "union"
7342
+ },
7343
+ "default": 0,
7344
+ "has_default": true,
7345
+ "kind": "keyword_only",
7346
+ "name": "rows",
7347
+ "role": "attribute"
7348
+ },
7349
+ {
7350
+ "annotation": {
7351
+ "items": [
7352
+ {
7353
+ "dtype": "L",
7354
+ "kind": "dtype"
7355
+ },
7356
+ {
7357
+ "base": {
7358
+ "dtype": "T",
7359
+ "kind": "dtype"
7360
+ },
7361
+ "kind": "annotated",
7362
+ "metadata": [
7363
+ {
7364
+ "flags": 0,
7365
+ "kind": "regex",
7366
+ "pattern": "^[\\^=].+"
7367
+ }
7368
+ ]
7369
+ }
7370
+ ],
7371
+ "kind": "union"
7372
+ },
7373
+ "default": 0,
7374
+ "has_default": true,
7375
+ "kind": "keyword_only",
7376
+ "name": "columns",
7377
+ "role": "attribute"
7378
+ },
7379
+ {
7380
+ "annotation": {
7381
+ "kind": "any"
7382
+ },
7383
+ "has_default": false,
7384
+ "kind": "var_keyword",
7385
+ "name": "attr",
7386
+ "role": "attribute"
7387
+ }
7388
+ ]
7389
+ },
7390
+ "collection_key": null,
7391
+ "doc": "An interactive terminal connected to the @terminal method `session` of the page store.",
7392
+ "inherits_from": null,
7393
+ "node_label": null,
7394
+ "ns": null,
7395
+ "parent_tags": null,
7396
+ "sub_tags": ""
7190
7397
  }
7191
7398
  },
7192
7399
  "grammar": {
package/dist/gramlot.js CHANGED
@@ -15927,6 +15927,13 @@ var PageStoreConnection = class {
15927
15927
  this.address = address;
15928
15928
  if (!this.parent) this.open();
15929
15929
  }
15930
+ /** The address of the terminal socket of `session` for this page: `terminal` beside the store route. */
15931
+ terminalUrl(session) {
15932
+ const address = new URL("terminal", this.endpoint);
15933
+ address.searchParams.set("pageId", this.gramlot.pageId);
15934
+ address.searchParams.set("session", session);
15935
+ return address.href;
15936
+ }
15930
15937
  /** Opens this page's own WebSocket: the page is the root of its family channel. */
15931
15938
  open() {
15932
15939
  const address = this.address;
@@ -21767,6 +21774,11 @@ var HtmlElement = class {
21767
21774
  collectionView: (bag, rowMode) => node.rootBuilder.binding.collectionView(node, bag, rowMode),
21768
21775
  format: this.format,
21769
21776
  upload: () => this.uploadContext(),
21777
+ terminalUrl: (session) => {
21778
+ const store = node.rootBuilder.binding.gramlot._pageStore;
21779
+ if (!store) throw new Error("A terminal requires a server with a PageStore channel (websocket)");
21780
+ return store.terminalUrl(session);
21781
+ },
21770
21782
  reportError: (error, title) => this.reportError(node, error, title),
21771
21783
  publish: (topic, payload) => node.publish(topic, payload),
21772
21784
  writeParameter: (name, value) => this.writeParameter(node, name, value),
@@ -35463,6 +35475,27 @@ var libraries = Object.freeze({
35463
35475
  integrity: "sha384-IfV0B7MIOYuO95kO9G5ySKPz/85zqFNOAs8iy4tkK5zd9izhJAB8b7lHrwYqqmYE",
35464
35476
  format: "style"
35465
35477
  }),
35478
+ xterm: Object.freeze({
35479
+ packages: { "@xterm/xterm": "6.0.0" },
35480
+ local: "@xterm/xterm/lib/xterm.mjs",
35481
+ url: jsdelivr("@xterm/xterm", "6.0.0", "lib/xterm.mjs"),
35482
+ integrity: "sha384-8Xik+BkzF4UFDtZa8HkUiQ0FE/Xl+03xMuv69uQB3ichDzm8dWs4kPRihQxSZDiY",
35483
+ format: "module"
35484
+ }),
35485
+ xtermFit: Object.freeze({
35486
+ packages: { "@xterm/addon-fit": "0.11.0" },
35487
+ local: "@xterm/addon-fit/lib/addon-fit.mjs",
35488
+ url: jsdelivr("@xterm/addon-fit", "0.11.0", "lib/addon-fit.mjs"),
35489
+ integrity: "sha384-0/1EW6dUPoaun7dgdlOtb5Wk8x5UQRW6hYM3ihuCCnaA2Xd4HwMFcn378RpxmoAc",
35490
+ format: "module"
35491
+ }),
35492
+ xtermStyle: Object.freeze({
35493
+ packages: { "@xterm/xterm": "6.0.0" },
35494
+ local: "@xterm/xterm/css/xterm.css",
35495
+ url: jsdelivr("@xterm/xterm", "6.0.0", "css/xterm.css"),
35496
+ integrity: "sha384-n2n7twoohnW+d3myBKaUgl7DSiwidw6MkQy9oesGzkPpMjejKRR3XlnD+5yCdtBD",
35497
+ format: "style"
35498
+ }),
35466
35499
  plotly: Object.freeze({
35467
35500
  packages: { "plotly.js-dist-min": "4.2.0" },
35468
35501
  local: "plotly.js-dist-min",