@barefootjs/blade 0.18.7 → 0.19.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.
@@ -188252,7 +188252,7 @@ function collectBooleanTypedProps(ir) {
188252
188252
  return new Set(ir.metadata.propsParams.filter((prop) => prop.type?.primitive === "boolean" || prop.type?.raw === "boolean").map((prop) => prop.name));
188253
188253
  }
188254
188254
  function collectNullableOptionalProps(ir) {
188255
- return new Set(ir.metadata.propsParams.filter((p) => p.defaultValue === undefined && !p.isRest && p.type?.kind !== "primitive").map((p) => p.name));
188255
+ return new Set(ir.metadata.propsParams.filter((p) => p.defaultValue === undefined && !p.isRest && (p.type?.kind !== "primitive" || p.optional)).map((p) => p.name));
188256
188256
  }
188257
188257
  function collectStringValueNames(ir) {
188258
188258
  const names = new Set;
@@ -14,8 +14,9 @@ import { type ComponentIR } from '@barefootjs/jsx';
14
14
  */
15
15
  export declare function collectBooleanTypedProps(ir: ComponentIR): Set<string>;
16
16
  /**
17
- * Bare references to optional, no-default, non-primitive props (e.g.
18
- * textarea's `rows`) are `null` when omitted → guarded with
17
+ * Bare references to presence-uncertain no-default props (non-primitive
18
+ * typed OR declared optional, #2259 — e.g. textarea's `rows`) are
19
+ * `null` when omitted → guarded with
19
20
  * `is defined and is not null` in `emitExpression`. See the
20
21
  * `nullableOptionalProps` field docstring in `blade-adapter.ts`.
21
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"prop-classes.d.ts","sourceRoot":"","sources":["../../../src/adapter/props/prop-classes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGzE;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAMrE;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAWzE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAepE"}
1
+ {"version":3,"file":"prop-classes.d.ts","sourceRoot":"","sources":["../../../src/adapter/props/prop-classes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGzE;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAMrE;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAWzE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAepE"}
package/dist/build.js CHANGED
@@ -188252,7 +188252,7 @@ function collectBooleanTypedProps(ir) {
188252
188252
  return new Set(ir.metadata.propsParams.filter((prop) => prop.type?.primitive === "boolean" || prop.type?.raw === "boolean").map((prop) => prop.name));
188253
188253
  }
188254
188254
  function collectNullableOptionalProps(ir) {
188255
- return new Set(ir.metadata.propsParams.filter((p) => p.defaultValue === undefined && !p.isRest && p.type?.kind !== "primitive").map((p) => p.name));
188255
+ return new Set(ir.metadata.propsParams.filter((p) => p.defaultValue === undefined && !p.isRest && (p.type?.kind !== "primitive" || p.optional)).map((p) => p.name));
188256
188256
  }
188257
188257
  function collectStringValueNames(ir) {
188258
188258
  const names = new Set;
package/dist/index.js CHANGED
@@ -188252,7 +188252,7 @@ function collectBooleanTypedProps(ir) {
188252
188252
  return new Set(ir.metadata.propsParams.filter((prop) => prop.type?.primitive === "boolean" || prop.type?.raw === "boolean").map((prop) => prop.name));
188253
188253
  }
188254
188254
  function collectNullableOptionalProps(ir) {
188255
- return new Set(ir.metadata.propsParams.filter((p) => p.defaultValue === undefined && !p.isRest && p.type?.kind !== "primitive").map((p) => p.name));
188255
+ return new Set(ir.metadata.propsParams.filter((p) => p.defaultValue === undefined && !p.isRest && (p.type?.kind !== "primitive" || p.optional)).map((p) => p.name));
188256
188256
  }
188257
188257
  function collectStringValueNames(ir) {
188258
188258
  const names = new Set;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/blade",
3
- "version": "0.18.7",
3
+ "version": "0.19.0",
4
4
  "description": "Laravel Blade (PHP) adapter for BarefootJS — compiles IR to .blade.php templates and ships the PHP BarefootJS rendering runtime on illuminate/view standalone",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -54,14 +54,14 @@
54
54
  "directory": "packages/adapter-blade"
55
55
  },
56
56
  "dependencies": {
57
- "@barefootjs/shared": "0.18.7"
57
+ "@barefootjs/shared": "0.19.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@barefootjs/jsx": ">=0.2.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@barefootjs/adapter-tests": "0.1.0",
64
- "@barefootjs/jsx": "0.18.7",
64
+ "@barefootjs/jsx": "0.19.0",
65
65
  "typescript": "^5.0.0"
66
66
  }
67
67
  }
@@ -50,6 +50,19 @@ runAdapterConformanceTests({
50
50
  // Same `/* @client */` keyed-map elision (data-table).
51
51
  'data-table',
52
52
  ]),
53
+ skipDataPoints: new Set<string>([
54
+ // #2255 — PHP mb_strlen counts codepoints; JS counts UTF-16 code
55
+ // units, so a surrogate-pair character is 2 in JS, 1 here.
56
+ 'string-length-text:astral',
57
+ // #2260 — controlled boolean props: the SSR seed evaluates only the
58
+ // static fallback of `props.X ?? internal()` chains.
59
+ 'toggle:gen:pressed:true',
60
+ 'switch:gen:checked:true',
61
+ 'checkbox:gen:checked:true',
62
+ // #2261 — invalid dynamic CSS value kept (escaped) where the oracle
63
+ // drops the property.
64
+ 'style-object-dynamic:gen:color:markup',
65
+ ]),
53
66
  onRenderError: (err, id) => {
54
67
  if (err instanceof BladeNotAvailableError) {
55
68
  console.log(`Skipping [${id}]: ${err.message}`)
@@ -24,8 +24,9 @@ export function collectBooleanTypedProps(ir: ComponentIR): Set<string> {
24
24
  }
25
25
 
26
26
  /**
27
- * Bare references to optional, no-default, non-primitive props (e.g.
28
- * textarea's `rows`) are `null` when omitted → guarded with
27
+ * Bare references to presence-uncertain no-default props (non-primitive
28
+ * typed OR declared optional, #2259 — e.g. textarea's `rows`) are
29
+ * `null` when omitted → guarded with
29
30
  * `is defined and is not null` in `emitExpression`. See the
30
31
  * `nullableOptionalProps` field docstring in `blade-adapter.ts`.
31
32
  */
@@ -36,7 +37,7 @@ export function collectNullableOptionalProps(ir: ComponentIR): Set<string> {
36
37
  p =>
37
38
  p.defaultValue === undefined &&
38
39
  !p.isRest &&
39
- p.type?.kind !== 'primitive',
40
+ (p.type?.kind !== 'primitive' || p.optional),
40
41
  )
41
42
  .map(p => p.name),
42
43
  )