@barefootjs/blade 0.18.2 → 0.18.4
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/dist/adapter/blade-adapter.d.ts.map +1 -1
- package/dist/adapter/emit-context.d.ts +2 -0
- package/dist/adapter/emit-context.d.ts.map +1 -1
- package/dist/adapter/expr/emitters.d.ts.map +1 -1
- package/dist/adapter/index.js +13 -4
- package/dist/build.js +13 -4
- package/dist/index.js +13 -10
- package/dist/render-divergences.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/adapter/blade-adapter.ts +1 -0
- package/src/adapter/emit-context.ts +3 -0
- package/src/adapter/expr/emitters.ts +26 -5
- package/src/render-divergences.ts +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blade-adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/blade-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6OG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,MAAM,EACN,SAAS,EACT,MAAM,EACN,YAAY,EACZ,aAAa,EACb,MAAM,EACN,WAAW,EACX,UAAU,EACV,MAAM,EACN,aAAa,EACb,UAAU,EACV,OAAO,EAKP,yBAAyB,EAE1B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAE3B,KAAK,aAAa,EAClB,KAAK,UAAU,EAyBhB,MAAM,iBAAiB,CAAA;AAKxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,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,MAAM,GAAG,OAAO,CAO3C;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,aAAa;IAKrB;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,2BAA2B;IAQnC,OAAO,CAAC,yBAAyB;IAUjC,OAAO,CAAC,gBAAgB;IAcxB,iFAAiF;IACjF,OAAO,CAAC,4BAA4B;CAGrC;AAED,eAAO,MAAM,YAAY,cAAqB,CAAA"}
|
|
@@ -36,6 +36,8 @@ export interface BladeEmitContext {
|
|
|
36
36
|
* (`variantClasses.ghost`) to its Blade value at compile time, or null.
|
|
37
37
|
*/
|
|
38
38
|
_resolveStaticRecordLiteral(objectName: string, key: string): string | null;
|
|
39
|
+
/** Whether a getter/prop name resolves to a string-typed SSR value. */
|
|
40
|
+
_isStringValueName(name: string): boolean;
|
|
39
41
|
/** Record a BF101 unsupported-expression diagnostic. */
|
|
40
42
|
_recordExprBF101(message: string, reason?: string): void;
|
|
41
43
|
/** Lower a filter/predicate body to its Blade form, bound to `param`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit-context.d.ts","sourceRoot":"","sources":["../../src/adapter/emit-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5E,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,QAAQ,CAAC,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAEzC;;;OAGG;IACH,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAEtD,oFAAoF;IACpF,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAEjD;;;OAGG;IACH,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG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,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,UAAU,GAAG,MAAM,CAAA;IAEtE;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,CAAA;CACjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitters.d.ts","sourceRoot":"","sources":["../../../src/adapter/expr/emitters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"emitters.d.ts","sourceRoot":"","sources":["../../../src/adapter/expr/emitters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AAEH,OAAO,EAEL,KAAK,iBAAiB,EAEtB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,YAAY,EAIlB,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AA+B1D;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErE;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,kBAAmB,YAAW,iBAAiB;IAExD,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAI7B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC;IAPjC,YACmB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,E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IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,MAAM,GAAG,MAAM,CAWzG;CACF"}
|
package/dist/adapter/index.js
CHANGED
|
@@ -187641,6 +187641,8 @@ function renderFlatMethod(recv, depth, emit) {
|
|
|
187641
187641
|
|
|
187642
187642
|
// src/adapter/expr/emitters.ts
|
|
187643
187643
|
import {
|
|
187644
|
+
groupBinaryOperand,
|
|
187645
|
+
isStringConcatBinary,
|
|
187644
187646
|
identifierPath,
|
|
187645
187647
|
matchSearchParamsMethodCall,
|
|
187646
187648
|
sortComparatorFromArrow
|
|
@@ -187709,12 +187711,15 @@ class BladeFilterEmitter {
|
|
|
187709
187711
|
return emit(argument);
|
|
187710
187712
|
}
|
|
187711
187713
|
binary(op, left, right, emit) {
|
|
187712
|
-
const l = emit(left);
|
|
187713
|
-
const r = emit(right);
|
|
187714
|
+
const l = groupBinaryOperand(left, emit(left));
|
|
187715
|
+
const r = groupBinaryOperand(right, emit(right));
|
|
187714
187716
|
if (op === "===")
|
|
187715
187717
|
return `$bf->eq(${l}, ${r})`;
|
|
187716
187718
|
if (op === "!==")
|
|
187717
187719
|
return `$bf->neq(${l}, ${r})`;
|
|
187720
|
+
if (isStringConcatBinary(op, left, right, this.isStringName)) {
|
|
187721
|
+
return `${l} . ${r}`;
|
|
187722
|
+
}
|
|
187718
187723
|
const opMap = {
|
|
187719
187724
|
">": ">",
|
|
187720
187725
|
"<": "<",
|
|
@@ -187840,12 +187845,15 @@ class BladeTopLevelEmitter {
|
|
|
187840
187845
|
return emit(argument);
|
|
187841
187846
|
}
|
|
187842
187847
|
binary(op, left, right, emit) {
|
|
187843
|
-
const l = emit(left);
|
|
187844
|
-
const r = emit(right);
|
|
187848
|
+
const l = groupBinaryOperand(left, emit(left));
|
|
187849
|
+
const r = groupBinaryOperand(right, emit(right));
|
|
187845
187850
|
if (op === "===")
|
|
187846
187851
|
return `$bf->eq(${l}, ${r})`;
|
|
187847
187852
|
if (op === "!==")
|
|
187848
187853
|
return `$bf->neq(${l}, ${r})`;
|
|
187854
|
+
if (isStringConcatBinary(op, left, right, (n) => this.ctx._isStringValueName(n))) {
|
|
187855
|
+
return `${l} . ${r}`;
|
|
187856
|
+
}
|
|
187849
187857
|
const opMap = {
|
|
187850
187858
|
">": ">",
|
|
187851
187859
|
"<": "<",
|
|
@@ -188901,6 +188909,7 @@ ${reason}` : "";
|
|
|
188901
188909
|
_resolveModuleStringConst: (name) => this._resolveModuleStringConst(name),
|
|
188902
188910
|
_resolveLiteralConst: (name) => this._resolveLiteralConst(name),
|
|
188903
188911
|
_resolveStaticRecordLiteral: (o, k) => this._resolveStaticRecordLiteral(o, k),
|
|
188912
|
+
_isStringValueName: (name) => this._isStringValueName(name),
|
|
188904
188913
|
_recordExprBF101: (message, reason) => this._recordExprBF101(message, reason),
|
|
188905
188914
|
_renderBladeFilterExprPublic: (e, p) => this._renderBladeFilterExprPublic(e, p)
|
|
188906
188915
|
};
|
package/dist/build.js
CHANGED
|
@@ -187641,6 +187641,8 @@ function renderFlatMethod(recv, depth, emit) {
|
|
|
187641
187641
|
|
|
187642
187642
|
// src/adapter/expr/emitters.ts
|
|
187643
187643
|
import {
|
|
187644
|
+
groupBinaryOperand,
|
|
187645
|
+
isStringConcatBinary,
|
|
187644
187646
|
identifierPath,
|
|
187645
187647
|
matchSearchParamsMethodCall,
|
|
187646
187648
|
sortComparatorFromArrow
|
|
@@ -187709,12 +187711,15 @@ class BladeFilterEmitter {
|
|
|
187709
187711
|
return emit(argument);
|
|
187710
187712
|
}
|
|
187711
187713
|
binary(op, left, right, emit) {
|
|
187712
|
-
const l = emit(left);
|
|
187713
|
-
const r = emit(right);
|
|
187714
|
+
const l = groupBinaryOperand(left, emit(left));
|
|
187715
|
+
const r = groupBinaryOperand(right, emit(right));
|
|
187714
187716
|
if (op === "===")
|
|
187715
187717
|
return `$bf->eq(${l}, ${r})`;
|
|
187716
187718
|
if (op === "!==")
|
|
187717
187719
|
return `$bf->neq(${l}, ${r})`;
|
|
187720
|
+
if (isStringConcatBinary(op, left, right, this.isStringName)) {
|
|
187721
|
+
return `${l} . ${r}`;
|
|
187722
|
+
}
|
|
187718
187723
|
const opMap = {
|
|
187719
187724
|
">": ">",
|
|
187720
187725
|
"<": "<",
|
|
@@ -187840,12 +187845,15 @@ class BladeTopLevelEmitter {
|
|
|
187840
187845
|
return emit(argument);
|
|
187841
187846
|
}
|
|
187842
187847
|
binary(op, left, right, emit) {
|
|
187843
|
-
const l = emit(left);
|
|
187844
|
-
const r = emit(right);
|
|
187848
|
+
const l = groupBinaryOperand(left, emit(left));
|
|
187849
|
+
const r = groupBinaryOperand(right, emit(right));
|
|
187845
187850
|
if (op === "===")
|
|
187846
187851
|
return `$bf->eq(${l}, ${r})`;
|
|
187847
187852
|
if (op === "!==")
|
|
187848
187853
|
return `$bf->neq(${l}, ${r})`;
|
|
187854
|
+
if (isStringConcatBinary(op, left, right, (n) => this.ctx._isStringValueName(n))) {
|
|
187855
|
+
return `${l} . ${r}`;
|
|
187856
|
+
}
|
|
187849
187857
|
const opMap = {
|
|
187850
187858
|
">": ">",
|
|
187851
187859
|
"<": "<",
|
|
@@ -188901,6 +188909,7 @@ ${reason}` : "";
|
|
|
188901
188909
|
_resolveModuleStringConst: (name) => this._resolveModuleStringConst(name),
|
|
188902
188910
|
_resolveLiteralConst: (name) => this._resolveLiteralConst(name),
|
|
188903
188911
|
_resolveStaticRecordLiteral: (o, k) => this._resolveStaticRecordLiteral(o, k),
|
|
188912
|
+
_isStringValueName: (name) => this._isStringValueName(name),
|
|
188904
188913
|
_recordExprBF101: (message, reason) => this._recordExprBF101(message, reason),
|
|
188905
188914
|
_renderBladeFilterExprPublic: (e, p) => this._renderBladeFilterExprPublic(e, p)
|
|
188906
188915
|
};
|
package/dist/index.js
CHANGED
|
@@ -187641,6 +187641,8 @@ function renderFlatMethod(recv, depth, emit) {
|
|
|
187641
187641
|
|
|
187642
187642
|
// src/adapter/expr/emitters.ts
|
|
187643
187643
|
import {
|
|
187644
|
+
groupBinaryOperand,
|
|
187645
|
+
isStringConcatBinary,
|
|
187644
187646
|
identifierPath,
|
|
187645
187647
|
matchSearchParamsMethodCall,
|
|
187646
187648
|
sortComparatorFromArrow
|
|
@@ -187709,12 +187711,15 @@ class BladeFilterEmitter {
|
|
|
187709
187711
|
return emit(argument);
|
|
187710
187712
|
}
|
|
187711
187713
|
binary(op, left, right, emit) {
|
|
187712
|
-
const l = emit(left);
|
|
187713
|
-
const r = emit(right);
|
|
187714
|
+
const l = groupBinaryOperand(left, emit(left));
|
|
187715
|
+
const r = groupBinaryOperand(right, emit(right));
|
|
187714
187716
|
if (op === "===")
|
|
187715
187717
|
return `$bf->eq(${l}, ${r})`;
|
|
187716
187718
|
if (op === "!==")
|
|
187717
187719
|
return `$bf->neq(${l}, ${r})`;
|
|
187720
|
+
if (isStringConcatBinary(op, left, right, this.isStringName)) {
|
|
187721
|
+
return `${l} . ${r}`;
|
|
187722
|
+
}
|
|
187718
187723
|
const opMap = {
|
|
187719
187724
|
">": ">",
|
|
187720
187725
|
"<": "<",
|
|
@@ -187840,12 +187845,15 @@ class BladeTopLevelEmitter {
|
|
|
187840
187845
|
return emit(argument);
|
|
187841
187846
|
}
|
|
187842
187847
|
binary(op, left, right, emit) {
|
|
187843
|
-
const l = emit(left);
|
|
187844
|
-
const r = emit(right);
|
|
187848
|
+
const l = groupBinaryOperand(left, emit(left));
|
|
187849
|
+
const r = groupBinaryOperand(right, emit(right));
|
|
187845
187850
|
if (op === "===")
|
|
187846
187851
|
return `$bf->eq(${l}, ${r})`;
|
|
187847
187852
|
if (op === "!==")
|
|
187848
187853
|
return `$bf->neq(${l}, ${r})`;
|
|
187854
|
+
if (isStringConcatBinary(op, left, right, (n) => this.ctx._isStringValueName(n))) {
|
|
187855
|
+
return `${l} . ${r}`;
|
|
187856
|
+
}
|
|
187849
187857
|
const opMap = {
|
|
187850
187858
|
">": ">",
|
|
187851
187859
|
"<": "<",
|
|
@@ -188901,6 +188909,7 @@ ${reason}` : "";
|
|
|
188901
188909
|
_resolveModuleStringConst: (name) => this._resolveModuleStringConst(name),
|
|
188902
188910
|
_resolveLiteralConst: (name) => this._resolveLiteralConst(name),
|
|
188903
188911
|
_resolveStaticRecordLiteral: (o, k) => this._resolveStaticRecordLiteral(o, k),
|
|
188912
|
+
_isStringValueName: (name) => this._isStringValueName(name),
|
|
188904
188913
|
_recordExprBF101: (message, reason) => this._recordExprBF101(message, reason),
|
|
188905
188914
|
_renderBladeFilterExprPublic: (e, p) => this._renderBladeFilterExprPublic(e, p)
|
|
188906
188915
|
};
|
|
@@ -189076,15 +189085,9 @@ var conformancePins = {
|
|
|
189076
189085
|
};
|
|
189077
189086
|
// src/render-divergences.ts
|
|
189078
189087
|
var renderDivergences = {
|
|
189079
|
-
"arithmetic-text": "`(count() + 2) * 3` renders 10 instead of 18 — the parenthesised sub-expression loses its grouping (silent wrong arithmetic)",
|
|
189080
|
-
"string-concat-plus": "`'Hello, ' + name` is emitted as PHP `+`, which fatals with \"Unsupported operand types: string + string\" — needs PHP's `.` concat",
|
|
189081
|
-
"falsy-text-values": '`{false}` renders "false" (Hono drops it); `{null}`/`{undefined}` render empty (Hono renders "null") — neither side matches JSX semantics',
|
|
189082
189088
|
"html-entity-text": "`©` in JSX literal text: Hono decodes to `©`, this adapter re-emits the raw entity — same DOM, different bytes",
|
|
189083
189089
|
"math-methods": "Math.min/max/abs over a signal render empty (only Math.floor is in the template-primitive registry)",
|
|
189084
|
-
"boolean-attr-literals": 'camelCase boolean alias `readOnly`: Hono SSRs `readOnly="true"`, this adapter emits bare presence',
|
|
189085
|
-
"camelcase-attributes": "`htmlFor` is not lowered to `for` (Hono maps it)",
|
|
189086
189090
|
"static-attr-escape": 'static attribute values are not HTML-escaped (`title="Fish & Chips"` emitted raw; Hono escapes)',
|
|
189087
|
-
"svg-icon": "SVG camelCase presentation attrs (`strokeWidth`, `strokeLinecap`) pass through unmapped; Hono lowers to kebab-case",
|
|
189088
189091
|
"object-entries-map": "`Object.entries(prop).map(([k, v]) => …)` renders an EMPTY list — the object-shaped prop silently produces zero iterations",
|
|
189089
189092
|
"nested-loop-outer-binding": "nested-loop inner items carry `data-key` where the reference emits the depth-suffixed `data-key-1`",
|
|
189090
189093
|
"jsx-element-prop": "a JSX element passed as a NON-children prop renders an empty slot — the element value is silently dropped",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-divergences.d.ts","sourceRoot":"","sources":["../src/render-divergences.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAExD,eAAO,MAAM,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"render-divergences.d.ts","sourceRoot":"","sources":["../src/render-divergences.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAExD,eAAO,MAAM,iBAAiB,EAAE,iBAiB/B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barefootjs/blade",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.4",
|
|
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.
|
|
57
|
+
"@barefootjs/shared": "0.18.4"
|
|
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.
|
|
64
|
+
"@barefootjs/jsx": "0.18.4",
|
|
65
65
|
"typescript": "^5.0.0"
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -1659,6 +1659,7 @@ export class BladeAdapter extends BaseAdapter implements IRNodeEmitter<BladeRend
|
|
|
1659
1659
|
_resolveModuleStringConst: (name) => this._resolveModuleStringConst(name),
|
|
1660
1660
|
_resolveLiteralConst: (name) => this._resolveLiteralConst(name),
|
|
1661
1661
|
_resolveStaticRecordLiteral: (o, k) => this._resolveStaticRecordLiteral(o, k),
|
|
1662
|
+
_isStringValueName: (name) => this._isStringValueName(name),
|
|
1662
1663
|
_recordExprBF101: (message, reason) => this._recordExprBF101(message, reason),
|
|
1663
1664
|
_renderBladeFilterExprPublic: (e, p) => this._renderBladeFilterExprPublic(e, p),
|
|
1664
1665
|
}
|
|
@@ -42,6 +42,9 @@ export interface BladeEmitContext {
|
|
|
42
42
|
*/
|
|
43
43
|
_resolveStaticRecordLiteral(objectName: string, key: string): string | null
|
|
44
44
|
|
|
45
|
+
/** Whether a getter/prop name resolves to a string-typed SSR value. */
|
|
46
|
+
_isStringValueName(name: string): boolean
|
|
47
|
+
|
|
45
48
|
/** Record a BF101 unsupported-expression diagnostic. */
|
|
46
49
|
_recordExprBF101(message: string, reason?: string): void
|
|
47
50
|
|
|
@@ -82,7 +82,8 @@
|
|
|
82
82
|
* entry point `_renderBladeFilterExprPublic`.
|
|
83
83
|
*/
|
|
84
84
|
|
|
85
|
-
import {
|
|
85
|
+
import { groupBinaryOperand,
|
|
86
|
+
isStringConcatBinary,
|
|
86
87
|
type ParsedExprEmitter,
|
|
87
88
|
type HigherOrderMethod,
|
|
88
89
|
type ArrayMethod,
|
|
@@ -208,13 +209,22 @@ export class BladeFilterEmitter implements ParsedExprEmitter {
|
|
|
208
209
|
}
|
|
209
210
|
|
|
210
211
|
binary(op: string, left: ParsedExpr, right: ParsedExpr, emit: (e: ParsedExpr) => string): string {
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
// Preserve source grouping: a compound operand re-emitted as infix
|
|
213
|
+
// text is otherwise re-parsed under THIS language's precedence —
|
|
214
|
+
// `(count() + 2) * 3` would silently become `count + 2 * 3` (#2173).
|
|
215
|
+
const l = groupBinaryOperand(left, emit(left))
|
|
216
|
+
const r = groupBinaryOperand(right, emit(right))
|
|
213
217
|
// See the file header, divergence 8: PHP's `==`/`!=`/`===`/`!==` are
|
|
214
218
|
// NEVER emitted for JS `===`/`!==`. `$bf->eq`/`$bf->neq` are the one
|
|
215
219
|
// shared JS-strict-equality implementation.
|
|
216
220
|
if (op === '===') return `$bf->eq(${l}, ${r})`
|
|
217
221
|
if (op === '!==') return `$bf->neq(${l}, ${r})`
|
|
222
|
+
// JS `+` with a string-typed operand is CONCATENATION, not addition —
|
|
223
|
+
// PHP's `+` fatals on non-numeric strings ("Unsupported operand
|
|
224
|
+
// types", #2176). Lower to PHP's `.` concat operator.
|
|
225
|
+
if (isStringConcatBinary(op, left, right, this.isStringName)) {
|
|
226
|
+
return `${l} . ${r}`
|
|
227
|
+
}
|
|
218
228
|
const opMap: Record<string, string> = {
|
|
219
229
|
'>': '>', '<': '<', '>=': '>=', '<=': '<=',
|
|
220
230
|
'+': '+', '-': '-', '*': '*', '/': '/',
|
|
@@ -405,12 +415,23 @@ export class BladeTopLevelEmitter implements ParsedExprEmitter {
|
|
|
405
415
|
}
|
|
406
416
|
|
|
407
417
|
binary(op: string, left: ParsedExpr, right: ParsedExpr, emit: (e: ParsedExpr) => string): string {
|
|
408
|
-
|
|
409
|
-
|
|
418
|
+
// Preserve source grouping: a compound operand re-emitted as infix
|
|
419
|
+
// text is otherwise re-parsed under THIS language's precedence —
|
|
420
|
+
// `(count() + 2) * 3` would silently become `count + 2 * 3` (#2173).
|
|
421
|
+
const l = groupBinaryOperand(left, emit(left))
|
|
422
|
+
const r = groupBinaryOperand(right, emit(right))
|
|
410
423
|
// See the file header, divergence 8: PHP's `==`/`!=`/`===`/`!==` are
|
|
411
424
|
// NEVER emitted for JS `===`/`!==`.
|
|
412
425
|
if (op === '===') return `$bf->eq(${l}, ${r})`
|
|
413
426
|
if (op === '!==') return `$bf->neq(${l}, ${r})`
|
|
427
|
+
// JS `+` with a string-typed operand is CONCATENATION, not addition —
|
|
428
|
+
// PHP's `+` fatals on non-numeric strings ("Unsupported operand
|
|
429
|
+
// types", #2176). Lower to PHP's `.` concat operator. The adapter's
|
|
430
|
+
// string-value registry catches getter/prop operands with no literal
|
|
431
|
+
// present (`firstName() + lastName()`).
|
|
432
|
+
if (isStringConcatBinary(op, left, right, n => this.ctx._isStringValueName(n))) {
|
|
433
|
+
return `${l} . ${r}`
|
|
434
|
+
}
|
|
414
435
|
const opMap: Record<string, string> = {
|
|
415
436
|
'>': '>', '<': '<', '>=': '>=', '<=': '<=',
|
|
416
437
|
'+': '+', '-': '-', '*': '*',
|
|
@@ -15,24 +15,12 @@
|
|
|
15
15
|
import type { RenderDivergences } from '@barefootjs/jsx'
|
|
16
16
|
|
|
17
17
|
export const renderDivergences: RenderDivergences = {
|
|
18
|
-
'arithmetic-text':
|
|
19
|
-
'`(count() + 2) * 3` renders 10 instead of 18 — the parenthesised sub-expression loses its grouping (silent wrong arithmetic)',
|
|
20
|
-
'string-concat-plus':
|
|
21
|
-
'`\'Hello, \' + name` is emitted as PHP `+`, which fatals with "Unsupported operand types: string + string" — needs PHP\'s `.` concat',
|
|
22
|
-
'falsy-text-values':
|
|
23
|
-
'`{false}` renders "false" (Hono drops it); `{null}`/`{undefined}` render empty (Hono renders "null") — neither side matches JSX semantics',
|
|
24
18
|
'html-entity-text':
|
|
25
19
|
'`©` in JSX literal text: Hono decodes to `©`, this adapter re-emits the raw entity — same DOM, different bytes',
|
|
26
20
|
'math-methods':
|
|
27
21
|
'Math.min/max/abs over a signal render empty (only Math.floor is in the template-primitive registry)',
|
|
28
|
-
'boolean-attr-literals':
|
|
29
|
-
'camelCase boolean alias `readOnly`: Hono SSRs `readOnly="true"`, this adapter emits bare presence',
|
|
30
|
-
'camelcase-attributes':
|
|
31
|
-
'`htmlFor` is not lowered to `for` (Hono maps it)',
|
|
32
22
|
'static-attr-escape':
|
|
33
23
|
'static attribute values are not HTML-escaped (`title="Fish & Chips"` emitted raw; Hono escapes)',
|
|
34
|
-
'svg-icon':
|
|
35
|
-
'SVG camelCase presentation attrs (`strokeWidth`, `strokeLinecap`) pass through unmapped; Hono lowers to kebab-case',
|
|
36
24
|
'object-entries-map':
|
|
37
25
|
'`Object.entries(prop).map(([k, v]) => …)` renders an EMPTY list — the object-shaped prop silently produces zero iterations',
|
|
38
26
|
'nested-loop-outer-binding':
|