@barefootjs/xslate 0.18.3 → 0.18.5

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.
@@ -14,31 +14,4 @@
14
14
 
15
15
  import type { RenderDivergences } from '@barefootjs/jsx'
16
16
 
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` numeric-coerces through Perl's `+` (needs `.`/`~` concat)",
22
- 'html-entity-text':
23
- '`©` in JSX literal text: Hono decodes to `©`, this adapter re-emits the raw entity — same DOM, different bytes',
24
- 'math-methods':
25
- 'Math.min/max/abs over a signal render empty (only Math.floor is in the template-primitive registry)',
26
- 'boolean-attr-literals':
27
- 'camelCase boolean alias `readOnly`: Hono SSRs `readOnly="true"`, this adapter emits bare presence',
28
- 'camelcase-attributes':
29
- '`htmlFor` is not lowered to `for` (Hono maps it)',
30
- 'static-attr-escape':
31
- 'static attribute values are not HTML-escaped (`title="Fish & Chips"` emitted raw; Hono escapes)',
32
- 'svg-icon':
33
- 'SVG camelCase presentation attrs (`strokeWidth`, `strokeLinecap`) pass through unmapped; Hono lowers to kebab-case',
34
- 'object-entries-map':
35
- '`Object.entries(prop).map(([k, v]) => …)` renders an EMPTY list — the object-shaped prop silently produces zero iterations',
36
- 'nested-loop-outer-binding':
37
- 'nested-loop inner items carry `data-key` where the reference emits the depth-suffixed `data-key-1`',
38
- 'jsx-element-prop':
39
- 'a JSX element passed as a NON-children prop renders an empty slot — the element value is silently dropped',
40
- 'string-slice':
41
- '`.slice()` on a STRING misfires through the array slice helper',
42
- 'string-trim-sided':
43
- '`.trimStart()` / `.trimEnd()` render empty (no lowering)',
44
- }
17
+ export const renderDivergences: RenderDivergences = {}
@@ -1,25 +0,0 @@
1
- /**
2
- * Operand-type classification for the Text::Xslate (Kolon) template adapter.
3
- *
4
- * Extracted from `xslate-adapter.ts` (domain-module refactor, issue #2018
5
- * track D). Pure function over `ParsedExpr` taking an `isStringName`
6
- * predicate rather than reading adapter instance state.
7
- *
8
- * NOTE: unlike the Mojo adapter, Kolon's `==`/`!=` are value-equality
9
- * operators that compare strings and numbers correctly, so the Kolon
10
- * emitters never need to steer string comparisons onto `eq`/`ne`. This
11
- * helper is therefore not consumed by the Kolon lowering today — it is kept
12
- * as the parallel of the Mojo adapter's `expr/operand.ts` (groundwork for a
13
- * future shared Perl-evaluator surface, issue #2018 track D).
14
- */
15
- import type { ParsedExpr } from '@barefootjs/jsx';
16
- /**
17
- * Whether a comparison operand is string-typed. In the Mojo adapter this
18
- * selects Perl `eq`/`ne` over numeric `==`/`!=` for a `===`/`!==` against a
19
- * string operand. The Kolon emitters do NOT consume it — Kolon's `==`/`!=`
20
- * are value-equality operators that compare strings and numbers correctly, so
21
- * `===`/`!==` always map to `==`/`!=` here (see the file header). Kept only as
22
- * the parallel of the Mojo helper.
23
- */
24
- export declare function isStringTypedOperand(expr: ParsedExpr, isStringName: (n: string) => boolean): boolean;
25
- //# sourceMappingURL=operand.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operand.d.ts","sourceRoot":"","sources":["../../../src/adapter/expr/operand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CASpG"}
@@ -1,35 +0,0 @@
1
- /**
2
- * Operand-type classification for the Text::Xslate (Kolon) template adapter.
3
- *
4
- * Extracted from `xslate-adapter.ts` (domain-module refactor, issue #2018
5
- * track D). Pure function over `ParsedExpr` taking an `isStringName`
6
- * predicate rather than reading adapter instance state.
7
- *
8
- * NOTE: unlike the Mojo adapter, Kolon's `==`/`!=` are value-equality
9
- * operators that compare strings and numbers correctly, so the Kolon
10
- * emitters never need to steer string comparisons onto `eq`/`ne`. This
11
- * helper is therefore not consumed by the Kolon lowering today — it is kept
12
- * as the parallel of the Mojo adapter's `expr/operand.ts` (groundwork for a
13
- * future shared Perl-evaluator surface, issue #2018 track D).
14
- */
15
-
16
- import type { ParsedExpr } from '@barefootjs/jsx'
17
-
18
- /**
19
- * Whether a comparison operand is string-typed. In the Mojo adapter this
20
- * selects Perl `eq`/`ne` over numeric `==`/`!=` for a `===`/`!==` against a
21
- * string operand. The Kolon emitters do NOT consume it — Kolon's `==`/`!=`
22
- * are value-equality operators that compare strings and numbers correctly, so
23
- * `===`/`!==` always map to `==`/`!=` here (see the file header). Kept only as
24
- * the parallel of the Mojo helper.
25
- */
26
- export function isStringTypedOperand(expr: ParsedExpr, isStringName: (n: string) => boolean): boolean {
27
- if (expr.kind === 'literal' && expr.literalType === 'string') return true
28
- if (expr.kind === 'call' && expr.callee.kind === 'identifier' && expr.args.length === 0) {
29
- return isStringName(expr.callee.name)
30
- }
31
- if (expr.kind === 'member' && expr.object.kind === 'identifier' && expr.object.name === 'props') {
32
- return isStringName(expr.property)
33
- }
34
- return false
35
- }