@object-ui/core 11.3.0 → 11.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @object-ui/core
2
2
 
3
+ ## 11.5.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [9255686]
8
+ - Updated dependencies [1072701]
9
+ - @object-ui/types@11.5.0
10
+
11
+ ## 11.4.0
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [8bf6295]
16
+ - Updated dependencies [1948c5b]
17
+ - Updated dependencies [c38d107]
18
+ - @object-ui/types@11.4.0
19
+
3
20
  ## 11.3.0
4
21
 
5
22
  ### Minor Changes
@@ -412,7 +412,14 @@ export class ActionRunner {
412
412
  }
413
413
  }
414
414
  try {
415
- const result = this.evaluator.evaluate(`\${${script}}`);
415
+ let result = this.evaluator.evaluate(`\${${script}}`);
416
+ // The expression itself is synchronous, but a formula function it calls
417
+ // may kick off an async write and return a Promise. Await it so the
418
+ // caller's success/failure — and the post-execution toast — reflects
419
+ // whether that write actually completed, not just that we called it.
420
+ if (result != null && typeof result.then === 'function') {
421
+ result = await result;
422
+ }
416
423
  return { success: true, data: result };
417
424
  }
418
425
  catch (error) {
@@ -204,9 +204,14 @@ export class ExpressionEvaluator {
204
204
  try {
205
205
  return Boolean(this.evaluateExpression(trimmed, { sanitize: options.sanitize !== false }));
206
206
  }
207
- catch {
207
+ catch (error) {
208
208
  // Unparseable predicate — preserve the historical "default to
209
- // visible/enabled" behaviour rather than hiding/blocking on a typo.
209
+ // visible/enabled" behaviour rather than hiding/blocking on a typo,
210
+ // UNLESS the caller opted into fail-closed semantics (mirrors the
211
+ // `${...}` template path above, which already honors this).
212
+ if (options.throwOnError) {
213
+ throw error;
214
+ }
210
215
  return true;
211
216
  }
212
217
  }
@@ -28,10 +28,18 @@ export const STYLE_BREAKPOINTS = {
28
28
  const camelToKebab = (k) => k.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
29
29
  /** Style-map → `prop: value;` declarations. Values pass through **verbatim** —
30
30
  * that is the whole point: arbitrary values (`13px`, `#1a2b3c`) and design
31
- * tokens (`var(--space-6)`) work with zero build step. */
31
+ * tokens (`var(--space-6)`) work with zero build step.
32
+ *
33
+ * `!important` on every declaration is deliberate: this scoped rule and a
34
+ * component's own base utility class (e.g. `flex`/`grid` from the layout
35
+ * renderer) both land on the same element with equal (single-class)
36
+ * specificity, so without it the winner depends on stylesheet injection
37
+ * order — which flips between dev (HMR-injected Tailwind CSS) and prod
38
+ * (head `<link>` precedes body). An explicit per-node style is always the
39
+ * more specific author intent and must win deterministically. */
32
40
  const declarations = (m) => Object.entries(m)
33
41
  .filter(([, v]) => v != null && v !== '')
34
- .map(([k, v]) => `${camelToKebab(k)}: ${typeof v === 'number' ? String(v) : v};`)
42
+ .map(([k, v]) => `${camelToKebab(k)}: ${typeof v === 'number' ? String(v) : v} !important;`)
35
43
  .join(' ');
36
44
  /** True when a node actually carries responsive styles worth compiling. */
37
45
  export function hasResponsiveStyles(rs) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/core",
3
- "version": "11.3.0",
3
+ "version": "11.5.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",
@@ -25,11 +25,11 @@
25
25
  }
26
26
  },
27
27
  "dependencies": {
28
- "@objectstack/formula": "^11.2.0",
29
- "@objectstack/spec": "^11.2.0",
28
+ "@objectstack/formula": "^11.5.0",
29
+ "@objectstack/spec": "^11.7.0",
30
30
  "lodash": "^4.18.1",
31
31
  "zod": "^4.4.3",
32
- "@object-ui/types": "11.3.0"
32
+ "@object-ui/types": "11.5.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "^6.0.3",