@arkitektio/bsx 6.8.0 → 6.9.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "vocab": 2,
3
- "minor": 7,
3
+ "minor": 8,
4
4
  "catalogs": {
5
5
  "base": "https://arkitekt.live/catalogs/base/v4",
6
6
  "bundled": {
@@ -13356,6 +13356,506 @@
13356
13356
  ]
13357
13357
  }
13358
13358
  },
13359
+ {
13360
+ "name": "a panel says what it looks like",
13361
+ "source": "<Blok kind=\"agent\" context=\"panel\"><logo title=\"Scope\"><Circle cx=\"12\" cy=\"12\" r=\"7\" /><Path d=\"M12 5v14\" /></logo><Card><Text text=\"hi\" /></Card></Blok>",
13362
+ "tree": {
13363
+ "id": "Blok[0]",
13364
+ "component": "Blok",
13365
+ "props": [
13366
+ {
13367
+ "key": "kind",
13368
+ "static_value": "agent"
13369
+ },
13370
+ {
13371
+ "key": "context",
13372
+ "static_value": "panel"
13373
+ }
13374
+ ],
13375
+ "children": [
13376
+ {
13377
+ "id": "Blok[0]/logo[0]",
13378
+ "component": "logo",
13379
+ "props": [
13380
+ {
13381
+ "key": "title",
13382
+ "static_value": "Scope"
13383
+ }
13384
+ ],
13385
+ "children": [
13386
+ {
13387
+ "id": "Blok[0]/logo[0]/Circle[0]",
13388
+ "component": "Circle",
13389
+ "props": [
13390
+ {
13391
+ "key": "cx",
13392
+ "static_value": "12"
13393
+ },
13394
+ {
13395
+ "key": "cy",
13396
+ "static_value": "12"
13397
+ },
13398
+ {
13399
+ "key": "r",
13400
+ "static_value": "7"
13401
+ }
13402
+ ]
13403
+ },
13404
+ {
13405
+ "id": "Blok[0]/logo[0]/Path[0]",
13406
+ "component": "Path",
13407
+ "props": [
13408
+ {
13409
+ "key": "d",
13410
+ "static_value": "M12 5v14"
13411
+ }
13412
+ ]
13413
+ }
13414
+ ]
13415
+ },
13416
+ {
13417
+ "id": "Blok[0]/Card[0]",
13418
+ "component": "Card",
13419
+ "children": [
13420
+ {
13421
+ "id": "Blok[0]/Card[0]/Text[0]",
13422
+ "component": "Text",
13423
+ "props": [
13424
+ {
13425
+ "key": "text",
13426
+ "static_value": "hi"
13427
+ }
13428
+ ]
13429
+ }
13430
+ ]
13431
+ }
13432
+ ]
13433
+ },
13434
+ "mount": {
13435
+ "kinds": [],
13436
+ "dependencies": [],
13437
+ "args": null,
13438
+ "catalog": true,
13439
+ "port": null,
13440
+ "workflows": null
13441
+ },
13442
+ "resolved": {
13443
+ "locals": {}
13444
+ },
13445
+ "codes": [],
13446
+ "language": {
13447
+ "resolved": {
13448
+ "locals": {}
13449
+ },
13450
+ "codes": []
13451
+ }
13452
+ },
13453
+ {
13454
+ "name": "a custom blok and a scene have a logo too",
13455
+ "source": "<Blok kind=\"custom\" context=\"scene\"><logo><Circle r=\"4\" /></logo><Scene /></Blok>",
13456
+ "tree": {
13457
+ "id": "Blok[0]",
13458
+ "component": "Blok",
13459
+ "props": [
13460
+ {
13461
+ "key": "kind",
13462
+ "static_value": "custom"
13463
+ },
13464
+ {
13465
+ "key": "context",
13466
+ "static_value": "scene"
13467
+ }
13468
+ ],
13469
+ "children": [
13470
+ {
13471
+ "id": "Blok[0]/logo[0]",
13472
+ "component": "logo",
13473
+ "children": [
13474
+ {
13475
+ "id": "Blok[0]/logo[0]/Circle[0]",
13476
+ "component": "Circle",
13477
+ "props": [
13478
+ {
13479
+ "key": "r",
13480
+ "static_value": "4"
13481
+ }
13482
+ ]
13483
+ }
13484
+ ]
13485
+ },
13486
+ {
13487
+ "id": "Blok[0]/Scene[0]",
13488
+ "component": "Scene"
13489
+ }
13490
+ ]
13491
+ },
13492
+ "mount": {
13493
+ "kinds": [],
13494
+ "dependencies": [],
13495
+ "args": null,
13496
+ "catalog": true,
13497
+ "port": null,
13498
+ "workflows": null
13499
+ },
13500
+ "resolved": {
13501
+ "locals": {}
13502
+ },
13503
+ "codes": [],
13504
+ "language": {
13505
+ "resolved": {
13506
+ "locals": {}
13507
+ },
13508
+ "codes": []
13509
+ }
13510
+ },
13511
+ {
13512
+ "name": "a blok's own logo paints with pens",
13513
+ "source": "<Blok kind=\"agent\" context=\"panel\"><logo><Circle r=\"4\" fill=\"#ff0000\" /></logo><Card /></Blok>",
13514
+ "tree": {
13515
+ "id": "Blok[0]",
13516
+ "component": "Blok",
13517
+ "props": [
13518
+ {
13519
+ "key": "kind",
13520
+ "static_value": "agent"
13521
+ },
13522
+ {
13523
+ "key": "context",
13524
+ "static_value": "panel"
13525
+ }
13526
+ ],
13527
+ "children": [
13528
+ {
13529
+ "id": "Blok[0]/logo[0]",
13530
+ "component": "logo",
13531
+ "children": [
13532
+ {
13533
+ "id": "Blok[0]/logo[0]/Circle[0]",
13534
+ "component": "Circle",
13535
+ "props": [
13536
+ {
13537
+ "key": "r",
13538
+ "static_value": "4"
13539
+ },
13540
+ {
13541
+ "key": "fill",
13542
+ "static_value": "#ff0000"
13543
+ }
13544
+ ]
13545
+ }
13546
+ ]
13547
+ },
13548
+ {
13549
+ "id": "Blok[0]/Card[0]",
13550
+ "component": "Card"
13551
+ }
13552
+ ]
13553
+ },
13554
+ "mount": {
13555
+ "kinds": [],
13556
+ "dependencies": [],
13557
+ "args": null,
13558
+ "catalog": true,
13559
+ "port": null,
13560
+ "workflows": null
13561
+ },
13562
+ "resolved": {
13563
+ "locals": {}
13564
+ },
13565
+ "codes": [
13566
+ "palette.logo_paint"
13567
+ ],
13568
+ "language": {
13569
+ "resolved": {
13570
+ "locals": {}
13571
+ },
13572
+ "codes": [
13573
+ "palette.logo_paint"
13574
+ ]
13575
+ }
13576
+ },
13577
+ {
13578
+ "name": "a logo is a child of its blok",
13579
+ "source": "<Blok kind=\"agent\" context=\"panel\"><Card><logo><Circle r=\"4\" /></logo></Card></Blok>",
13580
+ "tree": {
13581
+ "id": "Blok[0]",
13582
+ "component": "Blok",
13583
+ "props": [
13584
+ {
13585
+ "key": "kind",
13586
+ "static_value": "agent"
13587
+ },
13588
+ {
13589
+ "key": "context",
13590
+ "static_value": "panel"
13591
+ }
13592
+ ],
13593
+ "children": [
13594
+ {
13595
+ "id": "Blok[0]/Card[0]",
13596
+ "component": "Card",
13597
+ "children": [
13598
+ {
13599
+ "id": "Blok[0]/Card[0]/logo[0]",
13600
+ "component": "logo",
13601
+ "children": [
13602
+ {
13603
+ "id": "Blok[0]/Card[0]/logo[0]/Circle[0]",
13604
+ "component": "Circle",
13605
+ "props": [
13606
+ {
13607
+ "key": "r",
13608
+ "static_value": "4"
13609
+ }
13610
+ ]
13611
+ }
13612
+ ]
13613
+ }
13614
+ ]
13615
+ }
13616
+ ]
13617
+ },
13618
+ "mount": {
13619
+ "kinds": [],
13620
+ "dependencies": [],
13621
+ "args": null,
13622
+ "catalog": true,
13623
+ "port": null,
13624
+ "workflows": null
13625
+ },
13626
+ "resolved": {
13627
+ "locals": {}
13628
+ },
13629
+ "codes": [
13630
+ "logo.misplaced"
13631
+ ],
13632
+ "language": {
13633
+ "resolved": {
13634
+ "locals": {}
13635
+ },
13636
+ "codes": [
13637
+ "logo.misplaced"
13638
+ ]
13639
+ }
13640
+ },
13641
+ {
13642
+ "name": "a blok has one logo",
13643
+ "source": "<Blok kind=\"agent\" context=\"panel\"><logo><Circle r=\"4\" /></logo><logo><Circle r=\"4\" /></logo><Card /></Blok>",
13644
+ "tree": {
13645
+ "id": "Blok[0]",
13646
+ "component": "Blok",
13647
+ "props": [
13648
+ {
13649
+ "key": "kind",
13650
+ "static_value": "agent"
13651
+ },
13652
+ {
13653
+ "key": "context",
13654
+ "static_value": "panel"
13655
+ }
13656
+ ],
13657
+ "children": [
13658
+ {
13659
+ "id": "Blok[0]/logo[0]",
13660
+ "component": "logo",
13661
+ "children": [
13662
+ {
13663
+ "id": "Blok[0]/logo[0]/Circle[0]",
13664
+ "component": "Circle",
13665
+ "props": [
13666
+ {
13667
+ "key": "r",
13668
+ "static_value": "4"
13669
+ }
13670
+ ]
13671
+ }
13672
+ ]
13673
+ },
13674
+ {
13675
+ "id": "Blok[0]/logo[1]",
13676
+ "component": "logo",
13677
+ "children": [
13678
+ {
13679
+ "id": "Blok[0]/logo[1]/Circle[0]",
13680
+ "component": "Circle",
13681
+ "props": [
13682
+ {
13683
+ "key": "r",
13684
+ "static_value": "4"
13685
+ }
13686
+ ]
13687
+ }
13688
+ ]
13689
+ },
13690
+ {
13691
+ "id": "Blok[0]/Card[0]",
13692
+ "component": "Card"
13693
+ }
13694
+ ]
13695
+ },
13696
+ "mount": {
13697
+ "kinds": [],
13698
+ "dependencies": [],
13699
+ "args": null,
13700
+ "catalog": true,
13701
+ "port": null,
13702
+ "workflows": null
13703
+ },
13704
+ "resolved": {
13705
+ "locals": {}
13706
+ },
13707
+ "codes": [
13708
+ "logo.twice"
13709
+ ],
13710
+ "language": {
13711
+ "resolved": {
13712
+ "locals": {}
13713
+ },
13714
+ "codes": [
13715
+ "logo.twice"
13716
+ ]
13717
+ }
13718
+ },
13719
+ {
13720
+ "name": "a logo blok declares no logo",
13721
+ "source": "<Blok kind=\"agent\" context=\"logo\"><logo><Circle r=\"4\" /></logo><Logo><Circle r=\"4\" /></Logo></Blok>",
13722
+ "tree": {
13723
+ "id": "Blok[0]",
13724
+ "component": "Blok",
13725
+ "props": [
13726
+ {
13727
+ "key": "kind",
13728
+ "static_value": "agent"
13729
+ },
13730
+ {
13731
+ "key": "context",
13732
+ "static_value": "logo"
13733
+ }
13734
+ ],
13735
+ "children": [
13736
+ {
13737
+ "id": "Blok[0]/logo[0]",
13738
+ "component": "logo",
13739
+ "children": [
13740
+ {
13741
+ "id": "Blok[0]/logo[0]/Circle[0]",
13742
+ "component": "Circle",
13743
+ "props": [
13744
+ {
13745
+ "key": "r",
13746
+ "static_value": "4"
13747
+ }
13748
+ ]
13749
+ }
13750
+ ]
13751
+ },
13752
+ {
13753
+ "id": "Blok[0]/Logo[0]",
13754
+ "component": "Logo",
13755
+ "children": [
13756
+ {
13757
+ "id": "Blok[0]/Logo[0]/Circle[0]",
13758
+ "component": "Circle",
13759
+ "props": [
13760
+ {
13761
+ "key": "r",
13762
+ "static_value": "4"
13763
+ }
13764
+ ]
13765
+ }
13766
+ ]
13767
+ }
13768
+ ]
13769
+ },
13770
+ "mount": {
13771
+ "kinds": [],
13772
+ "dependencies": [],
13773
+ "args": null,
13774
+ "catalog": true,
13775
+ "port": null,
13776
+ "workflows": null
13777
+ },
13778
+ "resolved": {
13779
+ "locals": {}
13780
+ },
13781
+ "codes": [
13782
+ "logo.in_logo"
13783
+ ],
13784
+ "language": {
13785
+ "resolved": {
13786
+ "locals": {}
13787
+ },
13788
+ "codes": [
13789
+ "logo.in_logo"
13790
+ ]
13791
+ }
13792
+ },
13793
+ {
13794
+ "name": "a blok's own logo is a fixed drawing",
13795
+ "source": "<Blok kind=\"agent\" context=\"panel\"><logo><Circle r={viewer.name} /></logo><Card /></Blok>",
13796
+ "tree": {
13797
+ "id": "Blok[0]",
13798
+ "component": "Blok",
13799
+ "props": [
13800
+ {
13801
+ "key": "kind",
13802
+ "static_value": "agent"
13803
+ },
13804
+ {
13805
+ "key": "context",
13806
+ "static_value": "panel"
13807
+ }
13808
+ ],
13809
+ "children": [
13810
+ {
13811
+ "id": "Blok[0]/logo[0]",
13812
+ "component": "logo",
13813
+ "children": [
13814
+ {
13815
+ "id": "Blok[0]/logo[0]/Circle[0]",
13816
+ "component": "Circle",
13817
+ "props": [
13818
+ {
13819
+ "key": "r",
13820
+ "dynamic_value": {
13821
+ "path": "viewer.name"
13822
+ }
13823
+ }
13824
+ ]
13825
+ }
13826
+ ]
13827
+ },
13828
+ {
13829
+ "id": "Blok[0]/Card[0]",
13830
+ "component": "Card"
13831
+ }
13832
+ ]
13833
+ },
13834
+ "mount": {
13835
+ "kinds": [],
13836
+ "dependencies": [],
13837
+ "args": null,
13838
+ "catalog": true,
13839
+ "port": null,
13840
+ "workflows": null
13841
+ },
13842
+ "resolved": {
13843
+ "locals": {}
13844
+ },
13845
+ "codes": [
13846
+ "logo.dynamic",
13847
+ "path.unknown"
13848
+ ],
13849
+ "language": {
13850
+ "resolved": {
13851
+ "locals": {}
13852
+ },
13853
+ "codes": [
13854
+ "logo.dynamic",
13855
+ "path.unknown"
13856
+ ]
13857
+ }
13858
+ },
13359
13859
  {
13360
13860
  "name": "a space is an action's",
13361
13861
  "source": "<Blok kind=\"agent\" context=\"scene\"><Space room=\"room:lab\" /></Blok>",
@@ -2,7 +2,7 @@
2
2
  "id": "https://arkitekt.live/catalogs/base/v4",
3
3
  "name": "base",
4
4
  "version": 4,
5
- "minor": 3,
5
+ "minor": 4,
6
6
  "extends": null,
7
7
  "description": "The base catalog: everything every renderer draws. The language's own elements (control flow, async boundaries, the Blok element, the declarations, text), the html components, the structure and run parts a host supplies, the scene and the logo shapes. A renderer speaks it whole, in the contexts it draws; functions and effects are in vocabulary.json.",
8
8
  "components": [
@@ -291,6 +291,33 @@
291
291
  ],
292
292
  "since": 3
293
293
  },
294
+ {
295
+ "name": "logo",
296
+ "group": "language",
297
+ "description": "Declares the blok's own logo: what stands for it in lists, pins and tabs. A drawing of the logo catalog on a 24-unit grid, painted with the logo pens, drawn with the action logos' pen unless a shape says otherwise; literals only. A child of <Blok>, one; draws nothing in the blok.",
298
+ "context": "PANEL",
299
+ "children_context": "LOGO",
300
+ "inherits_context": false,
301
+ "accepts_children": true,
302
+ "downstream_of": [],
303
+ "not_downstream_of": [],
304
+ "text_prop": null,
305
+ "props": [
306
+ {
307
+ "key": "title",
308
+ "kind": "STRING",
309
+ "required": false,
310
+ "description": "What the logo is called: read out in place of the drawing."
311
+ },
312
+ {
313
+ "key": "viewBox",
314
+ "kind": "STRING",
315
+ "required": false,
316
+ "description": "The drawing's grid; 0 0 24 24 when left out."
317
+ }
318
+ ],
319
+ "since": 4
320
+ },
294
321
  {
295
322
  "name": "#text",
296
323
  "group": "language",
@@ -49,7 +49,7 @@ describe('the synced vocabulary', () => {
49
49
  expect(vocabulary.callKinds).not.toContain('query_refetch');
50
50
  expect(vocabulary.records.query.fields.map(field => field.key)).toContain('fetching_more');
51
51
  expect(Object.keys(vocabulary.theme.dataAttributes).sort()).toEqual(['busy', 'stale']);
52
- expect([vocabulary.vocab, vocabulary.minor]).toEqual([2, 7]);
52
+ expect([vocabulary.vocab, vocabulary.minor]).toEqual([2, 8]);
53
53
  expect(vocabulary.baseCatalog).toBe('https://arkitekt.live/catalogs/base/v4');
54
54
  expect(Object.values(vocabulary.bundledCatalogs)).toEqual(['catalogs/base@4.json', 'catalogs/orkestrator@1.json']);
55
55
  expect(vocabulary.hostParts).toEqual(['args', 'arg', 'deps', 'dep', 'ask', 'returns', 'status', 'timeline', 'label', 'description', 'message', 'control', 'field']);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "vocab": 2,
3
- "minor": 7,
3
+ "minor": 8,
4
4
  "description": "The blok language, version 2: what a blok may read, call and store. The spec's parser, the server (rekuest_core, takt) and the renderer (orkestrator) load this file or are generated from it. The design is the blok-vocab-v2 proposal of 2026-10-25. Three layers, each versioned on its own: this language (vocab, and minor for what it gained since); the base catalog, everything every renderer draws; and the app catalogs that extend it with what one frontend draws beyond (see catalogs). A server holds a blok to the language alone, never to a catalog: whoever draws a blok checks it against the catalog it has, and an author's tooling checks it when asked.",
5
5
  "roots": {
6
6
  "data": {
@@ -99,6 +99,7 @@
99
99
  "query": "<query name=\"x\" service=\"mikro\" document=\"query (...) {...}\" poll={5} more=\"items\"><var key=\"k\" value={...} /></query>: a declared read, queries.<name>. A child of <Blok>, before its content.",
100
100
  "subscription": "<subscription name=\"x\" service=\"mikro\" document=\"subscription (...) {...}\" keep={10} history=\"q\"><var key=\"k\" value={...} /></subscription>: a declared stream, subscriptions.<name>. A child of <Blok>, before its content.",
101
101
  "dependencies": "<dependencies key=\"cells\" like=\"self.<action>\" />: the dependencies of one of the app's own actions, for an agent blok to read, call and hand to a run of it. A custom blok declares those of an action of an agent it is bound to: like=\"agents.<name>.<action>\" (stored deps.<name>.<action>). Each is read through the key, bare: cells.<dependency>.<state>.<field>, cells.<dependency>.<action>(...), cells.<dependency>.connected (stored as the blok's dependency deps.cells__<dependency>). cells.options.<dependency> lists the agents that fit one ({id, name, connected, picked}) and cells.pick(<dependency>: <agent id>) binds it; <deppicker key=\"cells.<dependency>\" /> is the ready-made picker. Which agent each is bound to is the viewer's own choice, kept on their device and never on a server; until they choose it is seeded once, with the agent the latest run of the action had, else the only one that fits. A child of <Blok>, after its locals and before what reads through it; an agent blok only. An action whose dependency is called options or pick cannot be read through one.",
102
+ "logo": "<logo title=\"Microscope\"><Circle cx=\"12\" cy=\"12\" r=\"7\" /></logo>: the blok's own logo, standing for it in lists, pins and tabs. A child of <Blok>, one, in a blok that is no logo. It holds a drawing of the logo catalog on a 24-unit grid (viewBox=\"0 0 24 24\" unless it says otherwise), painted with the logo pens and drawn with the action logos' pen (fill none, stroke ink, round) unless a shape says otherwise. title and viewBox are literals, and so is everything it draws: a fixed drawing that reads nothing. It is checked and drawn as a logo blok of its own.",
102
103
  "var": "<var key=\"k\" value={expression or literal} />: one variable of a query or subscription; an expression over args, blok-level locals and agents."
103
104
  }
104
105
  },
@@ -544,6 +545,10 @@
544
545
  "calls.not_in_kind": {"level": "error", "message": "{path}: a{n} {kind} blok calls no agent.", "hint": "A port blok is a field of a form: read the agent's state and write the port (port.set(...), bind={{port.value}}). What starts a task belongs in the action's assign blok."},
545
546
  "assign.kind": {"level": "error", "message": "{what} belongs to starting a run, so only an action's assign blok holds it, not a{n} {kind} blok.", "hint": "Make it <Blok kind=\"assign\"> in the action's bloks=[...]."},
546
547
  "logo.complexity": {"level": "error", "message": "{detail}"},
548
+ "logo.misplaced": {"level": "error", "message": "A <logo> is a child of the <Blok> it stands for, not inside another element.", "hint": "Move it to the top of the blok, beside its queries."},
549
+ "logo.twice": {"level": "error", "message": "A blok has one <logo>; this is a second one."},
550
+ "logo.in_logo": {"level": "error", "message": "A logo blok is a logo already: it declares no <logo> of its own.", "hint": "Draw it in the blok's <Logo> instead."},
551
+ "logo.dynamic": {"level": "warning", "message": "<{component}> sets {prop} with an expression; a <logo> is a fixed drawing that reads nothing, so it is drawn without it.", "hint": "Write the value as a literal."},
547
552
  "catalog.unknown_component": {"level": "warning", "message": "<{component}> is not in the catalog the blok is written for ({catalogs}).", "hint": "Look the component up in the catalog; names are case-sensitive."},
548
553
  "catalog.children": {"level": "warning", "message": "<{component}> takes no children.", "hint": "Close <{component}> without children (<{component} ... />), or put them beside it."},
549
554
  "catalog.text": {"level": "warning", "message": "<{component}> {detail}", "hint": "Put the text in a component that draws it (<Text>, <p>, <span>), or set it once."},