@almadar/std 16.234.0 → 16.236.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.
- package/behaviors/behaviors-registry.json +4402 -1898
- package/behaviors/lolo/infra/atoms/std-approval-gate.lolo +25 -41
- package/behaviors/lolo/infra/atoms/std-audit-capture.lolo +0 -5
- package/behaviors/lolo/infra/atoms/std-cache-aside.lolo +0 -24
- package/behaviors/lolo/infra/atoms/std-circuit-breaker.lolo +1 -17
- package/behaviors/lolo/infra/atoms/std-data-erasure.lolo +17 -24
- package/behaviors/lolo/infra/atoms/std-data-import.lolo +8 -11
- package/behaviors/lolo/infra/atoms/std-game-clock.lolo +2 -0
- package/behaviors/lolo/infra/atoms/std-knowledge-loop.lolo +0 -5
- package/behaviors/lolo/infra/atoms/std-lifecycle.lolo +3 -1
- package/behaviors/lolo/infra/atoms/std-mod-queue.lolo +40 -18
- package/behaviors/lolo/infra/atoms/std-notification-preferences.lolo +20 -11
- package/behaviors/lolo/infra/atoms/std-notify-on-event.lolo +0 -5
- package/behaviors/lolo/infra/atoms/std-permission-matrix.lolo +23 -11
- package/behaviors/lolo/infra/atoms/std-rate-limiter.lolo +84 -22
- package/behaviors/lolo/infra/atoms/std-status-lifecycle.lolo +1 -6
- package/behaviors/lolo/ml/atoms/std-graph-builder.lolo +3 -1
- package/behaviors/lolo/ml/atoms/std-ml-classify.lolo +0 -4
- package/behaviors/lolo/ml/atoms/std-ml-similarity.lolo +0 -4
- package/behaviors/lolo/ui/avl/atoms/ui-avl-state-machine.lolo +12 -0
- package/behaviors/lolo/ui/core/atoms/std-app-layout.lolo +55 -9
- package/behaviors/lolo/ui/core/atoms/std-app-search.lolo +6 -2
- package/behaviors/lolo/ui/core/atoms/std-billable-hour.lolo +19 -14
- package/behaviors/lolo/ui/core/atoms/std-board.lolo +77 -27
- package/behaviors/lolo/ui/core/atoms/std-browse.lolo +44 -28
- package/behaviors/lolo/ui/core/atoms/std-calendar.lolo +7 -3
- package/behaviors/lolo/ui/core/atoms/std-esign-flow.lolo +25 -13
- package/behaviors/lolo/ui/core/atoms/std-esign-request.lolo +5 -0
- package/behaviors/lolo/ui/core/atoms/std-event-log.lolo +0 -5
- package/behaviors/lolo/ui/core/atoms/std-export.lolo +0 -10
- package/behaviors/lolo/ui/core/atoms/std-file-store.lolo +7 -3
- package/behaviors/lolo/ui/core/atoms/std-form-advanced.lolo +1 -6
- package/behaviors/lolo/ui/core/atoms/std-geosearch.lolo +1 -0
- package/behaviors/lolo/ui/core/atoms/std-graphs.lolo +20 -4
- package/behaviors/lolo/ui/core/atoms/std-import.lolo +0 -5
- package/behaviors/lolo/ui/core/atoms/std-list.lolo +46 -32
- package/behaviors/lolo/ui/core/atoms/std-modal-editor.lolo +2 -2
- package/behaviors/lolo/ui/core/atoms/std-rating-review.lolo +12 -13
- package/behaviors/lolo/ui/core/atoms/std-record-detail.lolo +16 -12
- package/behaviors/lolo/ui/core/atoms/std-recurrence.lolo +10 -1
- package/behaviors/lolo/ui/core/atoms/std-role-gate.lolo +39 -0
- package/behaviors/lolo/ui/core/atoms/std-saved-search.lolo +78 -16
- package/behaviors/lolo/ui/core/atoms/std-selection.lolo +15 -10
- package/behaviors/lolo/ui/core/atoms/std-stats.lolo +5 -5
- package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +3 -0
- package/behaviors/lolo/ui/core/atoms/std-thread.lolo +41 -73
- package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +20 -11
- package/behaviors/lolo/ui/core/atoms/std-vote.lolo +0 -4
- package/behaviors/lolo/ui/core/atoms/std-wizard.lolo +3 -3
- package/behaviors/lolo/ui/core/atoms/ui-presence.lolo +21 -0
- package/behaviors/lolo/ui/core/molecules/ui-breadcrumb.lolo +6 -1
- package/behaviors/lolo/ui/core/molecules/ui-chart.lolo +11 -1
- package/behaviors/lolo/ui/core/molecules/ui-code-block.lolo +13 -8
- package/behaviors/lolo/ui/core/molecules/ui-command-palette.lolo +7 -2
- package/behaviors/lolo/ui/core/molecules/ui-commit-row.lolo +2 -2
- package/behaviors/lolo/ui/core/molecules/ui-confirm-dialog.lolo +8 -0
- package/behaviors/lolo/ui/core/molecules/ui-data-grid.lolo +41 -3
- package/behaviors/lolo/ui/core/molecules/ui-data-list.lolo +41 -3
- package/behaviors/lolo/ui/core/molecules/ui-document-details.lolo +30 -9
- package/behaviors/lolo/ui/core/molecules/ui-document-panel.lolo +8 -3
- package/behaviors/lolo/ui/core/molecules/ui-document-viewer.lolo +6 -1
- package/behaviors/lolo/ui/core/molecules/ui-drawer.lolo +13 -0
- package/behaviors/lolo/ui/core/molecules/ui-floating-action-button.lolo +6 -1
- package/behaviors/lolo/ui/core/molecules/ui-floating-toolbar.lolo +6 -1
- package/behaviors/lolo/ui/core/molecules/ui-form-actions.lolo +6 -1
- package/behaviors/lolo/ui/core/molecules/ui-graph-canvas.lolo +6 -1
- package/behaviors/lolo/ui/core/molecules/ui-menu.lolo +6 -1
- package/behaviors/lolo/ui/core/molecules/ui-meter.lolo +6 -1
- package/behaviors/lolo/ui/core/molecules/ui-modal.lolo +5 -0
- package/behaviors/lolo/ui/core/molecules/ui-page-header.lolo +11 -1
- package/behaviors/lolo/ui/core/molecules/ui-page-transition.lolo +1 -1
- package/behaviors/lolo/ui/core/molecules/ui-swipeable-row.lolo +44 -15
- package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +41 -3
- package/behaviors/lolo/ui/core/molecules/ui-tabs.lolo +8 -2
- package/behaviors/lolo/ui/core/organisms/ui-detail-panel.lolo +66 -12
- package/behaviors/lolo/ui/core/organisms/ui-entity-cards.lolo +9 -3
- package/behaviors/lolo/ui/core/organisms/ui-entity-list.lolo +9 -3
- package/behaviors/lolo/ui/core/organisms/ui-entity-table.lolo +18 -9
- package/behaviors/lolo/ui/core/organisms/ui-form-section.lolo +55 -10
- package/behaviors/lolo/ui/core/organisms/ui-form.lolo +55 -10
- package/behaviors/lolo/ui/core/organisms/ui-media-gallery.lolo +8 -3
- package/behaviors/lolo/ui/core/organisms/ui-state-machine-view.lolo +12 -0
- package/behaviors/lolo/ui/core/organisms/ui-timeline.lolo +8 -3
- package/behaviors/lolo/ui/core/templates/ui-counter-template.lolo +2 -44
- package/behaviors/lolo/ui/core/templates/ui-dashboard-layout.lolo +6 -1
- package/behaviors/lolo/ui/core/templates/ui-generic-app-template.lolo +2 -37
- package/behaviors/lolo/ui/game/atoms/ui-game-menu.lolo +8 -2
- package/behaviors/lolo/ui/game/organisms/std-arcade-board-3d.lolo +2 -2
- package/behaviors/lolo/ui/game/organisms/std-crew-board-2d.lolo +0 -4
- package/behaviors/lolo/ui/game/organisms/std-platformer-puzzle.lolo +2 -66
- package/behaviors/lolo/ui/game/organisms/std-tactics-board-2d.lolo +0 -4
- package/behaviors/lolo/ui/game/organisms/std-worldmap-board-2d.lolo +0 -4
- package/behaviors/lolo/ui/learning/atoms/std-learn-stepper.lolo +6 -6
- package/behaviors/lolo-behavior-contracts.json +1 -1
- package/behaviors/registry/factory-signatures.json +1 -1
- package/behaviors/registry/infra/atoms/std-approval-gate.orb +124 -67
- package/behaviors/registry/infra/atoms/std-audit-capture.orb +0 -8
- package/behaviors/registry/infra/atoms/std-cache-aside.orb +0 -84
- package/behaviors/registry/infra/atoms/std-circuit-breaker.orb +1 -44
- package/behaviors/registry/infra/atoms/std-data-erasure.orb +124 -55
- package/behaviors/registry/infra/atoms/std-data-import.orb +12 -11
- package/behaviors/registry/infra/atoms/std-game-clock.orb +31 -0
- package/behaviors/registry/infra/atoms/std-knowledge-loop.orb +0 -57
- package/behaviors/registry/infra/atoms/std-lifecycle.orb +43 -0
- package/behaviors/registry/infra/atoms/std-mod-queue.orb +379 -103
- package/behaviors/registry/infra/atoms/std-notification-preferences.orb +126 -12
- package/behaviors/registry/infra/atoms/std-notify-on-event.orb +0 -11
- package/behaviors/registry/infra/atoms/std-permission-matrix.orb +128 -12
- package/behaviors/registry/infra/atoms/std-rate-limiter.orb +287 -72
- package/behaviors/registry/infra/atoms/std-status-lifecycle.orb +5 -8
- package/behaviors/registry/ml/atoms/std-graph-builder.orb +11 -0
- package/behaviors/registry/ml/atoms/std-ml-classify.orb +0 -7
- package/behaviors/registry/ml/atoms/std-ml-similarity.orb +0 -7
- package/behaviors/registry/ui/avl/atoms/ui-avl-state-machine.orb +82 -0
- package/behaviors/registry/ui/core/atoms/std-app-layout.orb +417 -9
- package/behaviors/registry/ui/core/atoms/std-app-search.orb +53 -1
- package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +209 -19
- package/behaviors/registry/ui/core/atoms/std-board.orb +242 -61
- package/behaviors/registry/ui/core/atoms/std-browse.orb +295 -41
- package/behaviors/registry/ui/core/atoms/std-calendar.orb +96 -2
- package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +122 -15
- package/behaviors/registry/ui/core/atoms/std-esign-request.orb +11 -0
- package/behaviors/registry/ui/core/atoms/std-event-log.orb +0 -8
- package/behaviors/registry/ui/core/atoms/std-export.orb +0 -16
- package/behaviors/registry/ui/core/atoms/std-file-store.orb +109 -2
- package/behaviors/registry/ui/core/atoms/std-form-advanced.orb +1 -43
- package/behaviors/registry/ui/core/atoms/std-geosearch.orb +5 -0
- package/behaviors/registry/ui/core/atoms/std-graphs.orb +173 -66
- package/behaviors/registry/ui/core/atoms/std-import.orb +0 -8
- package/behaviors/registry/ui/core/atoms/std-list.orb +226 -34
- package/behaviors/registry/ui/core/atoms/std-modal-editor.orb +10 -1
- package/behaviors/registry/ui/core/atoms/std-rating-review.orb +37 -19
- package/behaviors/registry/ui/core/atoms/std-record-detail.orb +204 -11
- package/behaviors/registry/ui/core/atoms/std-recurrence.orb +89 -4
- package/behaviors/registry/ui/core/atoms/std-role-gate.orb +217 -0
- package/behaviors/registry/ui/core/atoms/std-saved-search.orb +419 -19
- package/behaviors/registry/ui/core/atoms/std-selection.orb +140 -10
- package/behaviors/registry/ui/core/atoms/std-stats.orb +73 -1
- package/behaviors/registry/ui/core/atoms/std-tag-taxonomy.orb +3 -0
- package/behaviors/registry/ui/core/atoms/std-thread.orb +190 -115
- package/behaviors/registry/ui/core/atoms/std-version-history.orb +127 -13
- package/behaviors/registry/ui/core/atoms/std-vote.orb +0 -9
- package/behaviors/registry/ui/core/atoms/std-wizard.orb +33 -3
- package/behaviors/registry/ui/core/atoms/ui-presence.orb +59 -0
- package/behaviors/registry/ui/core/molecules/ui-breadcrumb.orb +53 -1
- package/behaviors/registry/ui/core/molecules/ui-chart.orb +68 -1
- package/behaviors/registry/ui/core/molecules/ui-code-block.orb +291 -8
- package/behaviors/registry/ui/core/molecules/ui-command-palette.orb +87 -2
- package/behaviors/registry/ui/core/molecules/ui-commit-row.orb +3 -2
- package/behaviors/registry/ui/core/molecules/ui-confirm-dialog.orb +32 -0
- package/behaviors/registry/ui/core/molecules/ui-data-grid.orb +189 -3
- package/behaviors/registry/ui/core/molecules/ui-data-list.orb +189 -3
- package/behaviors/registry/ui/core/molecules/ui-document-details.orb +81 -24
- package/behaviors/registry/ui/core/molecules/ui-document-panel.orb +121 -3
- package/behaviors/registry/ui/core/molecules/ui-document-viewer.orb +53 -1
- package/behaviors/registry/ui/core/molecules/ui-drawer.orb +40 -0
- package/behaviors/registry/ui/core/molecules/ui-floating-action-button.orb +53 -1
- package/behaviors/registry/ui/core/molecules/ui-floating-toolbar.orb +53 -1
- package/behaviors/registry/ui/core/molecules/ui-form-actions.orb +53 -1
- package/behaviors/registry/ui/core/molecules/ui-graph-canvas.orb +53 -1
- package/behaviors/registry/ui/core/molecules/ui-menu.orb +57 -1
- package/behaviors/registry/ui/core/molecules/ui-meter.orb +53 -1
- package/behaviors/registry/ui/core/molecules/ui-modal.orb +8 -0
- package/behaviors/registry/ui/core/molecules/ui-page-header.orb +60 -1
- package/behaviors/registry/ui/core/molecules/ui-page-transition.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-swipeable-row.orb +393 -23
- package/behaviors/registry/ui/core/molecules/ui-table-view.orb +189 -3
- package/behaviors/registry/ui/core/molecules/ui-tabs.orb +99 -2
- package/behaviors/registry/ui/core/organisms/ui-detail-panel.orb +282 -20
- package/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +130 -3
- package/behaviors/registry/ui/core/organisms/ui-entity-list.orb +130 -3
- package/behaviors/registry/ui/core/organisms/ui-entity-table.orb +367 -9
- package/behaviors/registry/ui/core/organisms/ui-form-section.orb +104 -13
- package/behaviors/registry/ui/core/organisms/ui-form.orb +104 -13
- package/behaviors/registry/ui/core/organisms/ui-media-gallery.orb +121 -3
- package/behaviors/registry/ui/core/organisms/ui-state-machine-view.orb +82 -0
- package/behaviors/registry/ui/core/organisms/ui-timeline.orb +121 -3
- package/behaviors/registry/ui/core/templates/ui-counter-template.orb +1 -172
- package/behaviors/registry/ui/core/templates/ui-dashboard-layout.orb +53 -1
- package/behaviors/registry/ui/core/templates/ui-generic-app-template.orb +1 -116
- package/behaviors/registry/ui/game/atoms/ui-game-menu.orb +99 -2
- package/behaviors/registry/ui/game/organisms/std-arcade-board-3d.orb +10 -0
- package/behaviors/registry/ui/game/organisms/std-crew-board-2d.orb +0 -7
- package/behaviors/registry/ui/game/organisms/std-platformer-puzzle.orb +1 -807
- package/behaviors/registry/ui/game/organisms/std-tactics-board-2d.orb +0 -7
- package/behaviors/registry/ui/game/organisms/std-worldmap-board-2d.orb +0 -7
- package/behaviors/registry/ui/learning/atoms/std-learn-stepper.orb +6 -0
- package/canonical-operators.json +18 -1
- package/dist/behaviors/exports-reader.js +7662 -3762
- package/dist/behaviors/functions/index.d.ts +309 -104
- package/dist/behaviors/functions/index.js +7651 -3762
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +7663 -3763
- package/dist/behaviors/query.js +7662 -3762
- package/dist/behaviors-embeddings.hash.json +3 -3
- package/dist/behaviors-embeddings.json +35 -27
- package/dist/behaviors-registry.json +4402 -1898
- package/dist/index.d.ts +3 -3
- package/dist/index.js +7697 -3763
- package/dist/knob-embeddings.hash.json +3 -3
- package/dist/knob-embeddings.json +612 -352
- package/dist/modules/anim.d.ts +1 -1
- package/dist/modules/array.d.ts +1 -1
- package/dist/modules/array.js +15 -0
- package/dist/modules/async.d.ts +1 -1
- package/dist/modules/async.js +9 -0
- package/dist/modules/behavior.d.ts +1 -1
- package/dist/modules/browser.d.ts +1 -1
- package/dist/modules/composition.d.ts +1 -1
- package/dist/modules/contract.d.ts +1 -1
- package/dist/modules/core.d.ts +1 -1
- package/dist/modules/core.js +10 -0
- package/dist/modules/data.d.ts +1 -1
- package/dist/modules/ease.d.ts +1 -1
- package/dist/modules/format.d.ts +1 -1
- package/dist/modules/geo.d.ts +1 -1
- package/dist/modules/graph.d.ts +1 -1
- package/dist/modules/grid.d.ts +1 -1
- package/dist/modules/index.d.ts +1 -1
- package/dist/modules/index.js +34 -0
- package/dist/modules/integration.d.ts +1 -1
- package/dist/modules/json.d.ts +1 -1
- package/dist/modules/llm.d.ts +1 -1
- package/dist/modules/math.d.ts +1 -1
- package/dist/modules/memory.d.ts +1 -1
- package/dist/modules/nn.d.ts +1 -1
- package/dist/modules/noise.d.ts +1 -1
- package/dist/modules/object.d.ts +1 -1
- package/dist/modules/os.d.ts +1 -1
- package/dist/modules/path.d.ts +1 -1
- package/dist/modules/prob.d.ts +1 -1
- package/dist/modules/session.d.ts +1 -1
- package/dist/modules/str.d.ts +1 -1
- package/dist/modules/tensor.d.ts +1 -1
- package/dist/modules/time.d.ts +1 -1
- package/dist/modules/trace.d.ts +1 -1
- package/dist/modules/train.d.ts +1 -1
- package/dist/modules/validate.d.ts +1 -1
- package/dist/modules/vector.d.ts +1 -1
- package/dist/modules/workspace.d.ts +1 -1
- package/dist/registry/factory-signatures.json +1 -1
- package/dist/registry.d.ts +5 -2
- package/dist/registry.js +55 -1
- package/dist/{types-DwAW4Nni.d.ts → types-DLx38UFZ.d.ts} +31 -4
- package/package.json +2 -2
package/dist/registry.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { S as StdOperatorMeta, a as StdModule, O as OperatorMeta, R as RunsOn } from './types-
|
|
1
|
+
import { S as StdOperatorMeta, a as StdModule, O as OperatorMeta, R as RunsOn, b as OperatorVisualForm } from './types-DLx38UFZ.js';
|
|
2
|
+
export { c as OPERATOR_VISUAL_FORMS } from './types-DLx38UFZ.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Standard Library Registry
|
|
@@ -152,5 +153,7 @@ declare function getStdLibStats(): {
|
|
|
152
153
|
effectOperators: number;
|
|
153
154
|
lambdaOperators: number;
|
|
154
155
|
};
|
|
156
|
+
/** The AVL circuit form of an operator: its declared form, else conveyor (takes a lambda), actuator (side effect) or block. Null when unregistered. */
|
|
157
|
+
declare function operatorVisualForm(operator: string): OperatorVisualForm | null;
|
|
155
158
|
|
|
156
|
-
export { OPERATOR_NAMES, STD_OPERATORS, STD_OPERATORS_BY_MODULE, assertOperatorArity, getAllStdOperators, getLambdaOperators, getModuleOperators, getOperatorMetaExtended, getOperatorRunsOn, getOperatorsRunningOn, getStdEffectOperators, getStdLibStats, getStdOperatorMeta, getStdOperatorsByModule, getStdPureOperators, isEffectOperatorExtended, isKnownOperatorExtended, isKnownStdOperator, isStdEffectOperator, isStdGuardOperator, validateOperatorArityExtended, validateStdOperatorArity };
|
|
159
|
+
export { OPERATOR_NAMES, OperatorVisualForm, STD_OPERATORS, STD_OPERATORS_BY_MODULE, assertOperatorArity, getAllStdOperators, getLambdaOperators, getModuleOperators, getOperatorMetaExtended, getOperatorRunsOn, getOperatorsRunningOn, getStdEffectOperators, getStdLibStats, getStdOperatorMeta, getStdOperatorsByModule, getStdPureOperators, isEffectOperatorExtended, isKnownOperatorExtended, isKnownStdOperator, isStdEffectOperator, isStdGuardOperator, operatorVisualForm, validateOperatorArityExtended, validateStdOperatorArity };
|
package/dist/registry.js
CHANGED
|
@@ -36,6 +36,19 @@ var STD_MODULES = [
|
|
|
36
36
|
"behavior",
|
|
37
37
|
"integration"
|
|
38
38
|
];
|
|
39
|
+
var OPERATOR_VISUAL_FORMS = [
|
|
40
|
+
"block",
|
|
41
|
+
"series",
|
|
42
|
+
"parallel",
|
|
43
|
+
"invert",
|
|
44
|
+
"branch",
|
|
45
|
+
"scope",
|
|
46
|
+
"template",
|
|
47
|
+
"conveyor",
|
|
48
|
+
"ladder",
|
|
49
|
+
"actuator",
|
|
50
|
+
"delay"
|
|
51
|
+
];
|
|
39
52
|
function getModuleFromOperator(operator) {
|
|
40
53
|
const parts = operator.split("/");
|
|
41
54
|
if (parts.length !== 2) return null;
|
|
@@ -253,6 +266,7 @@ var CORE_OPERATORS = {
|
|
|
253
266
|
},
|
|
254
267
|
// --- logic ------------------------------------------------------------------
|
|
255
268
|
and: {
|
|
269
|
+
visual: { form: "series" },
|
|
256
270
|
module: "core",
|
|
257
271
|
category: "logic",
|
|
258
272
|
minArity: 2,
|
|
@@ -265,6 +279,7 @@ var CORE_OPERATORS = {
|
|
|
265
279
|
example: '["and", ["=", "active", "active"], [">", 5, 0]]'
|
|
266
280
|
},
|
|
267
281
|
or: {
|
|
282
|
+
visual: { form: "parallel" },
|
|
268
283
|
module: "core",
|
|
269
284
|
category: "logic",
|
|
270
285
|
minArity: 2,
|
|
@@ -277,6 +292,7 @@ var CORE_OPERATORS = {
|
|
|
277
292
|
example: '["or", ["=", "admin", "user"], ["=", "admin", "owner"]]'
|
|
278
293
|
},
|
|
279
294
|
not: {
|
|
295
|
+
visual: { form: "invert" },
|
|
280
296
|
module: "core",
|
|
281
297
|
category: "logic",
|
|
282
298
|
minArity: 1,
|
|
@@ -288,6 +304,7 @@ var CORE_OPERATORS = {
|
|
|
288
304
|
example: '["not", false]'
|
|
289
305
|
},
|
|
290
306
|
if: {
|
|
307
|
+
visual: { form: "branch" },
|
|
291
308
|
module: "core",
|
|
292
309
|
category: "logic",
|
|
293
310
|
minArity: 3,
|
|
@@ -305,6 +322,7 @@ var CORE_OPERATORS = {
|
|
|
305
322
|
},
|
|
306
323
|
// --- control ----------------------------------------------------------------
|
|
307
324
|
let: {
|
|
325
|
+
visual: { form: "scope" },
|
|
308
326
|
module: "core",
|
|
309
327
|
category: "control",
|
|
310
328
|
minArity: 2,
|
|
@@ -312,6 +330,7 @@ var CORE_OPERATORS = {
|
|
|
312
330
|
description: "Bind local variables for a body expression",
|
|
313
331
|
hasSideEffects: false,
|
|
314
332
|
returnType: "any",
|
|
333
|
+
returnSemantics: "identity-of-arg<1>",
|
|
315
334
|
params: [
|
|
316
335
|
{
|
|
317
336
|
name: "bindings",
|
|
@@ -323,6 +342,7 @@ var CORE_OPERATORS = {
|
|
|
323
342
|
example: '["let", [["x", 10]], ["+", "x", 1]]'
|
|
324
343
|
},
|
|
325
344
|
do: {
|
|
345
|
+
visual: { form: "ladder" },
|
|
326
346
|
module: "core",
|
|
327
347
|
category: "control",
|
|
328
348
|
minArity: 1,
|
|
@@ -330,6 +350,7 @@ var CORE_OPERATORS = {
|
|
|
330
350
|
description: "Sequential execution of multiple effects/expressions",
|
|
331
351
|
hasSideEffects: false,
|
|
332
352
|
returnType: "any",
|
|
353
|
+
returnSemantics: "last-of-args",
|
|
333
354
|
params: [{ name: "...exprs", type: SEXPR, description: "Effects/expressions to run in order" }],
|
|
334
355
|
example: '["do", ["set", "@entity.x", 0], ["set", "@entity.y", 0]]'
|
|
335
356
|
},
|
|
@@ -345,6 +366,7 @@ var CORE_OPERATORS = {
|
|
|
345
366
|
example: '["list", "path", "method", "status"] // => ["path", "method", "status"]'
|
|
346
367
|
},
|
|
347
368
|
when: {
|
|
369
|
+
visual: { form: "branch" },
|
|
348
370
|
module: "core",
|
|
349
371
|
category: "control",
|
|
350
372
|
minArity: 2,
|
|
@@ -359,6 +381,7 @@ var CORE_OPERATORS = {
|
|
|
359
381
|
example: '["when", [">", "@entity.health", 0], ["emit", "ALIVE"]]'
|
|
360
382
|
},
|
|
361
383
|
fn: {
|
|
384
|
+
visual: { form: "template" },
|
|
362
385
|
module: "core",
|
|
363
386
|
category: "control",
|
|
364
387
|
minArity: 2,
|
|
@@ -1671,6 +1694,7 @@ var ARRAY_OPERATORS = {
|
|
|
1671
1694
|
description: "Extract subarray",
|
|
1672
1695
|
hasSideEffects: false,
|
|
1673
1696
|
returnType: "array",
|
|
1697
|
+
returnSemantics: "identity-of-arg<0>",
|
|
1674
1698
|
params: [
|
|
1675
1699
|
{ name: "arr", type: "array", description: "The array" },
|
|
1676
1700
|
{ name: "start", type: "number", description: "Start index" },
|
|
@@ -1686,6 +1710,7 @@ var ARRAY_OPERATORS = {
|
|
|
1686
1710
|
description: "Concatenate arrays",
|
|
1687
1711
|
hasSideEffects: false,
|
|
1688
1712
|
returnType: "array",
|
|
1713
|
+
returnSemantics: "union-of-args",
|
|
1689
1714
|
params: [{ name: "...arrs", type: "array[]", description: "Arrays to concatenate" }],
|
|
1690
1715
|
example: '["array/concat", [1, 2], [3, 4]] // => [1, 2, 3, 4]'
|
|
1691
1716
|
},
|
|
@@ -1697,6 +1722,7 @@ var ARRAY_OPERATORS = {
|
|
|
1697
1722
|
description: "Add item to end (returns new array)",
|
|
1698
1723
|
hasSideEffects: false,
|
|
1699
1724
|
returnType: "array",
|
|
1725
|
+
returnSemantics: "union-of-args<0,1>",
|
|
1700
1726
|
params: [
|
|
1701
1727
|
{ name: "arr", type: "array", description: "The array" },
|
|
1702
1728
|
{ name: "item", type: "any", description: "Item to add" }
|
|
@@ -1711,6 +1737,7 @@ var ARRAY_OPERATORS = {
|
|
|
1711
1737
|
description: "Add item to start (returns new array)",
|
|
1712
1738
|
hasSideEffects: false,
|
|
1713
1739
|
returnType: "array",
|
|
1740
|
+
returnSemantics: "union-of-args<0,1>",
|
|
1714
1741
|
params: [
|
|
1715
1742
|
{ name: "arr", type: "array", description: "The array" },
|
|
1716
1743
|
{ name: "item", type: "any", description: "Item to add" }
|
|
@@ -1725,6 +1752,7 @@ var ARRAY_OPERATORS = {
|
|
|
1725
1752
|
description: "Insert item at index (returns new array)",
|
|
1726
1753
|
hasSideEffects: false,
|
|
1727
1754
|
returnType: "array",
|
|
1755
|
+
returnSemantics: "union-of-args<0,2>",
|
|
1728
1756
|
params: [
|
|
1729
1757
|
{ name: "arr", type: "array", description: "The array" },
|
|
1730
1758
|
{ name: "index", type: "number", description: "Index to insert at" },
|
|
@@ -1740,6 +1768,7 @@ var ARRAY_OPERATORS = {
|
|
|
1740
1768
|
description: "Remove item at index (returns new array)",
|
|
1741
1769
|
hasSideEffects: false,
|
|
1742
1770
|
returnType: "array",
|
|
1771
|
+
returnSemantics: "identity-of-arg<0>",
|
|
1743
1772
|
params: [
|
|
1744
1773
|
{ name: "arr", type: "array", description: "The array" },
|
|
1745
1774
|
{ name: "index", type: "number", description: "Index to remove" }
|
|
@@ -1754,6 +1783,7 @@ var ARRAY_OPERATORS = {
|
|
|
1754
1783
|
description: "Remove first matching item (returns new array)",
|
|
1755
1784
|
hasSideEffects: false,
|
|
1756
1785
|
returnType: "array",
|
|
1786
|
+
returnSemantics: "identity-of-arg<0>",
|
|
1757
1787
|
params: [
|
|
1758
1788
|
{ name: "arr", type: "array", description: "The array" },
|
|
1759
1789
|
{ name: "item", type: "any", description: "Item to remove" }
|
|
@@ -1768,6 +1798,7 @@ var ARRAY_OPERATORS = {
|
|
|
1768
1798
|
description: "Reverse array order (returns new array)",
|
|
1769
1799
|
hasSideEffects: false,
|
|
1770
1800
|
returnType: "array",
|
|
1801
|
+
returnSemantics: "identity-of-arg<0>",
|
|
1771
1802
|
params: [{ name: "arr", type: "array", description: "The array" }],
|
|
1772
1803
|
example: '["array/reverse", [1, 2, 3]] // => [3, 2, 1]'
|
|
1773
1804
|
},
|
|
@@ -1779,6 +1810,7 @@ var ARRAY_OPERATORS = {
|
|
|
1779
1810
|
description: "Sort array (returns new array)",
|
|
1780
1811
|
hasSideEffects: false,
|
|
1781
1812
|
returnType: "array",
|
|
1813
|
+
returnSemantics: "identity-of-arg<0>",
|
|
1782
1814
|
params: [
|
|
1783
1815
|
{ name: "arr", type: "array", description: "The array" },
|
|
1784
1816
|
{ name: "key", type: "string", description: "Field to sort by (for objects)", optional: true },
|
|
@@ -1794,6 +1826,7 @@ var ARRAY_OPERATORS = {
|
|
|
1794
1826
|
description: "Randomly shuffle array (returns new array)",
|
|
1795
1827
|
hasSideEffects: false,
|
|
1796
1828
|
returnType: "array",
|
|
1829
|
+
returnSemantics: "identity-of-arg<0>",
|
|
1797
1830
|
params: [{ name: "arr", type: "array", description: "The array" }],
|
|
1798
1831
|
example: '["array/shuffle", [1, 2, 3, 4, 5]]'
|
|
1799
1832
|
},
|
|
@@ -1805,6 +1838,7 @@ var ARRAY_OPERATORS = {
|
|
|
1805
1838
|
description: "Remove duplicates (returns new array)",
|
|
1806
1839
|
hasSideEffects: false,
|
|
1807
1840
|
returnType: "array",
|
|
1841
|
+
returnSemantics: "identity-of-arg<0>",
|
|
1808
1842
|
params: [{ name: "arr", type: "array", description: "The array" }],
|
|
1809
1843
|
example: '["array/unique", [1, 2, 2, 3, 1]] // => [1, 2, 3]'
|
|
1810
1844
|
},
|
|
@@ -2105,6 +2139,7 @@ var ARRAY_OPERATORS = {
|
|
|
2105
2139
|
description: "Take first n elements",
|
|
2106
2140
|
hasSideEffects: false,
|
|
2107
2141
|
returnType: "array",
|
|
2142
|
+
returnSemantics: "identity-of-arg<0>",
|
|
2108
2143
|
params: [
|
|
2109
2144
|
{ name: "arr", type: "array", description: "The array" },
|
|
2110
2145
|
{ name: "n", type: "number", description: "Number of elements" }
|
|
@@ -2119,6 +2154,7 @@ var ARRAY_OPERATORS = {
|
|
|
2119
2154
|
description: "Skip first n elements",
|
|
2120
2155
|
hasSideEffects: false,
|
|
2121
2156
|
returnType: "array",
|
|
2157
|
+
returnSemantics: "identity-of-arg<0>",
|
|
2122
2158
|
params: [
|
|
2123
2159
|
{ name: "arr", type: "array", description: "The array" },
|
|
2124
2160
|
{ name: "n", type: "number", description: "Number of elements to skip" }
|
|
@@ -2133,6 +2169,7 @@ var ARRAY_OPERATORS = {
|
|
|
2133
2169
|
description: "Take last n elements",
|
|
2134
2170
|
hasSideEffects: false,
|
|
2135
2171
|
returnType: "array",
|
|
2172
|
+
returnSemantics: "identity-of-arg<0>",
|
|
2136
2173
|
params: [
|
|
2137
2174
|
{ name: "arr", type: "array", description: "The array" },
|
|
2138
2175
|
{ name: "n", type: "number", description: "Number of elements" }
|
|
@@ -2147,6 +2184,7 @@ var ARRAY_OPERATORS = {
|
|
|
2147
2184
|
description: "Skip last n elements",
|
|
2148
2185
|
hasSideEffects: false,
|
|
2149
2186
|
returnType: "array",
|
|
2187
|
+
returnSemantics: "identity-of-arg<0>",
|
|
2150
2188
|
params: [
|
|
2151
2189
|
{ name: "arr", type: "array", description: "The array" },
|
|
2152
2190
|
{ name: "n", type: "number", description: "Number of elements to skip" }
|
|
@@ -3185,6 +3223,7 @@ var FORMAT_OPERATORS = {
|
|
|
3185
3223
|
// modules/async.ts
|
|
3186
3224
|
var ASYNC_OPERATORS = {
|
|
3187
3225
|
"async/delay": {
|
|
3226
|
+
visual: { form: "delay" },
|
|
3188
3227
|
module: "async",
|
|
3189
3228
|
category: "std-async",
|
|
3190
3229
|
minArity: 1,
|
|
@@ -3200,6 +3239,7 @@ var ASYNC_OPERATORS = {
|
|
|
3200
3239
|
example: '["async/delay", 2000, ["emit", "RETRY"]] // Wait 2s then emit'
|
|
3201
3240
|
},
|
|
3202
3241
|
"async/interval": {
|
|
3242
|
+
visual: { form: "delay" },
|
|
3203
3243
|
module: "async",
|
|
3204
3244
|
category: "std-async",
|
|
3205
3245
|
minArity: 2,
|
|
@@ -3215,6 +3255,7 @@ var ASYNC_OPERATORS = {
|
|
|
3215
3255
|
example: '["async/interval", 5000, ["emit", "POLL_TICK"]] // Emit every 5s'
|
|
3216
3256
|
},
|
|
3217
3257
|
"async/timeout": {
|
|
3258
|
+
visual: { form: "delay" },
|
|
3218
3259
|
module: "async",
|
|
3219
3260
|
category: "std-async",
|
|
3220
3261
|
minArity: 2,
|
|
@@ -3230,6 +3271,7 @@ var ASYNC_OPERATORS = {
|
|
|
3230
3271
|
example: '["async/timeout", ["call", "api", "fetchData"], 5000]'
|
|
3231
3272
|
},
|
|
3232
3273
|
"async/debounce": {
|
|
3274
|
+
visual: { form: "delay" },
|
|
3233
3275
|
module: "async",
|
|
3234
3276
|
category: "std-async",
|
|
3235
3277
|
minArity: 2,
|
|
@@ -3245,6 +3287,7 @@ var ASYNC_OPERATORS = {
|
|
|
3245
3287
|
example: '["async/debounce", "SEARCH", 300]'
|
|
3246
3288
|
},
|
|
3247
3289
|
"async/throttle": {
|
|
3290
|
+
visual: { form: "delay" },
|
|
3248
3291
|
module: "async",
|
|
3249
3292
|
category: "std-async",
|
|
3250
3293
|
minArity: 2,
|
|
@@ -3260,6 +3303,7 @@ var ASYNC_OPERATORS = {
|
|
|
3260
3303
|
example: '["async/throttle", "SCROLL", 100]'
|
|
3261
3304
|
},
|
|
3262
3305
|
"async/retry": {
|
|
3306
|
+
visual: { form: "delay" },
|
|
3263
3307
|
module: "async",
|
|
3264
3308
|
category: "std-async",
|
|
3265
3309
|
minArity: 2,
|
|
@@ -3277,6 +3321,7 @@ var ASYNC_OPERATORS = {
|
|
|
3277
3321
|
{ "attempts": 3, "backoff": "exponential", "baseDelay": 1000 }]`
|
|
3278
3322
|
},
|
|
3279
3323
|
"async/race": {
|
|
3324
|
+
visual: { form: "parallel" },
|
|
3280
3325
|
module: "async",
|
|
3281
3326
|
category: "std-async",
|
|
3282
3327
|
minArity: 2,
|
|
@@ -3289,6 +3334,7 @@ var ASYNC_OPERATORS = {
|
|
|
3289
3334
|
example: '["async/race", ["call", "api1"], ["call", "api2"]]'
|
|
3290
3335
|
},
|
|
3291
3336
|
"async/all": {
|
|
3337
|
+
visual: { form: "parallel" },
|
|
3292
3338
|
module: "async",
|
|
3293
3339
|
category: "std-async",
|
|
3294
3340
|
minArity: 2,
|
|
@@ -3301,6 +3347,7 @@ var ASYNC_OPERATORS = {
|
|
|
3301
3347
|
example: '["async/all", ["call", "api1"], ["call", "api2"]]'
|
|
3302
3348
|
},
|
|
3303
3349
|
"async/sequence": {
|
|
3350
|
+
visual: { form: "ladder" },
|
|
3304
3351
|
module: "async",
|
|
3305
3352
|
category: "std-async",
|
|
3306
3353
|
minArity: 2,
|
|
@@ -6729,5 +6776,12 @@ function getStdLibStats() {
|
|
|
6729
6776
|
lambdaOperators: getLambdaOperators().length
|
|
6730
6777
|
};
|
|
6731
6778
|
}
|
|
6779
|
+
function operatorVisualForm(operator) {
|
|
6780
|
+
const meta = getStdOperatorMeta(operator);
|
|
6781
|
+
if (!meta) return null;
|
|
6782
|
+
if (meta.visual) return meta.visual.form;
|
|
6783
|
+
if (meta.acceptsLambda) return "conveyor";
|
|
6784
|
+
return meta.hasSideEffects ? "actuator" : "block";
|
|
6785
|
+
}
|
|
6732
6786
|
|
|
6733
|
-
export { OPERATOR_NAMES, STD_OPERATORS, STD_OPERATORS_BY_MODULE, assertOperatorArity, getAllStdOperators, getLambdaOperators, getModuleOperators, getOperatorMetaExtended, getOperatorRunsOn, getOperatorsRunningOn, getStdEffectOperators, getStdLibStats, getStdOperatorMeta, getStdOperatorsByModule, getStdPureOperators, isEffectOperatorExtended, isKnownOperatorExtended, isKnownStdOperator, isStdEffectOperator, isStdGuardOperator, validateOperatorArityExtended, validateStdOperatorArity };
|
|
6787
|
+
export { OPERATOR_NAMES, OPERATOR_VISUAL_FORMS, STD_OPERATORS, STD_OPERATORS_BY_MODULE, assertOperatorArity, getAllStdOperators, getLambdaOperators, getModuleOperators, getOperatorMetaExtended, getOperatorRunsOn, getOperatorsRunningOn, getStdEffectOperators, getStdLibStats, getStdOperatorMeta, getStdOperatorsByModule, getStdPureOperators, isEffectOperatorExtended, isKnownOperatorExtended, isKnownStdOperator, isStdEffectOperator, isStdGuardOperator, operatorVisualForm, validateOperatorArityExtended, validateStdOperatorArity };
|
|
@@ -44,14 +44,34 @@ type BasicReturnType = 'number' | 'boolean' | 'string' | 'any' | 'void' | 'array
|
|
|
44
44
|
* `ReturnTypeOf<lambda>` / type of `init`).
|
|
45
45
|
* - `'object-key-lookup'` — return type depends on the input object
|
|
46
46
|
* shape and the literal key (`object/get`, `object/pick`).
|
|
47
|
-
* - `'identity-of-arg<N>'` —
|
|
48
|
-
*
|
|
47
|
+
* - `'identity-of-arg<N>'` — the result IS arg N, narrowed or reordered:
|
|
48
|
+
* its type matches arg N's, and every value/element it can carry is drawn
|
|
49
|
+
* from arg N (`array/filter`, `array/slice`, `array/sort`, `array/take`,
|
|
50
|
+
* `array/unique`, …; `let` is `identity-of-arg<1>`, its body).
|
|
51
|
+
* - `'union-of-args'` — the result carries values drawn from EVERY arg
|
|
52
|
+
* (`array/concat`). `'union-of-args<i,j>'` restricts that to the listed arg
|
|
53
|
+
* indices: arg 0 is the list, the other listed index is the single element
|
|
54
|
+
* the operator adds (`array/append`/`array/prepend` are `<0,1>`,
|
|
55
|
+
* `array/insert` is `<0,2>`). A listed arg is either a list (contributes
|
|
56
|
+
* its elements) or one element (contributes itself).
|
|
57
|
+
* - `'last-of-args'` — the result is the last arg's value (`do`).
|
|
58
|
+
*
|
|
59
|
+
* Provenance kinds (`identity-of-arg<N>`, `union-of-args[<..>]`,
|
|
60
|
+
* `last-of-args`, `branch-union`, `lambda-result`) are what the validator's
|
|
61
|
+
* one generic value-source walk reads (`orbital-core`
|
|
62
|
+
* `SExpression::value_leaves`) to trace which leaf values an expression can
|
|
63
|
+
* yield — e.g. which events a render-bound `itemActions` list can fire.
|
|
64
|
+
* `branch-union` = every arg after the condition; `lambda-result` = the body
|
|
65
|
+
* of the lambda arg (the arg whose operator declares `returnType:
|
|
66
|
+
* 'function'`). An operator whose result elements are NOT provably drawn from
|
|
67
|
+
* its inputs (`array/range`, `array/zip`, `array/groupBy`, `array/partition`,
|
|
68
|
+
* `array/flatten`) declares nothing and the walk treats it as opaque.
|
|
49
69
|
*
|
|
50
70
|
* Operators NOT listed here keep the fixed `returnType` semantics —
|
|
51
71
|
* arithmetic, math, comparisons, aggregations (`array/sum`/`avg`/`len`),
|
|
52
72
|
* type coercions, all effects.
|
|
53
73
|
*/
|
|
54
|
-
type ReturnSemantics = 'first-truthy-of-args' | 'last-truthy-of-args' | 'first-non-null-of-args' | 'branch-union' | 'element-of-arg<0>' | 'element-of-arg<0>?' | 'element-of-arg<1>' | 'lambda-result' | 'object-key-lookup' | 'identity-of-arg<0>';
|
|
74
|
+
type ReturnSemantics = 'first-truthy-of-args' | 'last-truthy-of-args' | 'first-non-null-of-args' | 'branch-union' | 'element-of-arg<0>' | 'element-of-arg<0>?' | 'element-of-arg<1>' | 'lambda-result' | 'object-key-lookup' | 'identity-of-arg<0>' | 'identity-of-arg<1>' | 'union-of-args' | 'union-of-args<0,1>' | 'union-of-args<0,2>' | 'last-of-args';
|
|
55
75
|
/** Where an effect executes: a client host delegates `server` effects, a server ships `client` effects back, `any` runs wherever it is dispatched. */
|
|
56
76
|
type RunsOn = 'client' | 'server' | 'any';
|
|
57
77
|
interface OperatorMeta {
|
|
@@ -149,6 +169,9 @@ interface OperatorEffectMeta {
|
|
|
149
169
|
* Extended operator metadata for std library operators.
|
|
150
170
|
* Adds parameter descriptions and examples.
|
|
151
171
|
*/
|
|
172
|
+
/** How an operator is drawn in the AVL circuit notation (evaluation as signal flow). */
|
|
173
|
+
declare const OPERATOR_VISUAL_FORMS: readonly ["block", "series", "parallel", "invert", "branch", "scope", "template", "conveyor", "ladder", "actuator", "delay"];
|
|
174
|
+
type OperatorVisualForm = (typeof OPERATOR_VISUAL_FORMS)[number];
|
|
152
175
|
interface StdOperatorMeta extends OperatorMeta {
|
|
153
176
|
/** The std module this operator belongs to */
|
|
154
177
|
module: StdModule;
|
|
@@ -170,6 +193,10 @@ interface StdOperatorMeta extends OperatorMeta {
|
|
|
170
193
|
compileTime?: boolean;
|
|
171
194
|
/** Schema v2: structured metadata for effect operators */
|
|
172
195
|
effect?: OperatorEffectMeta;
|
|
196
|
+
/** Circuit form, declared only where it is not derivable (lambda → conveyor, side effect → actuator, else block). */
|
|
197
|
+
visual?: {
|
|
198
|
+
form: OperatorVisualForm;
|
|
199
|
+
};
|
|
173
200
|
}
|
|
174
201
|
/**
|
|
175
202
|
* Type guard to check if an operator category is a std category.
|
|
@@ -196,4 +223,4 @@ declare function isStdOperator(operator: string): boolean;
|
|
|
196
223
|
*/
|
|
197
224
|
declare function makeStdOperator(module: StdModule, fn: string): string;
|
|
198
225
|
|
|
199
|
-
export { type BasicReturnType as B, type OperatorMeta as O, type RunsOn as R, type StdOperatorMeta as S, type StdModule as a,
|
|
226
|
+
export { type BasicReturnType as B, type OperatorMeta as O, type RunsOn as R, type StdOperatorMeta as S, type StdModule as a, type OperatorVisualForm as b, OPERATOR_VISUAL_FORMS as c, OPERATOR_CATEGORIES as d, type OperatorCategory as e, type OperatorEffectMeta as f, type OperatorTypeRef as g, STD_MODULES as h, STD_OPERATOR_CATEGORIES as i, type StdOperatorCategory as j, getFunctionFromOperator as k, getModuleFromOperator as l, isStdCategory as m, isStdOperator as n, makeStdOperator as o };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/std",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.236.0",
|
|
4
4
|
"description": "Standard library operators for Almadar (math, string, array, etc.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"compiler": ">=4.10.0"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@almadar/core": "^10.
|
|
90
|
+
"@almadar/core": "^10.112.0"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@almadar/eslint-plugin": "^2.20.0",
|