@barefootjs/jinja 0.1.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.
Files changed (88) hide show
  1. package/README.md +66 -0
  2. package/dist/adapter/analysis/component-tree.d.ts +26 -0
  3. package/dist/adapter/analysis/component-tree.d.ts.map +1 -0
  4. package/dist/adapter/boolean-result.d.ts +84 -0
  5. package/dist/adapter/boolean-result.d.ts.map +1 -0
  6. package/dist/adapter/emit-context.d.ts +106 -0
  7. package/dist/adapter/emit-context.d.ts.map +1 -0
  8. package/dist/adapter/expr/array-method.d.ts +75 -0
  9. package/dist/adapter/expr/array-method.d.ts.map +1 -0
  10. package/dist/adapter/expr/emitters.d.ts +143 -0
  11. package/dist/adapter/expr/emitters.d.ts.map +1 -0
  12. package/dist/adapter/expr/operand.d.ts +25 -0
  13. package/dist/adapter/expr/operand.d.ts.map +1 -0
  14. package/dist/adapter/index.d.ts +6 -0
  15. package/dist/adapter/index.d.ts.map +1 -0
  16. package/dist/adapter/index.js +189097 -0
  17. package/dist/adapter/jinja-adapter.d.ts +394 -0
  18. package/dist/adapter/jinja-adapter.d.ts.map +1 -0
  19. package/dist/adapter/lib/constants.d.ts +21 -0
  20. package/dist/adapter/lib/constants.d.ts.map +1 -0
  21. package/dist/adapter/lib/ir-scope.d.ts +50 -0
  22. package/dist/adapter/lib/ir-scope.d.ts.map +1 -0
  23. package/dist/adapter/lib/jinja-naming.d.ts +77 -0
  24. package/dist/adapter/lib/jinja-naming.d.ts.map +1 -0
  25. package/dist/adapter/lib/types.d.ts +27 -0
  26. package/dist/adapter/lib/types.d.ts.map +1 -0
  27. package/dist/adapter/memo/seed.d.ts +81 -0
  28. package/dist/adapter/memo/seed.d.ts.map +1 -0
  29. package/dist/adapter/props/prop-classes.d.ts +33 -0
  30. package/dist/adapter/props/prop-classes.d.ts.map +1 -0
  31. package/dist/adapter/spread/spread-codegen.d.ts +61 -0
  32. package/dist/adapter/spread/spread-codegen.d.ts.map +1 -0
  33. package/dist/adapter/value/parsed-literal.d.ts +28 -0
  34. package/dist/adapter/value/parsed-literal.d.ts.map +1 -0
  35. package/dist/build.d.ts +28 -0
  36. package/dist/build.d.ts.map +1 -0
  37. package/dist/build.js +189117 -0
  38. package/dist/conformance-pins.d.ts +12 -0
  39. package/dist/conformance-pins.d.ts.map +1 -0
  40. package/dist/index.d.ts +9 -0
  41. package/dist/index.d.ts.map +1 -0
  42. package/dist/index.js +189118 -0
  43. package/package.json +66 -0
  44. package/python/VERSION +1 -0
  45. package/python/barefootjs/__init__.py +57 -0
  46. package/python/barefootjs/backend_jinja.py +125 -0
  47. package/python/barefootjs/evaluator.py +787 -0
  48. package/python/barefootjs/runtime.py +1334 -0
  49. package/python/barefootjs/search_params.py +89 -0
  50. package/python/pyproject.toml +32 -0
  51. package/python/tests/__init__.py +0 -0
  52. package/python/tests/test_eval_vectors.py +88 -0
  53. package/python/tests/test_evaluator.py +406 -0
  54. package/python/tests/test_helper_vectors.py +288 -0
  55. package/python/tests/test_omit.py +62 -0
  56. package/python/tests/test_props_attr.py +54 -0
  57. package/python/tests/test_query.py +41 -0
  58. package/python/tests/test_render.py +102 -0
  59. package/python/tests/test_render_child.py +96 -0
  60. package/python/tests/test_search_params.py +50 -0
  61. package/python/tests/test_spread_attrs.py +86 -0
  62. package/python/tests/test_template_primitives.py +347 -0
  63. package/python/tests/vector-divergences.json +42 -0
  64. package/src/__tests__/jinja-adapter-unit.test.ts +390 -0
  65. package/src/__tests__/jinja-adapter.test.ts +53 -0
  66. package/src/__tests__/jinja-counter.test.ts +62 -0
  67. package/src/__tests__/jinja-query-href.test.ts +99 -0
  68. package/src/__tests__/jinja-spread-attrs.test.ts +225 -0
  69. package/src/adapter/analysis/component-tree.ts +119 -0
  70. package/src/adapter/boolean-result.ts +176 -0
  71. package/src/adapter/emit-context.ts +118 -0
  72. package/src/adapter/expr/array-method.ts +346 -0
  73. package/src/adapter/expr/emitters.ts +608 -0
  74. package/src/adapter/expr/operand.ts +35 -0
  75. package/src/adapter/index.ts +6 -0
  76. package/src/adapter/jinja-adapter.ts +1747 -0
  77. package/src/adapter/lib/constants.ts +33 -0
  78. package/src/adapter/lib/ir-scope.ts +95 -0
  79. package/src/adapter/lib/jinja-naming.ts +114 -0
  80. package/src/adapter/lib/types.ts +30 -0
  81. package/src/adapter/memo/seed.ts +132 -0
  82. package/src/adapter/props/prop-classes.ts +65 -0
  83. package/src/adapter/spread/spread-codegen.ts +166 -0
  84. package/src/adapter/value/parsed-literal.ts +76 -0
  85. package/src/build.ts +37 -0
  86. package/src/conformance-pins.ts +101 -0
  87. package/src/index.ts +9 -0
  88. package/src/test-render.ts +714 -0
@@ -0,0 +1,81 @@
1
+ /**
2
+ * In-template memo / context seeding for the Jinja template adapter.
3
+ *
4
+ * Ported from `packages/adapter-xslate/src/adapter/memo/seed.ts`. Free
5
+ * functions taking a `JinjaMemoContext` (built by the adapter's `memoCtx`
6
+ * getter) so the cluster depends only on the recursive expression entry, not
7
+ * the whole adapter class. These emit the `{% set x = ... %}` statements
8
+ * that let the body's bare `x` resolve to a derived signal/memo value or an
9
+ * active context value at SSR time.
10
+ *
11
+ * One deliberate behavioural IMPROVEMENT over the Kolon port: Kolon's `my`
12
+ * declares a NEW lexical, so `: my $x = … $x …;` reads the not-yet-assigned
13
+ * lexical on its own right-hand side — broken. Xslate therefore skips
14
+ * in-template seeding for a same-name signal/memo (a `refsSelf` guard in its
15
+ * `generateDerivedMemoSeed`). Jinja's `{% set %}` has no such shadowing
16
+ * hazard — `{% set x = x + 1 %}` resolves the right-hand `x` against the
17
+ * value ALREADY bound in the enclosing scope (verified empirically against
18
+ * Jinja 3.1: `env.from_string("{% set x = x + 1 %}{{ x }}").render(x=5)` →
19
+ * `"6"`, not an error or a stale `5`). This adapter therefore seeds a
20
+ * same-name signal/memo too, which is strictly more correct — the seed then
21
+ * re-derives from the already-bound prop instead of leaving the render var
22
+ * on its static (possibly per-callsite-wrong) default. No self-ref guard is
23
+ * ported for this reason.
24
+ */
25
+ import { type ComponentIR, type ContextConsumer } from '@barefootjs/jsx';
26
+ import type { JinjaMemoContext } from '../emit-context.ts';
27
+ /** Jinja literal for a context-consumer's `createContext` default. */
28
+ export declare function contextDefaultJinja(c: ContextConsumer): string;
29
+ /**
30
+ * Emit one `{% set <local> = bf.use_context(...) %}` statement per context
31
+ * consumer so the body's bare `<local>` resolves to the active provider
32
+ * value (or the `createContext` default). (#1297)
33
+ */
34
+ export declare function generateContextConsumerSeed(ir: ComponentIR): string;
35
+ /**
36
+ * Emit `{% set <name> = <jinja> %}` statements for every `derived` step of
37
+ * the backend-neutral SSR seed plan — the scope/availability/ordering
38
+ * analysis lives in `computeSsrSeedPlan` (packages/jsx/src/ssr-seed-plan.ts);
39
+ * this only lowers each step's expression to Jinja and applies the
40
+ * backend-specific emit guards: skip an empty lowering, and skip a lowering
41
+ * that references no top-level identifier at all (a constant init/body —
42
+ * e.g. a `derived` step with empty `frees` — keeps the existing static
43
+ * ssr-defaults seed instead). Unlike the Kolon port there is no self-ref
44
+ * guard — see the file header. `env-reader` and `opaque` steps emit nothing
45
+ * (the runtime supplies the reader, or the adapter's ssr-defaults path
46
+ * already covers it). (#1297, #2075)
47
+ *
48
+ * `convertExpressionToJinja` can still fail DEEPER than the plan's
49
+ * structural `isSupported` pre-check — e.g. a `.filter(predicate)` whose
50
+ * predicate isn't evaluator-serializable has NO lambda fallback on this
51
+ * adapter (divergence 3, `jinja-adapter.ts`'s file header: unlike Kolon/Perl,
52
+ * Jinja has no lambda-expression form), so the lowering records a HARD
53
+ * BF101 as a side effect rather than degrading. That's correct for every
54
+ * OTHER `convertExpressionToJinja` call site (which commit to using the
55
+ * lowered text), but wrong here: this is a SPECULATIVE "recompute the memo
56
+ * in-template, else keep the static ssrDefault seed" attempt, so a deeper
57
+ * refusal must degrade silently, not fail the whole component compile.
58
+ * Snapshot the diagnostic list and roll back any errors appended during each
59
+ * step's attempt before moving on.
60
+ *
61
+ * A second, related Jinja-only gap divergence 3 opens up: a predicate
62
+ * referencing a SIBLING getter (`props.items.filter((p) => !tag() || …)`,
63
+ * `tag` a sibling memo) contains a zero-arg CALL node (`tag()`), which the
64
+ * evaluator's pure-expression surface refuses (`toEvalNode`'s `call` arm
65
+ * only allows a builtin callee, e.g. `Math.floor`) — with no lambda
66
+ * fallback to fall back to, the whole predicate would refuse. Kolon/Perl
67
+ * never hit this: their lambda form closes over the sibling's ALREADY-SEEDED
68
+ * lexical directly, without going through the evaluator at all. Go hits the
69
+ * identical gap (it also has no closures at SSR-constructor time) and fixes
70
+ * it the same way its `memo/memo-compute.ts` (`matchFilterArmMemo`) does:
71
+ * `materializeGetterCalls` rewrites a getter call into a bare identifier
72
+ * BEFORE serialization, so the evaluator captures it as a free-var read from
73
+ * `base_env` instead of an unsupported call node — and that free var then
74
+ * resolves against the sibling's own `{% set %}` line, which (being an
75
+ * EARLIER step per the plan's ordering guarantee) is always already bound.
76
+ * `env-reader` names are excluded from the materializable set — the runtime
77
+ * supplies those via the per-request reader, not a template-var lexical, so
78
+ * a call to one (`searchParams()`) must stay a real call, not a bare var.
79
+ */
80
+ export declare function generateDerivedMemoSeed(ctx: JinjaMemoContext, ir: ComponentIR): string;
81
+ //# sourceMappingURL=seed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../../src/adapter/memo/seed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,eAAe,EAIrB,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAI1D,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,CAM9D;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAWnE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,gBAAgB,EAAE,EAAE,EAAE,WAAW,GAAG,MAAM,CAsBtF"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Prop classification for the Jinja2 template adapter.
3
+ *
4
+ * Ported from `packages/adapter-xslate/src/adapter/props/prop-classes.ts`.
5
+ * Pure functions over `ir.metadata` that derive the per-compile prop/name
6
+ * sets the adapter consults during lowering. No adapter instance state.
7
+ */
8
+ import type { ComponentIR } from '@barefootjs/jsx';
9
+ /**
10
+ * Props whose declared TS type is boolean — a bare binding of one
11
+ * (`data-active={props.isActive}`) must stringify as JS `String(boolean)`
12
+ * ("true"/"false"), not Python's `str(bool)` ("True"/"False") (#1897,
13
+ * pagination's data-active).
14
+ */
15
+ export declare function collectBooleanTypedProps(ir: ComponentIR): Set<string>;
16
+ /**
17
+ * Bare references to optional, no-default, non-primitive props (e.g.
18
+ * textarea's `rows`) are `None` when omitted → guarded with
19
+ * `is defined and is not none` in `emitExpression`. See the
20
+ * `nullableOptionalProps` field docstring in `jinja-adapter.ts`.
21
+ */
22
+ export declare function collectNullableOptionalProps(ir: ComponentIR): Set<string>;
23
+ /**
24
+ * String-typed signals and props. A signal is string-typed when its inferred
25
+ * type is `string` (or, defensively, when its initial value is a bare string
26
+ * literal); a prop when its annotated type is `string`. In the Mojo adapter
27
+ * this drives `eq`/`ne` selection for string equality; neither the Kolon nor
28
+ * the Jinja emitters consume the distinction (both languages' `==`/`!=`
29
+ * compare strings and numbers correctly), so this set is carried for parity
30
+ * with the Perl-family adapters, not because Jinja needs it today.
31
+ */
32
+ export declare function collectStringValueNames(ir: ComponentIR): Set<string>;
33
+ //# sourceMappingURL=prop-classes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-classes.d.ts","sourceRoot":"","sources":["../../../src/adapter/props/prop-classes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGlD;;;;;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;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAWpE"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Object-literal / conditional-spread → Jinja dict lowering for the Jinja
3
+ * template adapter.
4
+ *
5
+ * Ported from `packages/adapter-xslate/src/adapter/spread/spread-codegen.ts`.
6
+ * Free functions taking a `JinjaSpreadContext` (built by the adapter's
7
+ * `spreadCtx` getter) so the cluster depends on the narrow seam — the
8
+ * recursive expression entry plus per-compile bookkeeping — rather than the
9
+ * whole adapter class.
10
+ *
11
+ * The conditional-spread / object-literal entries read the IR-carried
12
+ * structured `ParsedExpr` tree (#2018) instead of re-parsing the source with
13
+ * `ts.createSourceFile`. The condition and scalar values are threaded
14
+ * straight into `ctx.convertExpressionToJinja` as its `preParsed` argument,
15
+ * so no stringify→re-parse round-trip occurs. The `ts.factory` rebuild in
16
+ * `recordIndexAccessToJinja` only reconstructs the `IDENT[KEY]` node the
17
+ * shared `parseRecordIndexAccess` parser accepts; no source-text re-parse.
18
+ */
19
+ import type { ParsedExpr } from '@barefootjs/jsx';
20
+ import type { JinjaSpreadContext } from '../emit-context.ts';
21
+ /**
22
+ * Lower a conditional inline-object spread
23
+ * `COND ? { 'aria-describedby': describedBy } : {}`
24
+ * to a Jinja inline ternary of dicts
25
+ * `({'aria-describedby': describedBy} if bf.truthy(describedBy) else {})`.
26
+ * Reads the IR-carried structured `ParsedExpr` tree; both branches must be
27
+ * object literals; the condition + values route through
28
+ * `convertExpressionToJinja`. Returns `null` for any other shape so the
29
+ * caller falls back to its normal lowering.
30
+ */
31
+ export declare function conditionalSpreadToJinja(ctx: JinjaSpreadContext, expr: ParsedExpr | undefined): string | null;
32
+ /**
33
+ * (#1971) Lower a bare object-literal expression (`{ align: 'start' }`),
34
+ * carried as the IR's structured `ParsedExpr` tree, to a Jinja dict via
35
+ * `objectLiteralToJinjaDict`, or null when it isn't a plain object literal.
36
+ * Used for inline object-literal child props (carousel `opts`).
37
+ */
38
+ export declare function objectLiteralExprToJinjaDict(ctx: JinjaSpreadContext, expr: ParsedExpr | undefined): string | null;
39
+ /**
40
+ * Convert a static object literal into a Jinja dict string for a
41
+ * conditional spread. Only static string/identifier keys are allowed; values
42
+ * resolve via `convertExpressionToJinja` (or the `Record[propKey]` index
43
+ * lowering). Returns `null` for any computed/spread/dynamic key. Empty
44
+ * object → `{}`.
45
+ */
46
+ export declare function objectLiteralToJinjaDict(ctx: JinjaSpreadContext, obj: Extract<ParsedExpr, {
47
+ kind: 'object-literal';
48
+ }>): string | null;
49
+ /**
50
+ * Lower a spread-object VALUE of the form `IDENT[KEY]` (CheckIcon's
51
+ * `sizeMap[size]`) to an inline indexed Jinja dict
52
+ * `{'sm': 16, 'md': 20, ...}[size]`.
53
+ * Reuses the shared structural parse (`parseRecordIndexAccess`) — rebuilding
54
+ * the `IDENT[KEY]` node from the carried tree via `ts.factory` rather than
55
+ * re-parsing source text; this wrapper only does the single-quote escaping +
56
+ * bracket-index emit. Jinja indexes a dict literal with the SAME bracket
57
+ * syntax `{…}[key]` a JS object index would use — no Kolon-style divergence
58
+ * to steer around here.
59
+ */
60
+ export declare function recordIndexAccessToJinja(ctx: JinjaSpreadContext, val: ParsedExpr): string | null;
61
+ //# sourceMappingURL=spread-codegen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spread-codegen.d.ts","sourceRoot":"","sources":["../../../src/adapter/spread/spread-codegen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAG5D;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,kBAAkB,EACvB,IAAI,EAAE,UAAU,GAAG,SAAS,GAC3B,MAAM,GAAG,IAAI,CAcf;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,kBAAkB,EACvB,IAAI,EAAE,UAAU,GAAG,SAAS,GAC3B,MAAM,GAAG,IAAI,CAGf;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,kBAAkB,EACvB,GAAG,EAAE,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,gBAAgB,CAAA;CAAE,CAAC,GACnD,MAAM,GAAG,IAAI,CA0Cf;AAUD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,kBAAkB,EAAE,GAAG,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAuBhG"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * String-literal value lowering for the Jinja2 template adapter.
3
+ *
4
+ * Ported from `packages/adapter-xslate/src/adapter/value/parsed-literal.ts`.
5
+ * Pure functions over const-initializer source text and analyzer type info —
6
+ * no adapter instance state. Byte-identical logic to the Xslate copy (the
7
+ * source-text parsing here is language-agnostic; only the caller's escaping
8
+ * of the resolved value into a template literal differs, and that happens at
9
+ * the call site in `jinja-adapter.ts`, not here).
10
+ */
11
+ import { type TypeInfo } from '@barefootjs/jsx';
12
+ /**
13
+ * Parse a const initializer's source text. Returns the unescaped string value
14
+ * when the whole initializer is a single pure string literal — single/double
15
+ * quoted, or a no-substitution backtick template (no `${}`) — else `null`.
16
+ * Only such a value can be inlined byte-for-byte; template literals with
17
+ * interpolation, numbers, objects, and `Record<T,string>` maps are excluded.
18
+ */
19
+ export declare function parsePureStringLiteral(source: string): string | null;
20
+ /** Whether `s` contains an unescaped occurrence of `ch`. */
21
+ export declare function containsUnescaped(s: string, ch: string): boolean;
22
+ /** Unescape a JS string-literal body's common escape sequences. */
23
+ export declare function unescapeStringLiteralBody(s: string): string;
24
+ /** True when `type` is the `string` primitive. */
25
+ export declare function isStringTypeInfo(type: TypeInfo | undefined): boolean;
26
+ /** True when `initialValue` is a bare string-literal expression. */
27
+ export declare function isBareStringLiteral(initialValue: string | undefined): boolean;
28
+ //# sourceMappingURL=parsed-literal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsed-literal.d.ts","sourceRoot":"","sources":["../../../src/adapter/value/parsed-literal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAEpE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAqBpE;AAED,4DAA4D;AAC5D,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAMhE;AAED,mEAAmE;AACnE,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAU3D;AAED,kDAAkD;AAClD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,CAEpE;AAED,oEAAoE;AACpE,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAI7E"}
@@ -0,0 +1,28 @@
1
+ import type { BuildOptions } from '@barefootjs/jsx';
2
+ import { JinjaAdapter } from './adapter/index.ts';
3
+ import type { JinjaAdapterOptions } from './adapter/index.ts';
4
+ export interface JinjaBuildOptions extends BuildOptions {
5
+ /** Adapter-specific options passed to JinjaAdapter */
6
+ adapterOptions?: JinjaAdapterOptions;
7
+ }
8
+ /**
9
+ * Create a BarefootBuildConfig for Jinja2 template projects.
10
+ *
11
+ * Uses structural typing — does not import BarefootBuildConfig to avoid a
12
+ * circular dependency between @barefootjs/jinja and @barefootjs/cli.
13
+ */
14
+ export declare function createConfig(options?: JinjaBuildOptions): {
15
+ adapter: JinjaAdapter;
16
+ paths: import("@barefootjs/jsx").BarefootPaths | undefined;
17
+ components: string[] | undefined;
18
+ outDir: string | undefined;
19
+ minify: boolean | undefined;
20
+ contentHash: boolean | undefined;
21
+ externals: Record<string, import("@barefootjs/jsx").ExternalSpec> | undefined;
22
+ externalsBasePath: string | undefined;
23
+ bundleEntries: import("@barefootjs/jsx").BundleEntry[] | undefined;
24
+ localImportPrefixes: string[] | undefined;
25
+ outputLayout: import("@barefootjs/jsx").OutputLayout;
26
+ postBuild: ((ctx: import("@barefootjs/jsx").PostBuildContext) => Promise<void> | void) | undefined;
27
+ };
28
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAE7D,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,sDAAsD;IACtD,cAAc,CAAC,EAAE,mBAAmB,CAAA;CACrC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,iBAAsB;IAExD,OAAO;IACP,KAAK;IACL,UAAU;IACV,MAAM;IACN,MAAM;IACN,WAAW;IACX,SAAS;IACT,iBAAiB;IACjB,aAAa;IACb,mBAAmB;IACnB,YAAY;IAKZ,SAAS;EAEZ"}