@jay-framework/jay-stack-cli 0.24.6 → 0.25.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 (26) hide show
  1. package/agent-kit-template/INSTRUCTIONS.md +24 -1
  2. package/agent-kit-template/contracts/GUIDE.md +1 -1
  3. package/agent-kit-template/contracts/component-contracts.md +42 -12
  4. package/agent-kit-template/designer/INSTRUCTIONS.md +23 -20
  5. package/agent-kit-template/designer/cli-commands.md +46 -0
  6. package/agent-kit-template/designer/contracts-and-plugins.md +30 -1
  7. package/agent-kit-template/designer/design-system-guide.md +547 -0
  8. package/agent-kit-template/designer/jay-html-components.md +101 -31
  9. package/agent-kit-template/designer/jay-html-styling.md +70 -0
  10. package/agent-kit-template/designer/jay-html-syntax.md +22 -13
  11. package/agent-kit-template/designer/jay-html-template-syntax.md +3 -3
  12. package/agent-kit-template/designer/project-structure.md +1 -1
  13. package/agent-kit-template/designer/routing.md +2 -2
  14. package/agent-kit-template/designer/validation-guide.md +65 -6
  15. package/agent-kit-template/developer/INSTRUCTIONS.md +24 -19
  16. package/agent-kit-template/developer/page-components.md +23 -2
  17. package/agent-kit-template/developer/project-structure.md +1 -1
  18. package/agent-kit-template/developer/routing.md +1 -1
  19. package/agent-kit-template/devops/production-build.md +1 -1
  20. package/agent-kit-template/plugin/INSTRUCTIONS.md +3 -1
  21. package/agent-kit-template/plugin/component-structure.md +1 -1
  22. package/agent-kit-template/plugin/contracts-guide.md +18 -0
  23. package/agent-kit-template/plugin/design-system-guide.md +173 -0
  24. package/dist/{index-B9vCxAZ1.js → index-l6QVpvnY.js} +19 -14
  25. package/dist/index.js +2016 -212
  26. package/package.json +13 -12
@@ -6,9 +6,9 @@ A page component (`page.ts`) uses `makeJayStackComponent` to provide page-level
6
6
 
7
7
  ```typescript
8
8
  import { makeJayStackComponent, phaseOutput } from '@jay-framework/fullstack-component';
9
- import type { HomePageContract } from './page.jay-contract.generated';
9
+ import type { PageContract } from './page.jay-contract';
10
10
 
11
- export const page = makeJayStackComponent<HomePageContract>()
11
+ export const page = makeJayStackComponent<PageContract>()
12
12
  .withSlowlyRender(async () => {
13
13
  return phaseOutput({ heroTitle: 'Welcome', heroSubtitle: 'Build something great' }, {});
14
14
  })
@@ -19,6 +19,27 @@ export const page = makeJayStackComponent<HomePageContract>()
19
19
 
20
20
  The export name must be `page` for page-level components.
21
21
 
22
+ ## Where to import page types from
23
+
24
+ Both `page.jay-contract.d.ts` and `page.jay-html.d.ts` are generated next to your page (on `dev`/`build`).
25
+ They cover **different surfaces** — import from the right one:
26
+
27
+ - **Data types and runtime enum/variant _values_** (`PageContract`, `PageViewState`, `PageSlowViewState`,
28
+ `PageFastViewState`, `PageRefs`, and any `enum` your contract declares) → import from **`./page.jay-contract`**.
29
+ This mirrors how a component's `.ts` imports from its own `./X.jay-contract`. A runtime enum value
30
+ (e.g. `Status.warning`) **must** come from here — importing it from `./page.jay-html` pulls the browser element
31
+ module into server-side SSR and fails.
32
+ - **Composed refs that come from the template** — child-component refs, and DL#198 free refs like
33
+ `refs.card.dismiss` — live only in `page.jay-html.d.ts`. Import them **type-only** from **`./page.jay-html`**
34
+ (type-only so nothing is loaded at runtime):
35
+
36
+ ```typescript
37
+ import type { PageElementRefs } from './page.jay-html';
38
+ ```
39
+
40
+ Rule of thumb: **data → `./page.jay-contract`; template/composed refs → `./page.jay-html` (type-only)**.
41
+ Do not import runtime values from `./page.jay-html`, and there is no `.generated` suffix.
42
+
22
43
  ## Page Component with Params
23
44
 
24
45
  For dynamic routes, use `withLoadParams` and access params via props:
@@ -14,7 +14,7 @@ my-project/
14
14
  │ ├── project.conf.yaml # Project metadata (name, etc.)
15
15
  │ └── <plugin-name>.yaml # Plugin-specific config files
16
16
  ├── src/
17
- │ ├── components/ # Headfull full-stack components (shared across pages)
17
+ │ ├── components/ # Shared full-stack components, headless (shared across pages)
18
18
  │ │ └── site-header/
19
19
  │ │ ├── site-header.ts
20
20
  │ │ ├── site-header.jay-html
@@ -124,7 +124,7 @@ tags:
124
124
 
125
125
  ## Dynamic Routes and Contract Params
126
126
 
127
- When a component on the page — whether the page contract, a headless component, or a headfull full-stack component — declares `params`, the page should be placed in a dynamic route directory that provides those params.
127
+ When a component on the page — whether the page contract, a plugin headless component, or a shared full-stack component — declares `params`, the page should be placed in a dynamic route directory that provides those params.
128
128
 
129
129
  For example, if a headless component's contract declares:
130
130
 
@@ -72,7 +72,7 @@ The build is **environment-agnostic**. The same output serves any deployment mod
72
72
 
73
73
  For production builds to work correctly:
74
74
 
75
- - **Headfull FS components** must be in `src/components/` (not inside page directories)
75
+ - **Full-stack components** (headless) must be in `src/components/` (not inside page directories)
76
76
  - **Headless plugins** must be in `src/plugins/`
77
77
  - **Actions** must be in `src/actions/` with `*.actions.ts` naming
78
78
  - **Init** must be at `src/init.ts`
@@ -4,7 +4,7 @@ This folder contains guides for creating jay-stack plugins: contracts, headless
4
4
 
5
5
  ## What is a Jay Plugin?
6
6
 
7
- A plugin provides headless components (data + interactions, no UI) that project designers use via contracts. Plugins can also provide complete pages (backoffice tools, admin dashboards) via routes. Plugins can be standalone npm packages or inline within a project (see `examples/jay-stack/fake-shop`).
7
+ A plugin provides headless components (data + interactions, no UI) that project designers use via contracts. Plugins can also provide complete pages (backoffice tools, admin dashboards) via routes. **Prefer shipping your components as design-system elements** — a component that also ships one or more `.jay-html` templates designers flatten into their pages and upgrade via `jay-stack sync` (see [design-system-guide.md](design-system-guide.md)). Shipping a template gives consumers consistent, upgradable UI out of the box instead of hand-authoring every region; ship a bare contract (no template) only when the component truly has no default markup. Plugins can be standalone npm packages or inline within a project (see `examples/jay-stack/fake-shop`).
8
8
 
9
9
  ## Workflow
10
10
 
@@ -40,6 +40,7 @@ The plugin participates in four CLI commands, each running different hooks:
40
40
  | [contracts-guide.md](contracts-guide.md) | Plugin-specific contract concerns |
41
41
  | [plugin-structure.md](plugin-structure.md) | plugin.yaml, package layout, exports |
42
42
  | [component-structure.md](component-structure.md) | makeJayStackComponent, builder API, three-phase rendering |
43
+ | [design-system-guide.md](design-system-guide.md) | Shipping a template designers flatten; upgrades via `jay-stack sync` |
43
44
  | [component-state.md](component-state.md) | createSignal, createMemo, createEffect, createDerivedArray, createEvent |
44
45
  | [component-refs.md](component-refs.md) | Refs, collection refs, element types |
45
46
  | [component-data.md](component-data.md) | Immutable data, JSON Patch, createPatchableSignal |
@@ -61,6 +62,7 @@ The plugin participates in four CLI commands, each running different hooks:
61
62
  ## Key Principles
62
63
 
63
64
  - **Contract is the source of truth** — define it before implementing the component
65
+ - **Ship a design system** — give each component one or more `.jay-html` templates so consumers flatten and upgrade via `jay-stack sync`, rather than hand-authoring UI
64
66
  - **Data is immutable** — never mutate ViewState directly, use JSON Patch
65
67
  - **Phase-aware** — choose the right rendering phase for each piece of data
66
68
  - **Props for configuration, params for URLs** — props are passed by parent components, params come from route segments
@@ -6,7 +6,7 @@ Full-stack components use `makeJayStackComponent` with a fluent builder API and
6
6
 
7
7
  ```typescript
8
8
  import { makeJayStackComponent, phaseOutput } from '@jay-framework/fullstack-component';
9
- import type { MyContract } from './my-contract.generated';
9
+ import type { MyContract } from './my-contract.jay-contract';
10
10
 
11
11
  export const myComponent = makeJayStackComponent<MyContract>()
12
12
  .withSlowlyRender(async (props) => {
@@ -173,12 +173,30 @@ props:
173
173
  - name: productId
174
174
  type: string
175
175
  required: true
176
+ phase: fast # slow (default), fast, or fast+interactive
176
177
  description: The product to display
177
178
  - name: showPricing
178
179
  type: boolean
179
180
  default: 'true'
180
181
  ```
181
182
 
183
+ #### Prop phases — declare the phase you consume the prop
184
+
185
+ A prop has a `phase` just like a tag, and it declares **when your component reads that prop**. The binding at the usage site must have a source phase ≤ the prop's phase (validated at build; see [validation.md](validation.md)).
186
+
187
+ | Prop phase | Resolved at | At `slow` it is… | Read it in | At interactive it is… |
188
+ | ------------------ | ----------------- | ------------------ | ----------------------------------------------- | ---------------------------------- |
189
+ | `slow` (default) | build | present | `slowlyRender`, `fastRender`, `withInteractive` | a signal `() => T`, constant value |
190
+ | `fast` | request | `undefined` / `''` | `fastRender`, `withInteractive` | a signal `() => T`, constant value |
191
+ | `fast+interactive` | request (initial) | `undefined` / `''` | `fastRender`, `withInteractive` | a **reactive** signal `() => T` |
192
+
193
+ Two rules to internalize:
194
+
195
+ - **A `fast` / `fast+interactive` prop is `undefined` (or `''` for a string binding) during `slow`.** Never read such a prop in `slowlyRender` — declare the prop at the phase where you actually consume it (the same phase your render function runs at). `markdown-content` reads `props.markdown` at slow → `slow`; `markdown-live` reads it at fast and as a signal at interactive → `fast+interactive`.
196
+ - **At the interactive phase every prop arrives as a signal (`() => T`)** — the same shape for all phases, reactive only for `fast+interactive`. Type interactive props as `() => T` in the `.ts` (matching client-only Jay), regardless of phase.
197
+
198
+ The prop type stays a single in-code declaration (`.withProps<T>()`) — the framework does not generate per-phase prop types. It is the author's job (backed by validation) not to read a `fast` prop at slow.
199
+
182
200
  ### Params — URL route segments
183
201
 
184
202
  Params come from dynamic route segments (`[slug]`, `[[lang]]`, `[...path]`). Use for page-level routing data.
@@ -0,0 +1,173 @@
1
+ # Shipping a Design-System Element
2
+
3
+ A classic plugin component is **headless**: it ships a contract (and usually code) and provides _no UI_ —
4
+ the project designer writes the template. A **design-system element** is the opposite end of the same
5
+ mechanism: your plugin also ships a **template** (`.jay-html`), and the designer _flattens_ (copies) it into
6
+ their page rather than authoring the markup from scratch. The designer then owns the copy and tweaks it;
7
+ when you release a new version of the template, they pull your changes with `jay-stack sync`.
8
+
9
+ Use this when your component has an opinionated look you want to _provide_ (a pricing card, a product tile,
10
+ a callout) while still letting each project edit individual instances.
11
+
12
+ ## What you ship
13
+
14
+ A design-system element ships three things — the template is what makes it a design-system element:
15
+
16
+ | File | Required? | Purpose |
17
+ | --------------- | --------- | ---------------------------------------------------------------------- |
18
+ | `.jay-contract` | Yes\* | Data shape, props, refs — the source of truth (as for any component) |
19
+ | `.ts` | Optional | Logic (`makeJayStackComponent`). Omit for a pure-markup element |
20
+ | `.jay-html` | **Yes** | The template the designer flattens — its `<body>` markup and `<style>` |
21
+
22
+ > **You ship a template, not a running UI.** The `.jay-html` is a _source to copy from_, not a live
23
+ > component that renders itself at the usage site. The designer's flattened copy is what compiles and
24
+ > renders. This is why upgrades flow through `sync` (below) rather than automatically — the project owns
25
+ > its copy.
26
+
27
+ > \* **The contract can be empty for a pure presentational element.** It must exist (it names the element
28
+ > and is what the consumer's `contract=` import resolves), but if the element binds no data and ships no
29
+ > `.ts`, the contract needs nothing but a name — `name: HeroBanner` plus `tags: []`.
30
+
31
+ ### The template file
32
+
33
+ An ordinary `.jay-html`: a `<head>` declaring the contract, a `<body>` with the markup, and an optional
34
+ `<style>`. Bind `{…}` against your own contract tags/props.
35
+
36
+ ```html
37
+ <!-- pricing-card/pricing-card.jay-html -->
38
+ <html>
39
+ <head>
40
+ <script type="application/jay-data" contract="./pricing-card.jay-contract"></script>
41
+ </head>
42
+ <body>
43
+ <div class="pricing-card">
44
+ <h3 class="plan">{planName}</h3>
45
+ <p class="price">{price}</p>
46
+ <button class="cta">{ctaLabel}</button>
47
+ </div>
48
+ </body>
49
+ <style>
50
+ .plan {
51
+ font-weight: 600;
52
+ }
53
+ .cta {
54
+ background: var(--brand, #2b6cb0);
55
+ }
56
+ </style>
57
+ </html>
58
+ ```
59
+
60
+ The component's CSS is copied alongside the markup and `@scope`-wrapped by the region's `ref` at the usage
61
+ site, so it never leaks into the project's other selectors.
62
+
63
+ ## How the designer consumes it
64
+
65
+ The designer imports the component with a `template=` provenance marker pointing at your shipped `.jay-html`,
66
+ places the region, and runs `jay-stack sync` to flatten it:
67
+
68
+ ```html
69
+ <script
70
+ type="application/jay-headless"
71
+ plugin="my-plugin"
72
+ contract="pricing-card"
73
+ template="./node_modules/@my-org/my-plugin/lib/components/pricing-card/pricing-card.jay-html"
74
+ ></script>
75
+ ```
76
+
77
+ ```html
78
+ <jay:pricing-card ref="pro" planName="Pro">…flattened copy, edited freely…</jay:pricing-card>
79
+ ```
80
+
81
+ They edit the copy, marking any facet they want to keep with `override` (see the designer guide,
82
+ `designer/design-system-guide.md`). `jay-stack validate` reports unmarked edits as drift.
83
+
84
+ ## Upgrades flow through `sync`
85
+
86
+ Because the designer owns a _copy_, a change you ship in the template does **not** reach their page
87
+ automatically. To pull your update, the designer runs:
88
+
89
+ ```bash
90
+ jay-stack sync
91
+ ```
92
+
93
+ Sync re-flattens every region from the current source template, **preserving the facets the project marked
94
+ `override`** and overwriting the rest. It is a deterministic overwrite-with-holes — no merge base, no
95
+ conflict resolution — so an upgrade can never silently mis-merge project edits with your changes.
96
+
97
+ ### Design your template for clean upgrades
98
+
99
+ - **Keep structural churn low between versions.** Sync preserves a marked facet by matching nodes
100
+ positionally; large structural rewrites force the project to re-mark and re-review. Prefer additive,
101
+ localized changes.
102
+ - **Name meaningful hooks with `class`.** Projects override at the facet level (`class`, a style property,
103
+ `children`). Stable class names make their `override` marks survive your edits.
104
+ - **Version your template with your package.** The template ships from your package path; a project's
105
+ `jay-stack sync` reads whatever version is installed, so a normal dependency bump + `sync` is the whole
106
+ upgrade path.
107
+ - **Document the intended override points** in the contract `description` — tell projects which parts are
108
+ meant to be customized versus left to reconcile.
109
+
110
+ ## Declaring content slots — `jay-content`
111
+
112
+ `override` is the designer's tool, applied **per page, per instance**, to keep an edit you did not
113
+ anticipate. `jay-content` is **your** tool: put it on a template node to declare up front "this is the
114
+ consumer's to fill." Edits to a marked facet are then expected by design — `validate` never reports them as
115
+ drift, and `sync` keeps the consumer's version — **without** the designer marking anything. It is the
116
+ source-of-truth way to say "fill this in" for the parts of your template that are meant to vary.
117
+
118
+ It lives on the **source template only**. It is never copied onto the flattened page (sync strips it), so it
119
+ is stated **once** and is resilient to your future template edits: as long as the marker stays, consumer
120
+ content stays silent; remove it and that node falls back to the normal override model.
121
+
122
+ **It is optional, not required.** Unlike slot syntax in other frameworks, you do not have to annotate every
123
+ variable node — an unmarked spot still works, it just surfaces as drift until the consumer marks `override`
124
+ or runs `sync`. Add `jay-content` only where it earns its keep: a node genuinely meant to vary, where you'd
125
+ rather spare every consumer from repeating the same `override`.
126
+
127
+ ### Options (same facet-list grammar as `override`)
128
+
129
+ | You declare consumer-owned… | Write | Typical use |
130
+ | -------------------------------- | ---------------------------- | ------------------------------------------------ |
131
+ | the children (text/markup) | `jay-content` (bare) | a body copy / heading slot — **the default** |
132
+ | specific attributes | `jay-content="src alt"` | a media `<img>` the consumer supplies |
133
+ | one inline-style declaration | `jay-content="style.color"` | a themeable color the consumer sets |
134
+ | children **and** some attributes | `jay-content="children src"` | a figure whose image and caption are both theirs |
135
+ | the whole node | `jay-content="*"` | an entirely consumer-authored region |
136
+
137
+ Facets are space- or comma-separated (`jay-content="src, alt"`). The grammar is identical to `override`
138
+ with **one** difference: a **bare** `jay-content` means **children** (the common text slot), whereas a bare
139
+ `override` means the whole node. Use `*` when you really mean the whole node.
140
+
141
+ ```html
142
+ <!-- card.jay-html (your template) -->
143
+ <div class="ds-card">
144
+ <h3 class="ds-card__heading">{heading}</h3>
145
+ <p class="ds-card__body" jay-content>{body}</p>
146
+ <img class="ds-card__media" jay-content="src alt" src="placeholder.png" alt="" />
147
+ </div>
148
+ ```
149
+
150
+ The consumer flattens this and edits the `<p>` text and the `<img>` `src`/`alt` with no `override` marks;
151
+ `validate` stays clean and `sync` preserves their copy. The `class` on each node is **not** a slot, so it
152
+ still reconciles with your source on every upgrade.
153
+
154
+ ### `jay-content` vs. `override` — which to reach for
155
+
156
+ - **You (template author)** declare the parts meant to vary with `jay-content`, once, on the source. This
157
+ is the preferred path for intended variation — it needs no per-page marks and survives your edits.
158
+ - **The designer** uses `override` on their page for an edit you did **not** declare a slot for (an
159
+ unanticipated tweak they want to keep through `sync`). Prefer giving them a `jay-content` slot over
160
+ leaving them to `override` the same spot on every instance.
161
+
162
+ ## Design-system element vs. headless component
163
+
164
+ | | Headless component | Design-system element |
165
+ | ----------------------------- | ------------------------------- | ------------------------------------ |
166
+ | Ships a `.jay-html` template? | No | **Yes** |
167
+ | Who writes the markup? | The project designer | You (project copies & edits it) |
168
+ | Import marker | `contract=` (+ optional `key=`) | `contract=` **and** `template=` |
169
+ | Upgrades | Automatic (code is imported) | Via `jay-stack sync` (copy is owned) |
170
+ | Drift-checked / synced | No | Yes |
171
+
172
+ Both can be server-only or interactive, and both use the same `.jay-contract`. The only additional thing a
173
+ design-system element ships is the template — and the only additional thing the project runs is `sync`.
@@ -6,8 +6,8 @@ import { getLogger } from "@jay-framework/logger";
6
6
  import path__default from "node:path";
7
7
  import fs from "node:fs/promises";
8
8
  import { createRequire } from "node:module";
9
- import { runLoadParams, scanPlugins, DevSlowlyChangingPhase, slowRenderInstances } from "@jay-framework/stack-server-runtime";
10
- import { parseJayFile, JAY_IMPORT_RESOLVER, injectHeadfullFSTemplates, assignCoordinatesToJayHtml, discoverHeadlessInstances, generateElementHydrateFile, generateServerElementFile } from "@jay-framework/compiler-jay-html";
9
+ import { runLoadParams, scanPlugins, makePassthroughInstanceComponent, DevSlowlyChangingPhase, slowRenderInstances } from "@jay-framework/stack-server-runtime";
10
+ import { parseJayFile, JAY_IMPORT_RESOLVER, assignCoordinatesToJayHtml, discoverHeadlessInstances, generateElementHydrateFile, generateServerElementFile } from "@jay-framework/compiler-jay-html";
11
11
  import { normalizeActionEntry, checkValidationErrors, RuntimeMode } from "@jay-framework/compiler-shared";
12
12
  import crypto, { createHash } from "node:crypto";
13
13
  import * as productionServer from "@jay-framework/production-server";
@@ -276,7 +276,12 @@ async function loadProductionPageParts(route, pageModule, jayHtmlContent, projec
276
276
  }
277
277
  let headlessCompDef;
278
278
  if (headlessImport.structural) {
279
- continue;
279
+ headlessCompDef = makePassthroughInstanceComponent(
280
+ (headlessImport.contract?.tags ?? []).map((t) => ({
281
+ name: t.tag,
282
+ phase: t.phase
283
+ }))
284
+ );
280
285
  } else {
281
286
  const resolvedModulePath = isLocalModule ? modulePath : require$1.resolve(module, { paths: [dirName] });
282
287
  const headlessModule = await import(resolvedModulePath);
@@ -323,7 +328,13 @@ async function loadProductionPageParts(route, pageModule, jayHtmlContent, projec
323
328
  isLocal: isLocalModule,
324
329
  contractName: headlessImport.contractName,
325
330
  propNames: headlessImport.contract.props?.map((p) => p.name) ?? [],
326
- structural: headlessImport.structural
331
+ structural: headlessImport.structural,
332
+ ...headlessImport.structural ? {
333
+ structuralTags: (headlessImport.contract.tags ?? []).map((t) => ({
334
+ name: t.tag,
335
+ phase: t.phase
336
+ }))
337
+ } : {}
327
338
  });
328
339
  }
329
340
  }
@@ -332,11 +343,7 @@ async function loadProductionPageParts(route, pageModule, jayHtmlContent, projec
332
343
  contract: hi.contract,
333
344
  contractPath: hi.contractPath
334
345
  }));
335
- const jayHtmlForDiscovery = injectHeadfullFSTemplates(
336
- jayHtmlContent,
337
- dirName,
338
- JAY_IMPORT_RESOLVER
339
- );
346
+ const jayHtmlForDiscovery = jayHtmlContent;
340
347
  let discoveredInstances = [];
341
348
  let forEachInstances = [];
342
349
  if (headlessInstanceComponents.length > 0) {
@@ -388,7 +395,7 @@ function buildPagePartsConfig(pageParts, pageServerModule, pageExportName, build
388
395
  source: info.isLocal ? "local" : "npm",
389
396
  contractName: info.contractName,
390
397
  propNames: info.propNames ?? [],
391
- ...info.structural ? { structural: true } : {}
398
+ ...info.structural ? { structural: true, structuralTags: info.structuralTags ?? [] } : {}
392
399
  });
393
400
  }
394
401
  }
@@ -763,8 +770,7 @@ async function compileRouteServerElement(jayHtmlPath, outputPath, projectRoot, t
763
770
  const jayHtmlContent = await fs.readFile(jayHtmlPath, "utf-8");
764
771
  const sourceDir = path__default.dirname(jayHtmlPath);
765
772
  const outputDir = path__default.dirname(outputPath);
766
- let jayHtml = injectHeadfullFSTemplates(jayHtmlContent, sourceDir, JAY_IMPORT_RESOLVER);
767
- jayHtml = resolveJayHtmlPaths(jayHtml, sourceDir, outputDir);
773
+ const jayHtml = resolveJayHtmlPaths(jayHtmlContent, sourceDir, outputDir);
768
774
  return compileServerElement(
769
775
  jayHtml,
770
776
  path__default.basename(jayHtmlPath),
@@ -779,8 +785,7 @@ async function compileRouteServerElement(jayHtmlPath, outputPath, projectRoot, t
779
785
  async function compileRouteHydrateScript(jayHtmlPath, outputDir, projectRoot, tsConfigFilePath, minify = true) {
780
786
  const jayHtmlContent = await fs.readFile(jayHtmlPath, "utf-8");
781
787
  const sourceDir = path__default.dirname(jayHtmlPath);
782
- let jayHtml = injectHeadfullFSTemplates(jayHtmlContent, sourceDir, JAY_IMPORT_RESOLVER);
783
- jayHtml = resolveJayHtmlPaths(jayHtml, sourceDir, outputDir);
788
+ const jayHtml = resolveJayHtmlPaths(jayHtmlContent, sourceDir, outputDir);
784
789
  const jayFile = await parseJayFile(
785
790
  jayHtml,
786
791
  path__default.basename(jayHtmlPath),