@supersoniks/concorde 4.9.98-visual-stack.2 → 4.9.98-visual-stack.3

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/build-infos.json CHANGED
@@ -1 +1 @@
1
- {"date":1790874116}
1
+ {"date":1790884468}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supersoniks/concorde",
3
- "version": "4.9.98-visual-stack.2",
3
+ "version": "4.9.98-visual-stack.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "",
@@ -2045,4 +2045,4 @@
2045
2045
  }
2046
2046
  },
2047
2047
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
2048
- }
2048
+ }
@@ -92,6 +92,10 @@ export class SonicStore extends LitElement {
92
92
  return (this.dataProvider || this.id || "").trim();
93
93
  }
94
94
 
95
+ /** Action optionnelle après bootstrap (ex. `view` pour peindre la grille). */
96
+ @property({ type: String, attribute: "boot-action" })
97
+ bootAction = "";
98
+
95
99
  private bootstrap(): void {
96
100
  if (!this.id) return;
97
101
  this.compileReducer();
@@ -106,6 +110,8 @@ export class SonicStore extends LitElement {
106
110
  reset: () => this.reset(),
107
111
  };
108
112
  registerStore(handle);
113
+ const boot = (this.bootAction || "").trim();
114
+ if (boot) this.enqueue({ type: boot, t: performance.now() });
109
115
  }
110
116
 
111
117
  private compileReducer(): void {
@@ -151,14 +157,14 @@ export class SonicStore extends LitElement {
151
157
  try {
152
158
  while (this.queue.length) {
153
159
  const action = this.queue.shift()!;
154
- this.apply(action);
160
+ await this.apply(action);
155
161
  }
156
162
  } finally {
157
163
  this.draining = false;
158
164
  }
159
165
  }
160
166
 
161
- private apply(action: SonicActionMessage): void {
167
+ private async apply(action: SonicActionMessage): Promise<void> {
162
168
  if (!this.compiled) return;
163
169
  const started = performance.now();
164
170
  const env = {
@@ -179,7 +185,7 @@ export class SonicStore extends LitElement {
179
185
  try {
180
186
  const expr = this.compiled;
181
187
  // Bindings → $state, $action, $env (purs ; pas de $random / $now)
182
- const result = expr.evaluate(this.state, {
188
+ const result = await expr.evaluate(this.state, {
183
189
  state: this.state,
184
190
  action: bindings.action,
185
191
  env,
@@ -154,7 +154,11 @@ const Subscriber = <
154
154
  typeof value == "string" &&
155
155
  ["{", "["].includes(value.trim().charAt(0))
156
156
  ) {
157
- value = JSON.parse(value);
157
+ try {
158
+ value = JSON.parse(value);
159
+ } catch {
160
+ /* keep raw string (ex. score/label leaf, not a JSON attr) */
161
+ }
158
162
  }
159
163
  if (value == this._props) return;
160
164
 
@@ -8,6 +8,7 @@ Heavy opt-in features stay **out of** `concorde-core.bundle.js`. Load the core b
8
8
  | Shader | `concorde-shader.bundle.js` | `sonic-shader` | WebGL2 / ShaderToy |
9
9
  | WebGPU | `concorde-webgpu.bundle.js` | `sonic-webgpu` | Compute (`particles`) + image WGSL; DP / MediaRef glue same as shader |
10
10
  | Hugging Face | `concorde-hugging-face-infer.bundle.js` | `sonic-hugging-face-infer` | Exposes `ConcordeHF` for config |
11
+ | Interactive | `concorde-interactive.bundle.js` | `sonic-store`, keyboard, matrix… | Declarative playable SDUI |
11
12
 
12
13
  npm: `@supersoniks/concorde/bundle/3d`, `…/bundle/shader`, `…/bundle/webgpu`, `…/bundle/hugging-face-infer` (IIFE). ESM twins: `…/bundle/3d/es`, etc.
13
14
 
@@ -215,6 +215,10 @@ export class DocsNavigation extends LitElement {
215
215
  href: "#docs/_misc/docs-mock-api.md/docs-mock-api",
216
216
  },
217
217
  "Addons (opt-in)",
218
+ {
219
+ label: "Interactive",
220
+ href: "#core/components/functional/interactive/interactive.md/interactive",
221
+ },
218
222
  {
219
223
  label: "CDN addons",
220
224
  href: "#docs/_getting-started/cdn-addons.md/cdn-addons",