@wcstack/lint 4.31.0 → 4.33.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.
package/README.ja.md CHANGED
@@ -94,7 +94,7 @@ nothing to check: index.html — no data-wcs binding, <wcs-*> tag or wcstack scr
94
94
  }
95
95
  ```
96
96
 
97
- - **発見**: HTML ファイルから上へ辿って最も近い `wcstack.manifest.json` が自動で使われます — コマンドラインに渡す必要はありません。`application` artifact を含む `*.manifest.json` を引数に渡した場合は、その実行全体で発見を置き換えます。VS Code 拡張も同じファイルを発見するので IDE と CLI の結果は一致します。
97
+ - **発見**: HTML ファイルから上へ辿って最も近い `wcstack.manifest.json` が自動で使われます — コマンドラインに渡す必要はありません。`application` artifact を含む `*.manifest.json` を引数に渡した場合は、その実行全体で発見を置き換えます。そのうち 2 つが両方 `stateSchema` を宣言すると `wcs/manifest-state-collision`(error)で、どちらも使われません —— ただし 4.32 から、それぞれが違う state のファイル(`stateSource`、下)を名指すときは衝突せず、各ページには、ルートの `<wcs-state src>` が読むファイルの schema が当たります。生成した schema を持つアプリ 2 つを 1 回の実行で検査できます。VS Code 拡張も同じファイルを発見するので IDE と CLI の結果は一致します。
98
98
  - **schema を当てるページ**(4.26 から): schema を作った state のファイルを記した manifest — `wcstack.application.stateSource`、manifest からの相対で、`wcs-schema emit` が書きます — は、そのファイルを root の `<wcs-state src>` で読むページだけの契約です(同じパスの `.js` と `.ts`、`.mjs` と `.mts` は同じファイル)。state がインラインのページや別のファイルのページは、発見した manifest でも引数に渡した manifest でも、manifest が無いものとして検査します。4.25 までは、アプリの schema をその下のすべてのページに当てていたので、アプリの隣で自前のインラインの state を持つページの正しいパスが `wcs/path-nonexistent` の error になっていました。`stateSource` の無い manifest(手書き・それより前の `wcs-schema` が作ったもの)は、これまでどおりすべてのページに当てます。
99
99
  - **効果**: `stateSchema` を宣言すると、schema 上に確定的に存在しないバインドパスは `wcs/path-nonexistent`(**error**・exit `1`)、`for:` に非配列は `wcs/path-type-mismatch`(**error**)になります。schema が開いたままの箇所(素の `{}`)は schema が無いときと同じに検査し(4.31 から。以前は沈黙した)、インラインスクリプトのメソッド / getter / `$listKeys` は引き続き存在扱いです。`stateSchema` が無ければ従来どおりです。
100
100
  - **契約が要るとき**: validator が全体を読めない state は、契約が無いとパスをまったく検査できません。よくあるのはトップレベルの spread です — `export default { ...defaults(), get total() { … } }` は静的には見えないキーを持ち込むので、その state のパスは検査しません。4.4 から、spread の上で 1 回だけそう言います(`wcs/path-dynamic-unknown`、info)。`stateSchema` があれば束縛を —— 4.4 から getter の中で読むパス(`wcs/read-path-missing`)も —— それで検査します。読めない `<wcs-state src>` — / から始まるパス・URL・無いファイル — の state も検査できません。4.7 から、それを属性の上で 1 回だけ言います(`wcs/state-src-unread`、info)。4.6 までは何も言いませんでした。`src` はページからの相対パスで読むので、ファイルはサーバーと同じ並びに置き、/ から始まるパスには 4.10 から `--root=<dir>` を渡してください。
@@ -223,6 +223,19 @@ nothing to check: index.html — no data-wcs binding, <wcs-*> tag or wcstack scr
223
223
 
224
224
  新しい warning は `--strict` で落ち、新しい error は `--errors-only` でも出ます。
225
225
 
226
+ ## ストリームと呼び出し表示のページに言うこと
227
+
228
+ 4.33 から。継ぎ目アプリ counter-assist — LLM の回答を `$stream` で流すコンソール・ワーカーでの CSV の取り込み・1 本の SSE を読む呼び出し表示(片方のページは `@wcstack/signals`、片方は state で書いた)から。作者がわざとした 25 の誤りのどれにも、この lint は何も言いませんでした。signals のページは「検査するものが無い」と挙げていました。いま言うこと:
229
+
230
+ - **`wcs/stream-declaration`**(error) — オブジェクトリテラルで書いた `$stream` のエントリに、`fold` があって `initial` が無い(`answer: { args, source, fold: foldAnswer }`)か、`source` が無い。ランタイムは state を取り込むときに拒みます(`$stream entry "answer": fold needs an initial value.`): ページは初期化に失敗し、コンソールのすべてのルートが死んでいました。`initial: undefined` も、ランタイムと同じく初期値です。確かなものだけ: 名前や呼び出しのエントリ・spread か計算されたキーのあるエントリ・後に書いた spread が置き換えうるエントリには言いません。ボリューム(`wcs/volume-declaration` が言う)と `bind-component` の state も見ません。`src=` のファイルの state はそのファイルに報告します。
231
+ - **`wcs/html-sink-input`**(warning) — HTML の書き込み先(`html:`・`innerHTML:`・`outerHTML:`・`srcdoc:`)に、ページのフォームの部品が双方向の `value:` で書き戻すパスを束ねた — `<textarea data-wcs="value: question">` と `<p data-wcs="html: question">`。利用者が打った文字がマークアップとしてページに入ります: `<b>` は太字になり、`<img src=x onerror=…>` は走ります — フィルタが消毒するのでなければ。なので書き込み先のフィルタでは黙りません。テキストとして束ねてください(`textContent:`)。パスは state のパスとして比べます: `for: turns` の行の `.q` は `turns.*.q`。別のパスを通って届く文字(打った質問をメソッドが表示する一覧へ写す — 継ぎ目アプリ自身の形)は辿りません。書き込み先の束縛ごとに 1 回。
232
+ - **`wcs/signals-dual-entry`**(error)は、ページが走らせるローカルの module を読み、それぞれの URL が何を運ぶかで判断するようになりました: それぞれがリアクティブなコアを持つ `@wcstack/signals` の 2 つの読み込み — 2 つのエントリ(`.` と `./dom`)で、片方がエントリごとに束ねる CDN(`esm.run`・jsDelivr の `…/+esm`・`esm.sh`)から来るか、両方がビルドの違う `dist` のファイル(`.esm.js` と `.esm.min.js` はコアのチャンクが別)。または、どこからでも 2 つの版。呼び出し表示は、ページが読む module で `signal` を `…/@wcstack/signals@4.32.0/+esm` から、残りを `…/dist/dom.esm.min.js` から import していました: 時計を描く effect はその signal を追わず、時計は動きませんでした。1 つのビルドのファイルとして配る 2 つのエントリは 1 つのコアを共有するので通ります。裸の名前は import map を通して読みます(どのエントリも与えない名前はバンドラのもので、通ります)。module の中の所見は、その module のその行に報告します。すべての名前を `@wcstack/signals/dom` から import してください。
233
+ - **ローカルの module が `@wcstack/signals` を読み込むか wcstack の版を固定するページは検査され**、`nothing to check:` には載りません — `wcs/signals-dual-entry` と `wcs/lint-version-behind` が読みます。`wcs/lint-version-behind` は、それらの module の固定も読みます。`/` から始まる module は `--root=<dir>` があるときだけ読みます。
234
+ - **`wcs/event-before-binding`**(warning) — リテラルの `url` を持つ `<wcs-sse>` / `<wcs-ws>`、リテラルの `name` を持つ `<wcs-broadcast>` の `eventToken.message:`(要素の契約が `semantics: "event"` と宣言する出力)。要素はパッケージが定義した時点で接続し、state のファイルが読み込まれてトークンを束ねるより前です: ストリームの最初のイベント — 待ち行列のスナップショット — は誰にも届かず、8 人待ちで 0 人と出ていました。`url` を state から与える(`url: streamUrl`)とページを束ねてから始まります。または出力をプロパティとしても束ねてください(`message: lastEvent`、または spread)。要素の値で state に種を入れます。`manual`・`<template>` の中(挿入と同時に束ねる)・`<wcs-state>` の無いファイルでは言いません。ランタイムの同じ code の警告の静的な対です。
235
+ - **`wcs/input-nested-write`** は 2 つ目の直し方も言います: 要素には別のキーを束ねて、保存したいときにそのキーへコピーを代入する。これまで勧めていた getter は、パスの下への書き込みのたびに読み直され、`<wcs-storage>` はそのたびに保存します — コンソールでは、流れてくるトークンごとに。
236
+
237
+ 新しい error は `--errors-only` でも出て、新しい warning は `--strict` で落ちます。
238
+
226
239
  ## 生成 → 検証 → 修正ループでの利用
227
240
 
228
241
  安定した diagnostic code・`source:line:col` range・exit code 契約により、CI のゲートにも AI コード生成フローにもそのまま組み込めます: HTML を生成 → `npx @wcstack/lint --errors-only` → 診断を読んで修正 → exit code `0` になるまで再実行。このゲートが覆うのは `data-wcs` のページです: 出力が `not read:` や `nothing to check:` で終わるときは、そのファイルは検査されていません。
package/README.md CHANGED
@@ -94,7 +94,7 @@ Without a contract, a path the validator cannot resolve is only a **warning** (`
94
94
  }
95
95
  ```
96
96
 
97
- - **Discovery**: the nearest `wcstack.manifest.json` walking up from the HTML file is used automatically — nothing to pass on the command line. Passing `*.manifest.json` arguments that contain an `application` artifact replaces discovery for the whole run. The VS Code extension discovers the same file, so IDE and CLI agree.
97
+ - **Discovery**: the nearest `wcstack.manifest.json` walking up from the HTML file is used automatically — nothing to pass on the command line. Passing `*.manifest.json` arguments that contain an `application` artifact replaces discovery for the whole run. Two of them that both declare a `stateSchema` are a `wcs/manifest-state-collision` error, and neither is used — except, since 4.32, when each names a different state file (`stateSource`, below): then each page gets the schema of the file its root `<wcs-state src>` loads, and two apps with a generated schema are checked in one run. The VS Code extension discovers the same file, so IDE and CLI agree.
98
98
  - **Which pages a schema is for** (since 4.26): a manifest that names the state file its schema was generated from — `wcstack.application.stateSource`, relative to the manifest, which `wcs-schema emit` writes — is the contract only of a page whose root `<wcs-state src>` loads that file (`.js` and `.ts`, `.mjs` and `.mts` of one path being one file). A page whose state is inline, or another file, is checked as if there were no manifest, whether the manifest was discovered or passed on the command line. Up to 4.25 the app's schema was applied to every page under it, so a page with its own inline state beside the app got `wcs/path-nonexistent` errors for its correct paths. A manifest without `stateSource` (hand-written, or generated by an earlier `wcs-schema`) applies to every page as before.
99
99
  - **Effect**: when a `stateSchema` is declared, a bound path that the schema definitely lacks is `wcs/path-nonexistent` (**error**, exit `1`); `for:` on a non-array is `wcs/path-type-mismatch` (**error**). Paths the schema leaves open (a bare `{}`) are checked as they are without a schema — since 4.31; they were silent — and methods / getters / `$listKeys` from the inline script still count as existing. Without a `stateSchema`, behavior is unchanged.
100
100
  - **When a contract is needed**: a state the validator cannot read in full needs one for its paths to be checked at all. A top-level spread is the common case — `export default { ...defaults(), get total() { … } }` brings in keys no static reader sees, so the validator checks no path of that state, and since 4.4 it says so once, at the spread (`wcs/path-dynamic-unknown`, info). With a `stateSchema` the bindings — and, since 4.4, the paths the getters read (`wcs/read-path-missing`) — are checked against it. A `<wcs-state src>` it cannot read — a path from `/`, a URL, a file that is not there — leaves that state unchecked as well; since 4.7 it says so once, at the attribute (`wcs/state-src-unread`, info), where up to 4.6 it said nothing. It reads a `src` relative to the page: keep the files laid out as on the server, and since 4.10 pass `--root=<dir>` for a path from `/`.
@@ -223,6 +223,19 @@ Since 4.31, from an outside evaluation — the record of a 25-day Advent Calenda
223
223
 
224
224
  The new warnings fail `--strict`; the new error shows with `--errors-only`.
225
225
 
226
+ ## What a page with streams and a call display is told
227
+
228
+ Since 4.33, from the counter-assist seam app — an answer console that streams an LLM's answer with `$stream`, a CSV import in a worker, and a call display fed by one SSE stream (one page written with `@wcstack/signals`, one with the state). Its author made 25 mistakes on purpose, and this lint said nothing about any of them; it listed the signals page as having nothing to check. What it says now:
229
+
230
+ - **`wcs/stream-declaration`** (error) — a `$stream` entry written as an object literal with a `fold` and no `initial` (`answer: { args, source, fold: foldAnswer }`), or with no `source`. The runtime refuses the state when it takes it in (`$stream entry "answer": fold needs an initial value.`): the page fails to initialize, and every route of the console was dead. `initial: undefined` is an initial value, as at runtime. Only what is certain: not an entry that is a name or a call, has a spread or a computed key, or may be replaced by a spread written after it; not in a volume (`wcs/volume-declaration` says so) or a `bind-component` state. A `src=` file's state is reported in the file.
231
+ - **`wcs/html-sink-input`** (warning) — an HTML sink (`html:`, `innerHTML:`, `outerHTML:`, `srcdoc:`) bound to the path a form control on the page writes back through a two-way `value:` — `<textarea data-wcs="value: question">` with `<p data-wcs="html: question">`. What the user types goes onto the page as markup: `<b>` turns bold, `<img src=x onerror=…>` runs — unless a filter sanitizes it, so a filter on the sink does not silence it. Bind it as text (`textContent:`). Paths are compared as state paths: `.q` in a `for: turns` row is `turns.*.q`. Text that reaches the sink through another path (a method that copies the question into the list the page shows — the seam app's own shape) is not followed. Once per sink binding.
232
+ - **`wcs/signals-dual-entry`** (error) now reads the local modules a page runs, and judges by what each URL carries: two loads of `@wcstack/signals` that each have their own reactive core — the two entries (`.` and `./dom`) where one comes from a CDN that bundles each entry (`esm.run`, jsDelivr's `…/+esm`, `esm.sh`) or both are `dist` files of two builds (`.esm.js` and `.esm.min.js` have separate core chunks), or two versions from any source. The display imported `signal` from `…/@wcstack/signals@4.32.0/+esm` and the rest from `…/dist/dom.esm.min.js` in a module its page loads: the effect that drew the clock never saw its signal, and the clock never moved. Two entries served as files of one build share one core and pass; a bare name is read through the import map (one no entry gives is a bundler's, and passes). A finding in a module is reported in the module, at its line. Import every name from `@wcstack/signals/dom`.
233
+ - **A page whose local modules load `@wcstack/signals` or pin a wcstack version is checked**, not listed under `nothing to check:` — `wcs/signals-dual-entry` and `wcs/lint-version-behind` read it. `wcs/lint-version-behind` also reads the pins in those modules. A module from `/` is read only with `--root=<dir>`.
234
+ - **`wcs/event-before-binding`** (warning) — `eventToken.message:` on a `<wcs-sse>` / `<wcs-ws>` with a literal `url`, or a `<wcs-broadcast>` with a literal `name` (an output the element's contract declares `semantics: "event"`). The element connects as soon as its package defines it, before the state's file has loaded and bound the token: the stream's first event — the queue's snapshot — was dispatched to nobody, and the page showed 0 waiting with 8 waiting. Give it the `url` from the state (`url: streamUrl`) so it starts once the page is bound, or bind the output as a property too (`message: lastEvent`, or a spread), which seeds the state from the element. Not with `manual`, nor inside a `<template>` (bound as it is inserted), nor in a file without a `<wcs-state>`. The static twin of the runtime warning of the same code.
235
+ - **`wcs/input-nested-write`** also names a second way out: bind a separate key to the element and assign it a copy when the value should be stored. The getter it suggested is re-read, and `<wcs-storage>` saves, on every write below the path — every streamed token, in the console.
236
+
237
+ The new errors are printed with `--errors-only` too; the new warnings fail `--strict`.
238
+
226
239
  ## Use in generate–validate–fix loops
227
240
 
228
241
  Stable diagnostic codes, `source:line:col` ranges, and the exit-code contract make this CLI a drop-in gate for CI and for AI code-generation flows: generate HTML → `npx @wcstack/lint --errors-only` → read the diagnostics, fix, and re-run until exit code `0`. The gate covers `data-wcs` pages: when the output ends with `not read:` or `nothing to check:`, those files were not checked.
package/dist/cli.cjs CHANGED
@@ -486,6 +486,24 @@ var WcsDiagnosticCode = {
486
486
  InlineImport: "wcs/inline-import",
487
487
  // `key:`(React の key)。`key` という名前のプロパティを書くだけ。warning。
488
488
  KeyBinding: "wcs/key-binding",
489
+ // --- streams, user text and a stream's first event (継ぎ目アプリ counter-assist: LLM の回答のコンソール・CSV の
490
+ // 取り込み・SSE の呼び出し表示。わざとした 25 の誤りに lint は何も言わなかった) ---
491
+ // `$stream` のエントリ(オブジェクトリテラル)に `source` が無い、または `fold` があって `initial` が無い。ランタイムは
492
+ // state を取り込むときに拒む(`$stream entry "answer": fold needs an initial value.`)ので、ページは初期化に失敗し、
493
+ // 何も束ねられない(service/streamDeclarationValidator.ts)。spread・計算されたキーのあるエントリ、オブジェクトリテラルで
494
+ // ないエントリは読まない。ボリュームと bind-component の state は見ない(`$watch` と同じ)。error。
495
+ StreamDeclaration: "wcs/stream-declaration",
496
+ // HTML の書き込み先(`html:` / `innerHTML:` / `outerHTML:` / `srcdoc:`)に束ねたパスへ、同じページのフォームの部品
497
+ // (`<input>` / `<textarea>` / `<select>`)が双方向の `value:` で書き戻す。利用者が打った文字がマークアップとして
498
+ // ページに入る(service/htmlSinkInputValidator.ts)。`for:` の中の `.x` は `list.*.x` に読み替えて比べる。書き込み先の
499
+ // フィルタでは黙らない(消毒するかは見えない)。書き込み先の束縛ごとに 1 回。warning。
500
+ HtmlSinkInput: "wcs/html-sink-input",
501
+ // 自分で接続を始める I/O ノード(`<wcs-sse>` / `<wcs-ws>` の `url`、`<wcs-broadcast>` の `name` をリテラルの属性で書いた
502
+ // もの。`manual` は除く)の、`semantics: "event"` の出力への `eventToken.<出力>`。要素は state のファイルが読み込まれる
503
+ // より前に接続し、`eventToken.` が付く前に送った最初の回(SSE のスナップショット)は失われる(service/
504
+ // eventBeforeBindingValidator.ts。ランタイムの同じ code の警告の静的な対)。始める属性を束ねる(`url:` / `attr.url:`)か、
505
+ // 出力をプロパティとしても束ねる(`message:` / spread)と黙る。`<template>` の中(束ねてから接続される)も黙る。warning。
506
+ EventBeforeBinding: "wcs/event-before-binding",
489
507
  // 書き戻すときに変換しない双方向の `value:` が、state が数値で持つパス(種・JSDoc の `@type`・stateSchema)を指す。
490
508
  // 要素の `value` は文字列なので、5 と入力した後の state は `"5"` で、`count + 1` は `"51"` になる。ランタイムは何も
491
509
  // 言わない(ekiden-entry — 弁当 1 個と 2 個が 12 個になった)。数値にする入力フィルタ(`value|number:`)・
@@ -554,7 +572,12 @@ var WcsDiagnosticCode = {
554
572
  // 現在)。`to` のキーの一部だけを比べない形(`to="?cat=a&page=1" query-keys="cat"`)は意図どおりなので黙る
555
573
  // (docs/formal-methods-study.md §4.2)。warning。
556
574
  LinkQueryKeyIgnored: "wcs/link-query-key-ignored",
557
- // @wcstack/signals と /dom エントリの同一ページ混在(リアクティブコア二重化)。
575
+ // `@wcstack/signals` のリアクティブコアがページに 2 つできる読み込み(service/packageLoadValidator.ts): 2 つのエントリ
576
+ // (`.` と `./dom`)を、エントリごとに束ねる CDN(esm.run・jsDelivr の `+esm`・esm.sh)から、またはビルドの違うファイル
577
+ // (`.esm.js` と `.esm.min.js` はコアのチャンクが別)から読む。または 2 つの版を読む。片方の signal をもう片方の effect は
578
+ // 追わず、その間で画面が更新されなくなる(継ぎ目アプリ counter-assist — 呼び出し表示の時計が止まった)。ページ・インラインの
579
+ // module・ページが読むローカルの module(その中の import 先)の import を数える。error。両方のエントリを CDN に割り当てた
580
+ // import map は、ページが片方しか import しなくても warning(ほかのファイルの module が 2 つ目のコアを持つ — signals-shop)。
558
581
  SignalsDualEntry: "wcs/signals-dual-entry",
559
582
  // wcstack を自分で読み込むページが、あるパッケージのタグ(`<wcs-upload>`・`<wcs-upload-header>`)を書くのに、その
560
583
  // パッケージのスクリプトを読み込んでいない。要素は定義されず、束縛は待ち続け、コンソールにも何も出ない(継ぎ目アプリ
@@ -2687,7 +2710,7 @@ function getWcsManifest() {
2687
2710
  }
2688
2711
 
2689
2712
  // ../state/package.json
2690
- var version = "4.31.0";
2713
+ var version = "4.33.0";
2691
2714
 
2692
2715
  // src/service/wcsManifest.ts
2693
2716
  var ENGINE_VERSION = version;
@@ -9539,6 +9562,7 @@ function withImportedTypes(typedefs, script, location) {
9539
9562
 
9540
9563
  // src/service/stateAnalyzer.ts
9541
9564
  var RESERVED_STREAMS_KEYS = /* @__PURE__ */ new Set(["$stream", "$streams"]);
9565
+ var RESERVED_STREAM_KEY = "$stream";
9542
9566
  var RESERVED_COMMAND_TOKENS_KEY = "$commandTokens";
9543
9567
  var RESERVED_EVENT_TOKENS_KEY = "$eventTokens";
9544
9568
  var RESERVED_LIST_KEYS_KEY = "$listKeys";
@@ -9714,6 +9738,79 @@ function analyzeHandlerSources(scriptContent, key) {
9714
9738
  function analyzeListKeyEntries(scriptContent) {
9715
9739
  return analyzeObjectEntries(scriptContent, RESERVED_LIST_KEYS_KEY).map((entry) => ({ key: entry.key, start: entry.start, end: entry.end }));
9716
9740
  }
9741
+ function analyzeStreamEntries(scriptContent) {
9742
+ const root = locateDefaultExportObject(scriptContent);
9743
+ if (!root) return [];
9744
+ const declaration = parseTopLevelProperties(root.content).filter((p) => p.name === RESERVED_STREAM_KEY).at(-1);
9745
+ if (!declaration || declaration.kind !== "data" || !declaration.value || !isObjectLiteral(declaration.value) || declaration.valueStart === void 0 || declaration.nameStart === void 0) {
9746
+ return [];
9747
+ }
9748
+ if (spreadStarts(root.content).some((at2) => at2 > declaration.nameStart)) return [];
9749
+ const inner = extractObjectContent(declaration.value);
9750
+ const innerStart = root.start + declaration.valueStart + 1;
9751
+ const spreads = spreadStarts(inner);
9752
+ const entries = parseTopLevelProperties(inner);
9753
+ const out = [];
9754
+ entries.forEach((entry, i) => {
9755
+ if (entry.kind !== "data" || entry.nameStart === void 0 || entry.nameEnd === void 0 || entry.value === void 0) return;
9756
+ if (spreads.some((at2) => at2 > entry.nameStart)) return;
9757
+ if (entries.slice(i + 1).some((later) => later.name === entry.name)) return;
9758
+ out.push({
9759
+ name: entry.name,
9760
+ start: innerStart + entry.nameStart,
9761
+ end: innerStart + entry.nameEnd,
9762
+ keys: literalKeyNames(entry.value)
9763
+ });
9764
+ });
9765
+ return out;
9766
+ }
9767
+ function literalKeyNames(value) {
9768
+ const text3 = value.trim();
9769
+ if (!text3.startsWith("{")) return null;
9770
+ const scan = maskCommentsAndStrings(text3);
9771
+ const close = matchingBrace(scan, 0);
9772
+ if (close < 0) return null;
9773
+ const rest = blankCommentMarks(scan.slice(close + 1)).trim();
9774
+ if (rest !== "" && !/^(?:as|satisfies)\b/.test(rest)) return null;
9775
+ const content = text3.slice(1, close);
9776
+ for (const segment of topLevelSegments(blankCommentMarks(scan.slice(1, close)))) {
9777
+ if (/^\s*\.\.\./.test(segment) || /^\s*(?:(?:get|set|async|static)\s+)?\*?\s*\[/.test(segment)) return null;
9778
+ }
9779
+ return withShorthands(content, parseTopLevelProperties(content)).map((p) => p.name);
9780
+ }
9781
+ function blankCommentMarks(scan) {
9782
+ return scan.replace(/\/\*[\s\S]*?\*\/|\/\/[^\n]*/g, (c) => " ".repeat(c.length));
9783
+ }
9784
+ function topLevelSegments(scan) {
9785
+ const out = [];
9786
+ let depth = 0;
9787
+ let start = 0;
9788
+ for (let i = 0; i <= scan.length; i++) {
9789
+ const ch = scan[i];
9790
+ if (ch === "{" || ch === "[" || ch === "(") depth++;
9791
+ else if (ch === "}" || ch === "]" || ch === ")") depth--;
9792
+ else if (ch === "," && depth === 0 || i === scan.length) {
9793
+ out.push(scan.slice(start, i));
9794
+ start = i + 1;
9795
+ }
9796
+ }
9797
+ return out;
9798
+ }
9799
+ function spreadStarts(content) {
9800
+ const scan = blankCommentMarks(maskCommentsAndStrings(content));
9801
+ const out = [];
9802
+ let depth = 0;
9803
+ for (let i = 0; i < scan.length; i++) {
9804
+ const ch = scan[i];
9805
+ if (ch === "(" || ch === "[" || ch === "{") depth++;
9806
+ else if (ch === ")" || ch === "]" || ch === "}") depth--;
9807
+ else if (depth === 0 && ch === "." && scan.startsWith("...", i)) {
9808
+ out.push(i);
9809
+ i += 2;
9810
+ }
9811
+ }
9812
+ return out;
9813
+ }
9717
9814
  function findTopLevelDeclaration(scriptContent, key) {
9718
9815
  const root = locateDefaultExportObject(scriptContent);
9719
9816
  if (!root) return null;
@@ -11919,6 +12016,10 @@ var BUILTIN_TAGS = {
11919
12016
  "noteOff",
11920
12017
  "allNotesOff"
11921
12018
  ],
12019
+ "events": [
12020
+ "noteOn",
12021
+ "noteOff"
12022
+ ],
11922
12023
  "commandArity": {
11923
12024
  "resume": 0,
11924
12025
  "suspend": 0,
@@ -12133,6 +12234,9 @@ var BUILTIN_TAGS = {
12133
12234
  "commands": [
12134
12235
  "sample"
12135
12236
  ],
12237
+ "events": [
12238
+ "frame"
12239
+ ],
12136
12240
  "commandArity": {
12137
12241
  "sample": 0
12138
12242
  }
@@ -12157,6 +12261,9 @@ var BUILTIN_TAGS = {
12157
12261
  "post",
12158
12262
  "close"
12159
12263
  ],
12264
+ "events": [
12265
+ "message"
12266
+ ],
12160
12267
  "commandArity": {
12161
12268
  "open": 0,
12162
12269
  "post": 1,
@@ -12201,6 +12308,9 @@ var BUILTIN_TAGS = {
12201
12308
  "handles": [
12202
12309
  "streamReady"
12203
12310
  ],
12311
+ "events": [
12312
+ "ended"
12313
+ ],
12204
12314
  "commandArity": {
12205
12315
  "start": 0,
12206
12316
  "stop": 0,
@@ -12236,6 +12346,10 @@ var BUILTIN_TAGS = {
12236
12346
  "pause",
12237
12347
  "resume"
12238
12348
  ],
12349
+ "events": [
12350
+ "recorded",
12351
+ "dataavailable"
12352
+ ],
12239
12353
  "commandArity": {
12240
12354
  "attachStream": 1,
12241
12355
  "start": 0,
@@ -12272,6 +12386,13 @@ var BUILTIN_TAGS = {
12272
12386
  "startMonitor",
12273
12387
  "stopMonitor"
12274
12388
  ],
12389
+ "events": [
12390
+ "text",
12391
+ "items",
12392
+ "copied",
12393
+ "cut",
12394
+ "pasted"
12395
+ ],
12275
12396
  "commandArity": {
12276
12397
  "writeText": 1,
12277
12398
  "write": 1,
@@ -12346,6 +12467,9 @@ var BUILTIN_TAGS = {
12346
12467
  "cancel",
12347
12468
  "flush"
12348
12469
  ],
12470
+ "events": [
12471
+ "fired"
12472
+ ],
12349
12473
  "commandArity": {
12350
12474
  "trigger": 0,
12351
12475
  "cancel": 0,
@@ -12373,6 +12497,9 @@ var BUILTIN_TAGS = {
12373
12497
  "cancel",
12374
12498
  "flush"
12375
12499
  ],
12500
+ "events": [
12501
+ "fired"
12502
+ ],
12376
12503
  "commandArity": {
12377
12504
  "trigger": 0,
12378
12505
  "cancel": 0,
@@ -12718,6 +12845,15 @@ var BUILTIN_TAGS = {
12718
12845
  "close",
12719
12846
  "send"
12720
12847
  ],
12848
+ "events": [
12849
+ "message",
12850
+ "type",
12851
+ "channel",
12852
+ "note",
12853
+ "velocity",
12854
+ "control",
12855
+ "value"
12856
+ ],
12721
12857
  "commandArity": {
12722
12858
  "request": 0,
12723
12859
  "close": 0,
@@ -12775,6 +12911,11 @@ var BUILTIN_TAGS = {
12775
12911
  "close",
12776
12912
  "closeAll"
12777
12913
  ],
12914
+ "events": [
12915
+ "clicked",
12916
+ "closed",
12917
+ "shown"
12918
+ ],
12778
12919
  "commandArity": {
12779
12920
  "request": 0,
12780
12921
  "notify": 2,
@@ -12992,6 +13133,10 @@ var BUILTIN_TAGS = {
12992
13133
  "pause",
12993
13134
  "resume"
12994
13135
  ],
13136
+ "events": [
13137
+ "charIndex",
13138
+ "spokenWord"
13139
+ ],
12995
13140
  "commandArity": {
12996
13141
  "speak": 1,
12997
13142
  "cancel": 0,
@@ -13027,6 +13172,9 @@ var BUILTIN_TAGS = {
13027
13172
  "stop",
13028
13173
  "abort"
13029
13174
  ],
13175
+ "events": [
13176
+ "result"
13177
+ ],
13030
13178
  "commandArity": {
13031
13179
  "start": 0,
13032
13180
  "stop": 0,
@@ -13064,6 +13212,9 @@ var BUILTIN_TAGS = {
13064
13212
  "connect",
13065
13213
  "close"
13066
13214
  ],
13215
+ "events": [
13216
+ "message"
13217
+ ],
13067
13218
  "commandArity": {
13068
13219
  "connect": 0,
13069
13220
  "close": 0
@@ -13300,6 +13451,9 @@ var BUILTIN_TAGS = {
13300
13451
  "sendMessage",
13301
13452
  "close"
13302
13453
  ],
13454
+ "events": [
13455
+ "message"
13456
+ ],
13303
13457
  "commandArity": {
13304
13458
  "connect": 0,
13305
13459
  "sendMessage": 1,
@@ -13333,6 +13487,9 @@ var BUILTIN_TAGS = {
13333
13487
  "post",
13334
13488
  "terminate"
13335
13489
  ],
13490
+ "events": [
13491
+ "message"
13492
+ ],
13336
13493
  "commandArity": {
13337
13494
  "start": 0,
13338
13495
  "post": 2,
@@ -13476,6 +13633,10 @@ var ja = {
13476
13633
  eventNameCase: (property, lower2) => `"${property}:" \u306F "${property.slice(2)}" \u3068\u3044\u3046\u540D\u524D\u306E\u30A4\u30D9\u30F3\u30C8\u3092\u805E\u304D\u307E\u3059\u304C\u3001\u305D\u308C\u3092\u9001\u308B\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093 \u2014 DOM \u306E\u30A4\u30D9\u30F3\u30C8\u540D\u306F\u5C0F\u6587\u5B57\u3067\u3059\u3002DOM \u306E\u30A4\u30D9\u30F3\u30C8\u306A\u3089 "${lower2}:" \u3068\u66F8\u3044\u3066\u304F\u3060\u3055\u3044\u3002\u90E8\u54C1\u306E\u30B3\u30FC\u30EB\u30D0\u30C3\u30AF\uFF08"prop"\uFF09\u306F\u90E8\u54C1\u304C\u9001\u308B\u30A4\u30D9\u30F3\u30C8\u3067\u3001eventToken.<\u30E1\u30F3\u30D0\u30FC>: \u3067\u675F\u306D\u307E\u3059`,
13477
13634
  inlineImport: (specifier, guard) => `\u30A4\u30F3\u30E9\u30A4\u30F3\u306E ${guard ? "<wcs-guard-handler>" : "<wcs-state>"} \u306E\u30B9\u30AF\u30EA\u30D7\u30C8\u306F blob: URL \u304B\u3089\u8A55\u4FA1\u3055\u308C\u308B\u306E\u3067\u3001"${specifier}" \u306F\u89E3\u6C7A\u3057\u307E\u305B\u3093\uFF08${guard ? "\u30AC\u30FC\u30C9\u306F" : "state \u306F"}\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3059\uFF09\u3002${guard ? "\u5B8C\u5168\u306A URL \u304B\u3001\u30DA\u30FC\u30B8\u306E import map \u304C\u4E0E\u3048\u308B\u540D\u524D\u3092 import \u3057\u3066\u304F\u3060\u3055\u3044" : '\u5B8C\u5168\u306A URL \u304B\u3001\u30DA\u30FC\u30B8\u306E import map \u304C\u4E0E\u3048\u308B\u540D\u524D\u3092 import \u3059\u308B\u304B\u3001state \u3092\u30D5\u30A1\u30A4\u30EB\u306B\u79FB\u3057\u3066\u304F\u3060\u3055\u3044\uFF08src="./state.js"\uFF09'}`,
13478
13635
  keyBinding: () => `"key:" \u306F "key" \u3068\u3044\u3046\u540D\u524D\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u66F8\u304F\u3060\u3051\u3067\u3001\u307B\u304B\u306B\u4F55\u3082\u3057\u307E\u305B\u3093\u3002key \u306F\u8981\u308A\u307E\u305B\u3093 \u2014 \u884C\u306F\u884C\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3067\u7A81\u304D\u5408\u308F\u3055\u308C\u3001\u53D6\u308A\u76F4\u3057\u305F\u30C7\u30FC\u30BF\u3067\u884C\u3092\u4FDD\u3064\u306E\u306F $listKeys \u3067\u3059`,
13636
+ streamSourceMissing: (name) => `$stream \u306E\u30A8\u30F3\u30C8\u30EA "${name}" \u306B source\uFF08\u95A2\u6570\uFF09\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u30E9\u30F3\u30BF\u30A4\u30E0\u306F state \u3092\u53D6\u308A\u8FBC\u3080\u3068\u304D\u306B\u62D2\u3080\uFF08$stream entry "${name}" needs a source function.\uFF09\u306E\u3067\u3001\u30DA\u30FC\u30B8\u306F\u521D\u671F\u5316\u306B\u5931\u6557\u3057\u3001\u4F55\u3082\u675F\u306D\u3089\u308C\u307E\u305B\u3093\u3002source: (args, signal) => \u2026 \u3092\u66F8\u3044\u3066\u304F\u3060\u3055\u3044\uFF08async iterable \u304B ReadableStream \u3092\u8FD4\u3059\uFF09`,
13637
+ streamFoldWithoutInitial: (name) => `$stream \u306E\u30A8\u30F3\u30C8\u30EA "${name}" \u306F fold \u304C\u3042\u3063\u3066 initial \u304C\u3042\u308A\u307E\u305B\u3093\u3002\u30E9\u30F3\u30BF\u30A4\u30E0\u306F state \u3092\u53D6\u308A\u8FBC\u3080\u3068\u304D\u306B\u62D2\u3080\uFF08$stream entry "${name}": fold needs an initial value.\uFF09\u306E\u3067\u3001\u30DA\u30FC\u30B8\u306F\u521D\u671F\u5316\u306B\u5931\u6557\u3057\u3001\u4F55\u3082\u675F\u306D\u3089\u308C\u307E\u305B\u3093\u3002\u6700\u521D\u306E\u30C1\u30E3\u30F3\u30AF\u3092\u7573\u307F\u8FBC\u3080\u5024\u3092 initial \u306B\u66F8\u3044\u3066\u304F\u3060\u3055\u3044\uFF08initial: "" / [] / {} / 0\uFF09`,
13638
+ htmlSinkInput: (binding, control, path) => `"${binding}" \u306F\u3001\u5229\u7528\u8005\u304C <${control}> \u306B\u6253\u3063\u305F\u6587\u5B57\uFF08\u305D\u306E value: \u304C\u540C\u3058\u30D1\u30B9\u306B\u66F8\u304D\u623B\u3057\u307E\u3059\uFF09\u3092\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u3068\u3057\u3066\u30DA\u30FC\u30B8\u306B\u5165\u308C\u307E\u3059: <b> \u306F\u592A\u5B57\u306B\u306A\u308A\u3001<img src=x onerror=\u2026> \u306F\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u8D70\u3089\u305B\u3001\u6253\u3063\u305F\u3082\u306E\u3068\u306F\u9055\u3046\u3082\u306E\u304C\u8868\u793A\u3055\u308C\u307E\u3059 \u2014 \u30D5\u30A3\u30EB\u30BF\u304C\u6D88\u6BD2\u3059\u308B\u306E\u3067\u306A\u3051\u308C\u3070\u3002\u30C6\u30AD\u30B9\u30C8\u3068\u3057\u3066\u675F\u306D\u3066\u304F\u3060\u3055\u3044\uFF08textContent: ${path}\uFF09`,
13639
+ eventBeforeBinding: (tag, output, attribute) => `<${tag}> \u306F ${attribute}="\u2026" \u5C5E\u6027\u304B\u3089\u81EA\u5206\u3067\u59CB\u307E\u308B\u306E\u3067\u3001state \u306E\u30D5\u30A1\u30A4\u30EB\u304C\u8AAD\u307F\u8FBC\u307E\u308C\u3066 "eventToken.${output}:" \u3092\u675F\u306D\u308B\u3088\u308A\u524D\u306B\u63A5\u7D9A\u3057\u307E\u3059: \u6700\u521D\u306E ${output}${tag === "wcs-sse" ? "\uFF08\u30B9\u30C8\u30EA\u30FC\u30E0\u306E\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u306A\u3069\uFF09" : " "}\u306F\u30C8\u30FC\u30AF\u30F3\u304C\u4ED8\u304F\u524D\u306B\u9001\u3089\u308C\u3066\u5931\u308F\u308C\u3001\u4F55\u3082\u77E5\u3089\u305B\u307E\u305B\u3093\u3002${attribute} \u3092 state \u304B\u3089\u4E0E\u3048\u3066\u304F\u3060\u3055\u3044\uFF08${attribute}: <\u30D1\u30B9> \u2014 \u30DA\u30FC\u30B8\u3092\u675F\u306D\u3066\u304B\u3089\u59CB\u307E\u308A\u307E\u3059\uFF09\u3002\u307E\u305F\u306F\u51FA\u529B\u3092\u30D7\u30ED\u30D1\u30C6\u30A3\u3068\u3057\u3066\u3082\u675F\u306D\u3066\u304F\u3060\u3055\u3044\uFF08${output}: <\u30D1\u30B9> \u306F\u8981\u7D20\u306E\u5024\u3092 state \u306B\u5165\u308C\u307E\u3059\uFF09`,
13479
13640
  radioNameShared: (name, binding) => `\u884C\u3054\u3068\u306E\u30E9\u30B8\u30AA\u304C\u3059\u3079\u3066 name="${name}" \u306B\u306A\u308B\u306E\u3067\u3001\u30D6\u30E9\u30A6\u30B6\u306F\u5168\u90E8\u306E\u884C\u306E\u30E9\u30B8\u30AA\u3092 1 \u3064\u306E\u30B0\u30EB\u30FC\u30D7\u306B\u3057\u307E\u3059\u3002\u30DA\u30FC\u30B8\u5168\u4F53\u3067 1 \u3064\u3057\u304B\u9078\u3070\u308C\u305F\u72B6\u614B\u306B\u306A\u3089\u305A\u3001\u8868\u793A\u306F\u6700\u521D\u306E\u63CF\u753B\u304B\u3089\u884C\u3054\u3068\u306E\u5024\u3068\u98DF\u3044\u9055\u3044\u307E\u3059\uFF08\u4F55\u3082\u77E5\u3089\u305B\u307E\u305B\u3093\uFF09\u3002${binding === "radio" ? "\u884C\u3054\u3068\u306B\u9055\u3046 name \u3092\u675F\u306D\u308B\uFF08attr.name: .<\u884C\u3054\u3068\u306B\u9055\u3046\u30D5\u30A3\u30FC\u30EB\u30C9>\uFF09\u304B\u3001name \u3092\u5916\u3057\u3066\u304F\u3060\u3055\u3044\uFF08radio: \u306F name \u304C\u7121\u304F\u3066\u3082\u3001\u540C\u3058\u30D1\u30B9\u306B\u675F\u306D\u305F\u30E9\u30B8\u30AA\u3092\u9078\u629E\u306B\u5408\u308F\u305B\u307E\u3059\uFF09" : "\u884C\u3054\u3068\u306B\u9055\u3046 name \u3092\u675F\u306D\u3066\u304F\u3060\u3055\u3044\uFF08attr.name: .<\u884C\u3054\u3068\u306B\u9055\u3046\u30D5\u30A3\u30FC\u30EB\u30C9>\uFF09\u3002\u884C\u3092\u307E\u305F\u3044\u3067 1 \u3064\u3092\u9078\u3070\u305B\u308B\u306A\u3089\u3001\u5168\u90E8\u3092 1 \u3064\u306E\u30D1\u30B9\u306B\u675F\u306D\u307E\u3059\uFF08value: .<\u884C\u306E id>; radio: <\u30D1\u30B9>\uFF09"}`,
13480
13641
  numberWrittenAsString: (path, left, asNumber) => `"${path}" \u306F state \u3067\u306F\u6570\u5024\u3067\u3059\u304C\u3001value: \u304C\u66F8\u304D\u623B\u3059\u306E\u306F\u8981\u7D20\u306E\u6301\u3064\u6587\u5B57\u5217\u3067\u3059\u30025 \u3068\u5165\u529B\u3057\u305F\u5F8C\u306E state \u306F "5" \u3067\u3001"5" + 1 \u306F "51" \u306B\u306A\u308A\u307E\u3059\uFF08\u4F55\u3082\u77E5\u3089\u305B\u307E\u305B\u3093\uFF09\u3002\u66F8\u304D\u623B\u3059\u3068\u304D\u306B\u6570\u5024\u306B\u3057\u3066\u304F\u3060\u3055\u3044: ${asNumber ? `valueAsNumber: ${path}\u3001\u307E\u305F\u306F` : ""}\u5DE6\u8FBA\u306E\u5165\u529B\u30D5\u30A3\u30EB\u30BF ${left}|number: ${path}\uFF08|int\u30FB|float \u3082\uFF09`,
13481
13642
  twoWayOutputFilter: (prop, filters, left, rhs, keystroke) => keystroke ? `${prop}: \u306F\u53CC\u65B9\u5411\u3067 1 \u6253\u9375\u3054\u3068\u306B\u66F8\u304D\u623B\u3057\u3001\u51FA\u529B\u30D5\u30A3\u30EB\u30BF "${filters}" \u306F\u305D\u306E\u305F\u3073\u306B state \u306E\u5024\u3092\u6574\u5F62\u3057\u3066\u6B04\u3078\u66F8\u304D\u76F4\u3057\u307E\u3059\u3002\u5165\u529B\u4E2D\u306E\u6B04\u304C\u66F8\u304D\u63DB\u308F\u308A\uFF08\u30AD\u30E3\u30EC\u30C3\u30C8\u306F\u672B\u5C3E\u3078\u98DB\u3073\u3001IME \u306E\u5909\u63DB\u306F\u9014\u5207\u308C\u307E\u3059\uFF09\u3001state \u304C\u53D7\u3051\u53D6\u308B\u306E\u3082\u6B04\u306E\u6574\u5F62\u6E08\u307F\u306E\u6587\u5B57\u3067\u3059\uFF08\u51FA\u529B\u30D5\u30A3\u30EB\u30BF\u306F\u66F8\u304D\u623B\u3057\u3067\u5143\u306B\u623B\u308A\u307E\u305B\u3093\uFF09\u3002\u6574\u5F62\u3057\u305F\u6587\u5B57\u306F\u5225\u306E\u8981\u7D20\u306B\u8868\u793A\u3059\u308B\u3001\u6B04\u306E\u78BA\u5B9A\u3067\u66F8\u304D\u623B\u3057\u3066 setter \u3067\u6574\u5F62\u3059\u308B\uFF08${prop}#onchange:\uFF09\u3001\u307E\u305F\u306F\u4E00\u65B9\u5411\u306B\u3057\u3066\u304F\u3060\u3055\u3044\uFF08${prop}#ro: ${rhs}\uFF09` : `${prop}: \u306F\u53CC\u65B9\u5411\u3067\u3059\u304C\u3001\u51FA\u529B\u30D5\u30A3\u30EB\u30BF "${filters}" \u306F\u66F8\u304D\u623B\u3057\u3067\u5143\u306B\u623B\u308A\u307E\u305B\u3093\u3002\u8981\u7D20\u304C\u66F8\u304D\u623B\u3059\u306E\u306F\u8868\u793A\u3057\u3066\u3044\u308B\u6574\u5F62\u6E08\u307F\u306E\u5024\u3067\u3001\u6B21\u306F\u305D\u306E\u5024\u306B\u30D5\u30A3\u30EB\u30BF\u304C\u639B\u304B\u308A\u307E\u3059\u3002\u5DE6\u8FBA\u306E\u5165\u529B\u30D5\u30A3\u30EB\u30BF\u3067\u5143\u306B\u623B\u3059\uFF08${left}|<\u30D5\u30A3\u30EB\u30BF>: \u2026\uFF09\u3001\u6574\u5F62\u3057\u305F\u5024\u306F\u5225\u306E\u8981\u7D20\u306B\u8868\u793A\u3059\u308B\u3001\u307E\u305F\u306F\u4E00\u65B9\u5411\u306B\u3057\u3066\u304F\u3060\u3055\u3044\uFF08${prop}#ro: ${rhs}\uFF09`,
@@ -13558,13 +13719,13 @@ var ja = {
13558
13719
  storageSeedClobber: (path, raw) => `<wcs-storage> \u306E value \u30D0\u30A4\u30F3\u30C9\u5148 "${path}" \u304C ${shortSeed(raw)} \u3067\u30B7\u30FC\u30C9\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u8AAD\u307F\u8FBC\u307F\u306E\u305F\u3073\u306B\u521D\u671F\u66F8\u304D\u623B\u3057\u304C\u4FDD\u5B58\u5024\u3092\u4E0A\u66F8\u304D\u3057\u307E\u3059 \u2014 \u30D0\u30A4\u30F3\u30C9\u306B #init=element \u3092\u4ED8\u3051\u3066\uFF08\`value#init=element: ${path}\`\uFF09\u4FDD\u5B58\u5024\u3092\u52DD\u305F\u305B\u3001\u30B9\u30ED\u30C3\u30C8\u306F null\uFF08\u7A7A\u306E\u30AD\u30FC\u304C\u8AAD\u3080\u5024\uFF09\u3067\u30B7\u30FC\u30C9\u3057\u3066\u304F\u3060\u3055\u3044`,
13559
13720
  storageInitSeed: (path, raw) => `<wcs-storage> \u306E value \u30D0\u30A4\u30F3\u30C9\u5148 "${path}" \u304C ${shortSeed(raw)} \u3067\u30B7\u30FC\u30C9\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001#init=element \u306F\u8981\u7D20\u306E\u5024\u3092\u3053\u306E\u30B9\u30ED\u30C3\u30C8\u3078\u5F15\u304D\u8FBC\u307F\u307E\u3059\u3002\u521D\u56DE\uFF08\u7A7A\u306E\u30AD\u30FC\uFF09\u306F null \u306A\u306E\u3067\u3001\u30B7\u30FC\u30C9\u306F null \u306B\u7F6E\u304D\u63DB\u308F\u308A\u307E\u3059 \u2014 null \u3067\u30B7\u30FC\u30C9\u3057\u3066\u8AAD\u3080\u5074\u3067\u65E2\u5B9A\u5024\u3092\u88DC\u3046\uFF08\`this.${path} ?? \u2026\`\uFF09\u304B\u3001null \u3092\u7121\u8996\u3059\u308B setter \u3092\u6301\u3064\u30A2\u30AF\u30BB\u30B5\u30DA\u30A2\u3092\u675F\u306D\u3066\u304F\u3060\u3055\u3044`,
13560
13721
  storagePairClobber: (path) => `<wcs-storage> \u306E value \u3092 #init=element \u306A\u3057\u3067\u30A2\u30AF\u30BB\u30B5\u30DA\u30A2 "${path}" \u306B\u675F\u306D\u3066\u3044\u307E\u3059\u3002state \u306E\u5074\u304C\u5148\u306B\u66F8\u304F\u306E\u3067\u3001\u8AAD\u307F\u8FBC\u307F\u306E\u305F\u3073\u306B getter \u306E\u6700\u521D\u306E\u5024\u304C\u4FDD\u5B58\u5024\u306E\u4E0A\u306B\u4FDD\u5B58\u3055\u308C\u3001setter \u306F\u4FDD\u5B58\u5024\u3092\u53D7\u3051\u53D6\u308C\u307E\u305B\u3093 \u2014 #init=element \u3092\u4ED8\u3051\u3066\u304F\u3060\u3055\u3044\uFF08\`value#init=element: ${path}\`\uFF09`,
13561
- inputNestedWrite: (tag, input, path, example) => `<${tag}> \u306E\u5165\u529B "${input}" \u306B "${path}" \u3092\u675F\u306D\u3066\u3044\u307E\u3059\u304C\u3001\u30DA\u30FC\u30B8\u306F\u305D\u306E\u4E0B\uFF08"${example}"\uFF09\u3078\u66F8\u304D\u8FBC\u3093\u3067\u3044\u307E\u3059\u3002\u675F\u7E1B\u306F "${path}" \u81EA\u8EAB\u3078\u306E\u4EE3\u5165\u3067\u3057\u304B\u5F53\u3066\u76F4\u3055\u308C\u306A\u3044\u306E\u3067\u3001\u4E0B\u3078\u306E\u66F8\u304D\u8FBC\u307F\u306F <${tag}> \u306B\u5C4A\u304D\u307E\u305B\u3093 \u2014 \u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30D1\u30B9\u3067\u8AAD\u3093\u3067\u65B0\u3057\u3044\u5024\u3092\u8FD4\u3059 getter\uFF08\`this["${example}"]\`\u30FB\`$getAll\`\uFF09\u3092\u675F\u306D\u3066\u304F\u3060\u3055\u3044: \u8981\u7D20\u306E\u5024\u3082\u53D7\u3051\u53D6\u308B\u306A\u3089\u3001setter \u3092\u6DFB\u3048\u305F\u30A2\u30AF\u30BB\u30B5\u30DA\u30A2\u3092 ${input}#init=element: <getter> \u3067\u3002\u8981\u7D20\u306E\u5024\u3092\u53D7\u3051\u53D6\u3089\u306A\u3044\u306A\u3089\u3001\u4E00\u65B9\u5411\u306B ${input}#ro: <getter> \u3067\uFF08setter \u3082 #ro \u3082\u7121\u3044\u3068\u3001\u8981\u7D20\u304C\u77E5\u3089\u305B\u308B\u5024\u306E\u66F8\u304D\u623B\u3057\u304C getter \u306B\u62D2\u307E\u308C\u307E\u3059 \u2014 wcs/path-readonly\uFF09\u3002\u307E\u305F\u306F\u3001\u4E0B\u3078\u66F8\u304B\u305A\u306B "${path}" \u3092\u5DEE\u3057\u66FF\u3048\u3066\u304F\u3060\u3055\u3044`,
13722
+ inputNestedWrite: (tag, input, path, example) => `<${tag}> \u306E\u5165\u529B "${input}" \u306B "${path}" \u3092\u675F\u306D\u3066\u3044\u307E\u3059\u304C\u3001\u30DA\u30FC\u30B8\u306F\u305D\u306E\u4E0B\uFF08"${example}"\uFF09\u3078\u66F8\u304D\u8FBC\u3093\u3067\u3044\u307E\u3059\u3002\u675F\u7E1B\u306F "${path}" \u81EA\u8EAB\u3078\u306E\u4EE3\u5165\u3067\u3057\u304B\u5F53\u3066\u76F4\u3055\u308C\u306A\u3044\u306E\u3067\u3001\u4E0B\u3078\u306E\u66F8\u304D\u8FBC\u307F\u306F <${tag}> \u306B\u5C4A\u304D\u307E\u305B\u3093 \u2014 \u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30D1\u30B9\u3067\u8AAD\u3093\u3067\u65B0\u3057\u3044\u5024\u3092\u8FD4\u3059 getter\uFF08\`this["${example}"]\`\u30FB\`$getAll\`\uFF09\u3092\u675F\u306D\u3066\u304F\u3060\u3055\u3044: \u8981\u7D20\u306E\u5024\u3082\u53D7\u3051\u53D6\u308B\u306A\u3089\u3001setter \u3092\u6DFB\u3048\u305F\u30A2\u30AF\u30BB\u30B5\u30DA\u30A2\u3092 ${input}#init=element: <getter> \u3067\u3002\u8981\u7D20\u306E\u5024\u3092\u53D7\u3051\u53D6\u3089\u306A\u3044\u306A\u3089\u3001\u4E00\u65B9\u5411\u306B ${input}#ro: <getter> \u3067\uFF08setter \u3082 #ro \u3082\u7121\u3044\u3068\u3001\u8981\u7D20\u304C\u77E5\u3089\u305B\u308B\u5024\u306E\u66F8\u304D\u623B\u3057\u304C getter \u306B\u62D2\u307E\u308C\u307E\u3059 \u2014 wcs/path-readonly\uFF09\u3002\u307E\u305F\u306F\u3001\u4E0B\u3078\u66F8\u304B\u305A\u306B "${path}" \u3092\u5DEE\u3057\u66FF\u3048\u308B\u304B\u3001<${tag}> \u306B\u306F\u5225\u306E\u30AD\u30FC\u3092\u675F\u306D\u3066\u3001\u6E21\u3057\u305F\u3044\u3068\u304D\u306B\u305D\u306E\u30AD\u30FC\u3078\u30B3\u30D4\u30FC\u3092\u4EE3\u5165\u3057\u3066\u304F\u3060\u3055\u3044\uFF08getter \u306F "${path}" \u306E\u4E0B\u3078\u306E\u66F8\u304D\u8FBC\u307F\u306E\u305F\u3073\u306B\u8AAD\u307F\u76F4\u3055\u308C\u308B\u306E\u3067\u3001<wcs-storage> \u306F\u305D\u306E\u305F\u3073\u306B\u4FDD\u5B58\u3057\u307E\u3059\uFF09`,
13562
13723
  inputNestedWriteOneShot: (tag, input, path, example) => `<${tag}> \u306E\u5165\u529B "${input}" \u306B "${path}" \u3092\u675F\u306D\u3066\u3044\u307E\u3059\u304C\u3001\u30DA\u30FC\u30B8\u306F\u305D\u306E\u4E0B\uFF08"${example}"\uFF09\u3078\u66F8\u304D\u8FBC\u3093\u3067\u3044\u307E\u3059\u3002\u675F\u7E1B\u306F "${path}" \u81EA\u8EAB\u3078\u306E\u4EE3\u5165\u3067\u3057\u304B\u5F53\u3066\u76F4\u3055\u308C\u305A\u3001<${tag}> \u306F\u8981\u6C42\u306E\u305F\u3073\u306B "${input}" \u3092 null \u306B\u623B\u3059\u306E\u3067\u3001\u6B21\u306E\u8981\u6C42\u306F "${input}" \u306A\u3057\u3067\u9001\u3089\u308C\u307E\u3059 \u2014 \u8981\u6C42\u3092\u59CB\u3081\u308B\u30CF\u30F3\u30C9\u30E9\u3067\u65B0\u3057\u3044\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4F5C\u3063\u3066\u4EE3\u5165\u3057\uFF08\`this.submitBody = { \u2026 }\`\uFF09\u3001\u305D\u308C\u3092\u675F\u306D\u3066\u304F\u3060\u3055\u3044`,
13563
13724
  devtoolsAfterState: () => `@wcstack/devtools/auto \u306F @wcstack/state/auto \u3088\u308A\u5148\u306B\u8AAD\u307F\u8FBC\u3093\u3067\u304F\u3060\u3055\u3044\uFF08\u5F8C\u304B\u3089\u3060\u3068\u3001DevTools \u306E\u30BF\u30A4\u30E0\u30E9\u30A4\u30F3\u306F\u4ED8\u3044\u305F\u6642\u70B9\u304B\u3089\u59CB\u307E\u308A\u307E\u3059\u3002\u65E2\u306B\u3042\u308B\u914D\u7DDA\u306F 4.0 \u304C\u9001\u308A\u76F4\u3057\u307E\u3059\uFF09`,
13564
13725
  baseHrefMissing: () => `@wcstack/router \u3092\u4F7F\u3046 SPA \u306B\u306F <head> \u5185\u306E <base href="/">\uFF08\u307E\u305F\u306F\u305D\u308C\u3092\u4F5C\u308B <head> \u306E\u540C\u671F\u30B9\u30AF\u30EA\u30D7\u30C8 \u2014 basename \u306B\u30ED\u30B1\u30FC\u30EB\u3092\u7F6E\u304F\u5F62\uFF09\u304C\u5FC5\u8981\u3067\u3059\uFF08\u7121\u3044\u3068\u30C7\u30A3\u30FC\u30D7\u30EA\u30F3\u30AF\u3067 basename \u304C\u8AA4\u5C0E\u51FA\u3055\u308C\u307E\u3059\uFF09`,
13565
13726
  routerOutletMisplaced: () => `\u3053\u306E <wcs-outlet> \u306F <wcs-router> \u306E\u76F4\u5F8C\u306B\u7121\u3044\u306E\u3067\u3001\u3069\u306E router \u3082\u4F7F\u3044\u307E\u305B\u3093\u3002router \u306F\u81EA\u5206\u306E\u76F4\u5F8C\u306E\u8981\u7D20\u3060\u3051\u3092 outlet \u3068\u3057\u3066\u4F7F\u3044\u3001\u305D\u3053\u306B <wcs-outlet> \u304C\u7121\u3051\u308C\u3070\u81EA\u524D\u306E outlet \u3092\u4F5C\u308A\u307E\u3059\u3002\u30EB\u30FC\u30C8\u306F router \u306E\u76F4\u5F8C\u306B\u63CF\u304B\u308C\u3001\u3053\u306E outlet \u306F\u7A7A\u306E\u307E\u307E\u3067\u3059 \u2014 <wcs-router> \u306E\u76F4\u5F8C\u3078\u79FB\u3057\u3066\u304F\u3060\u3055\u3044`,
13566
13727
  linkQueryKeyIgnored: (toKeys, named) => `\u3053\u306E <wcs-link> \u306E to \u304C\u4ED8\u3051\u308B\u30AD\u30FC\uFF08${toKeys}\uFF09\u306F\u3001\u3069\u308C\u3082 query-keys\uFF08${named}\uFF09\u306B\u3042\u308A\u307E\u305B\u3093\u3002query-keys \u306E\u3042\u308B\u30EA\u30F3\u30AF\u306F\u540D\u6307\u3057\u305F\u30AD\u30FC\u3060\u3051\u3092\u6BD4\u3079\u308B\u306E\u3067\u3001\u30EA\u30F3\u30AF\u81EA\u8EAB\u306E\u30AF\u30A8\u30EA\u306F\u5224\u5B9A\u306B\u52B9\u304B\u305A\u3001${named} \u304C\u5408\u3048\u3070 ${toKeys} \u304C\u4F55\u3067\u3082\u73FE\u5728\u306E\u30EA\u30F3\u30AF\u306B\u306A\u308A\u307E\u3059 \u2014 \u3053\u3046\u66F8\u3044\u305F\u30BF\u30D6\u306F\u540C\u6642\u306B\u3059\u3079\u3066\u73FE\u5728\u306B\u306A\u308A\u307E\u3059\u3002\u30EA\u30F3\u30AF\u304C\u8868\u3059\u30AD\u30FC\u3092\u540D\u6307\u3057\u3066\u304F\u3060\u3055\u3044\uFF08query-keys="${toKeys}"\uFF09`,
13567
- signalsDualEntry: () => `@wcstack/signals \u3068 @wcstack/signals/dom \u304C\u540C\u4E00\u30DA\u30FC\u30B8\u304B\u3089 import \u3055\u308C\u3066\u3044\u307E\u3059\u3002CDN \u3067\u306F\u5404\u30A8\u30F3\u30C8\u30EA\u304C\u81EA\u5DF1\u5B8C\u7D50\u30D0\u30F3\u30C9\u30EB\u306E\u305F\u3081\u30EA\u30A2\u30AF\u30C6\u30A3\u30D6\u30B3\u30A2\u304C\u4E8C\u91CD\u5316\u3057\u3001\u5883\u754C\u3067\u53CD\u5FDC\u304C\u58CA\u308C\u307E\u3059 \u2014 \u3059\u3079\u3066 /dom \u30A8\u30F3\u30C8\u30EA\u304B\u3089 import \u3057\u3066\u304F\u3060\u3055\u3044`,
13728
+ signalsDualEntry: (later, earlier, versions) => versions !== null ? `"${later}" \u3068 "${earlier}" \u306F @wcstack/signals \u306E 2 \u3064\u306E\u7248\uFF08${versions[0]} \u3068 ${versions[1]}\uFF09\u3092\u8AAD\u307F\u8FBC\u307F\u3001\u305D\u308C\u305E\u308C\u304C\u30EA\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B3\u30A2\u3092\u6301\u3061\u307E\u3059\u3002\u7247\u65B9\u306E signal \u3092\u3082\u3046\u7247\u65B9\u306E effect \u306F\u8FFD\u308F\u306A\u3044\u306E\u3067\u3001\u305D\u306E\u9593\u3067\u753B\u9762\u304C\u66F4\u65B0\u3055\u308C\u306A\u304F\u306A\u308A\u3001\u4F55\u3082\u77E5\u3089\u305B\u307E\u305B\u3093\u30021 \u3064\u306E\u7248\u3092\u8AAD\u307F\u8FBC\u307F\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u3092 1 \u3064\u306E\u30A8\u30F3\u30C8\u30EA\u304B\u3089 import \u3057\u3066\u304F\u3060\u3055\u3044 \u2014 @wcstack/signals/dom \u304C\u3059\u3079\u3066\u3092\u6301\u3061\u307E\u3059` : `"${later}" \u3068 "${earlier}" \u306F @wcstack/signals \u306E 2 \u3064\u306E\u30A8\u30F3\u30C8\u30EA\u3067\u3001\u3053\u3053\u3067\u306F\u305D\u308C\u305E\u308C\u304C\u30EA\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B3\u30A2\u3092\u6301\u3061\u307E\u3059\uFF08\u30A8\u30F3\u30C8\u30EA\u3054\u3068\u306B\u675F\u306D\u308B CDN \u2014 esm.run\u30FBjsDelivr \u306E +esm\u30FBesm.sh \u2014 \u304B\u3001\u30D3\u30EB\u30C9\u306E\u9055\u3046\u30D5\u30A1\u30A4\u30EB\uFF09\u3002\u7247\u65B9\u306E signal \u3092\u3082\u3046\u7247\u65B9\u306E effect \u306F\u8FFD\u308F\u306A\u3044\u306E\u3067\u3001\u305D\u306E\u9593\u3067\u753B\u9762\u304C\u66F4\u65B0\u3055\u308C\u306A\u304F\u306A\u308A\u3001\u4F55\u3082\u77E5\u3089\u305B\u307E\u305B\u3093\u3002\u3059\u3079\u3066\u306E\u540D\u524D\u3092 1 \u3064\u306E\u30A8\u30F3\u30C8\u30EA\u304B\u3089 import \u3057\u3066\u304F\u3060\u3055\u3044 \u2014 @wcstack/signals/dom \u304C\u3059\u3079\u3066\u3092\u6301\u3061\u307E\u3059`,
13568
13729
  signalsImportMapBoth: () => `\u3053\u306E import map \u306F @wcstack/signals \u3068 @wcstack/signals/dom \u306E\u4E21\u65B9\u3092\u5272\u308A\u5F53\u3066\u3066\u3044\u307E\u3059\u3002CDN \u3067\u306F\u5404\u30A8\u30F3\u30C8\u30EA\u304C\u30EA\u30A2\u30AF\u30C6\u30A3\u30D6\u30B3\u30A2\u3092\u6301\u3064\u306E\u3067\u3001@wcstack/signals \u3092 import \u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\uFF08\u3053\u306E\u30DA\u30FC\u30B8\u306E\u3082\u306E\u3067\u3082\u3001\u8AAD\u307F\u8FBC\u3080 .js \u3067\u3082\uFF09\u304C 2 \u3064\u76EE\u306E\u30B3\u30A2\u3092\u6301\u3061\u3001\u5883\u754C\u3067\u53CD\u5FDC\u304C\u58CA\u308C\u307E\u3059\u3002@wcstack/signals/dom \u3060\u3051\u3092\u5272\u308A\u5F53\u3066\u3066\u304F\u3060\u3055\u3044\uFF08\u30B3\u30A2\u306E\u5168\u90E8\u3092 export \u3057\u307E\u3059\uFF09`,
13569
13730
  tagPackageMissing: (tags, pkg, url) => `${tags.map((t) => `<${t}>`).join("\u30FB")} \u306F ${pkg} \u306E\u30BF\u30B0\u3067\u3059\u304C\u3001\u3053\u306E\u30DA\u30FC\u30B8\u306F ${pkg} \u306E\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u305B\u3093\u3002\u8981\u7D20\u306F\u5B9A\u7FA9\u3055\u308C\u306A\u3044\u306E\u3067\u3001\u305D\u306E\u675F\u7E1B\u306F\u5F85\u3061\u7D9A\u3051\u3066\u4F55\u3082\u8D77\u304D\u305A\u3001\u30B3\u30F3\u30BD\u30FC\u30EB\u306B\u3082\u4F55\u3082\u51FA\u307E\u305B\u3093 \u2014 <script type="module" src="${url}"></script> \u3067\u8AAD\u307F\u8FBC\u3093\u3067\u304F\u3060\u3055\u3044`,
13570
13731
  linkRouterMissing: (to, n) => `\u3053\u306E\u30DA\u30FC\u30B8\u306B\u306F <wcs-router> \u304C\u7121\u3044\u306E\u3067\u3001\u3053\u306E <wcs-link to="${to}">${n > 1 ? `\uFF08\u3068\u30DA\u30FC\u30B8\u306E\u307B\u304B\u306E ${n - 1} \u500B\uFF09` : ""}\u306F\u63A5\u7D9A\u3057\u305F\u6642\u70B9\u3067 "[@wcstack/router] wcs-link is not connected to a router." \u3092\u6295\u3052\u3001\u30EA\u30F3\u30AF\u306F\u96A0\u308C\u307E\u3059\uFF08display: none\uFF09\u3002router \u306E\u7121\u3044\u30DA\u30FC\u30B8\u3067\u306F <a href="${to}"> \u3068\u66F8\u304F\u304B\u3001<wcs-router> \u3092\u7F6E\u3044\u3066\u304F\u3060\u3055\u3044`,
@@ -13777,6 +13938,10 @@ var en = {
13777
13938
  eventNameCase: (property, lower2) => `"${property}:" listens for an event named "${property.slice(2)}", which nothing dispatches \u2014 DOM event names are lower case. Write "${lower2}:" for the DOM event; a callback "prop" of a part is an event the part dispatches, bound with eventToken.<member>:`,
13778
13939
  inlineImport: (specifier, guard) => `An inline ${guard ? "<wcs-guard-handler>" : "<wcs-state>"} script is evaluated from a blob: URL, against which "${specifier}" does not resolve: the ${guard ? "guard" : "state"} fails to load. Import a full URL or a name the page's import map gives${guard ? "" : ', or move the state into a file (src="./state.js")'}`,
13779
13940
  keyBinding: () => `"key:" sets a property named "key" and does nothing else. No key is needed: rows are matched by the row object, and $listKeys keeps rows across refetched data`,
13941
+ streamSourceMissing: (name) => `$stream entry "${name}" has no source function: the runtime refuses the state when it takes it in ($stream entry "${name}" needs a source function.), so the page fails to initialize and nothing on it is bound. Write source: (args, signal) => \u2026, returning an async iterable or a ReadableStream`,
13942
+ streamFoldWithoutInitial: (name) => `$stream entry "${name}" has a fold and no initial: the runtime refuses the state when it takes it in ($stream entry "${name}": fold needs an initial value.), so the page fails to initialize and nothing on it is bound. Give the value the first chunk is folded onto: initial: "" (or [], {}, 0)`,
13943
+ htmlSinkInput: (binding, control, path) => `"${binding}" puts what the user types into a <${control}> (its value: writes back to the same path) onto the page as markup: <b> turns bold, <img src=x onerror=\u2026> runs script, and what is shown is not what was typed \u2014 unless a filter sanitizes it. Bind it as text: textContent: ${path}`,
13944
+ eventBeforeBinding: (tag, output, attribute) => `<${tag}> starts on its own from its ${attribute}="\u2026" attribute, before the state's file has loaded and bound "eventToken.${output}:": the first ${output} events${tag === "wcs-sse" ? " (the stream's snapshot)" : ""} are dispatched before the token is attached and are lost, without a word. Give it the ${attribute} from the state (${attribute}: <path>) so it starts once the page is bound, or bind the output as a property too (${output}: <path> seeds the state from the element)`,
13780
13945
  radioNameShared: (name, binding) => `Every row's radios get name="${name}", so the browser makes one group of all the rows: only one radio on the whole page stays checked, and the page disagrees with the rows' values from the first render \u2014 nothing says so. ${binding === "radio" ? "Bind a name that differs per row (attr.name: .<a row field>), or drop the name: radio: keeps the radios bound to one path in step without it" : "Bind a name that differs per row (attr.name: .<a row field>) \u2014 or, for one choice over all the rows, bind them all to one path: value: .<the row's id>; radio: <path>"}`,
13781
13946
  numberWrittenAsString: (path, left, asNumber) => `"${path}" is a number in the state, but value: writes back what the element holds, a string: after the user enters 5 the state has "5", and "5" + 1 is "51" \u2014 nothing says so. Convert it on the way in: ${asNumber ? `valueAsNumber: ${path}, or ` : ""}an input filter on the left side, ${left}|number: ${path} (also |int, |float)`,
13782
13947
  twoWayOutputFilter: (prop, filters, left, rhs, keystroke) => keystroke ? `${prop}: is two-way and writes back on every keystroke, and the output filter "${filters}" formats what the state holds each time: the field is rewritten while the user types \u2014 the caret jumps to the end, an IME composition is cut \u2014 and what the state receives is the field's formatted text (an output filter is not undone on the way back). Show the formatted text in another element, write back when the field is committed and format in a setter (${prop}#onchange:), or make the binding one-way: ${prop}#ro: ${rhs}` : `${prop}: is two-way, and nothing undoes the output filter "${filters}" on the way back: the element writes back the formatted value it shows, and the filter is then applied to that. Undo it with an input filter on the left side (${left}|<filter>: \u2026), show the formatted value in another element, or make the binding one-way: ${prop}#ro: ${rhs}`,
@@ -13859,13 +14024,13 @@ var en = {
13859
14024
  storageSeedClobber: (path, raw) => `The <wcs-storage> value-bound slot "${path}" is seeded with ${shortSeed(raw)}. The initial write-back overwrites the persisted value on every load \u2014 add #init=element to the binding (\`value#init=element: ${path}\`) so the stored value wins, and seed the slot with null (what an empty key loads as)`,
13860
14025
  storageInitSeed: (path, raw) => `The <wcs-storage> value-bound slot "${path}" is seeded with ${shortSeed(raw)}, but #init=element pulls the element's value into it. On a first visit (an empty key) that is null, so the seed is replaced by null \u2014 seed it with null and supply the default where you read it (\`this.${path} ?? \u2026\`), or bind an accessor pair whose setter ignores null`,
13861
14026
  storagePairClobber: (path) => `The <wcs-storage> value is bound to the accessor pair "${path}" without #init=element. The state's side goes first, so on every load the getter's starting value is saved over the stored one, and the setter never receives it \u2014 add #init=element (\`value#init=element: ${path}\`)`,
13862
- inputNestedWrite: (tag, input, path, example) => `"${path}" is bound to the input "${input}" of <${tag}>, but the page writes below it ("${example}"). A binding is re-applied only when "${path}" itself is assigned, so those writes never reach <${tag}> \u2014 bind a getter that reads the fields by path (\`this["${example}"]\`, \`$getAll\`) and returns a new value: with a setter beside it to take the element's value in as well (the accessor pair, ${input}#init=element: <getter>), or one way when the element's value is not taken in (${input}#ro: <getter> \u2014 with neither a setter nor #ro, what the element reports is written back to the getter and refused: wcs/path-readonly). Or replace "${path}" instead of writing below it`,
14027
+ inputNestedWrite: (tag, input, path, example) => `"${path}" is bound to the input "${input}" of <${tag}>, but the page writes below it ("${example}"). A binding is re-applied only when "${path}" itself is assigned, so those writes never reach <${tag}> \u2014 bind a getter that reads the fields by path (\`this["${example}"]\`, \`$getAll\`) and returns a new value: with a setter beside it to take the element's value in as well (the accessor pair, ${input}#init=element: <getter>), or one way when the element's value is not taken in (${input}#ro: <getter> \u2014 with neither a setter nor #ro, what the element reports is written back to the getter and refused: wcs/path-readonly). Or replace "${path}" instead of writing below it, or bind a separate key to <${tag}> and assign it a copy when the value should be passed on (a getter is re-read on every write below "${path}": <wcs-storage> would store each one)`,
13863
14028
  inputNestedWriteOneShot: (tag, input, path, example) => `"${path}" is bound to the input "${input}" of <${tag}>, but the page writes below it ("${example}"). A binding is re-applied only when "${path}" itself is assigned, and <${tag}> resets "${input}" to null after every request, so the next request goes without it \u2014 build a new object in the handler that starts the request (\`this.submitBody = { \u2026 }\`) and bind that`,
13864
14029
  devtoolsAfterState: () => `Load @wcstack/devtools/auto before @wcstack/state/auto (loaded later, the DevTools timeline starts when it attaches; 4.0 sends it the wiring that is there already)`,
13865
14030
  baseHrefMissing: () => `An SPA using @wcstack/router needs <base href="/"> in <head>, or a synchronous <head> script that creates one \u2014 the form for a locale in the basename (without it, deep links misderive the basename)`,
13866
14031
  routerOutletMisplaced: () => `This <wcs-outlet> is not right after a <wcs-router>, so no router uses it: a router uses only the element right after it as its outlet, and makes an outlet of its own there when that is not a <wcs-outlet>. The routes render right after the router and this outlet stays empty \u2014 move it right after the <wcs-router>`,
13867
14032
  linkQueryKeyIgnored: (toKeys, named) => `None of the keys this <wcs-link>'s to sets (${toKeys}) is named in query-keys (${named}). A link with query-keys compares only the keys it names, so its own query plays no part: it is current wherever ${named} match, whatever ${toKeys} is \u2014 tabs written this way are all current at once. Name the keys the link is for (query-keys="${toKeys}")`,
13868
- signalsDualEntry: () => `Both @wcstack/signals and @wcstack/signals/dom are imported on this page. On a CDN each entry is a self-contained bundle, so the reactive core is duplicated and reactivity breaks at the seam \u2014 import everything from the single /dom entry`,
14033
+ signalsDualEntry: (later, earlier, versions) => versions !== null ? `"${later}" and "${earlier}" load two versions of @wcstack/signals (${versions[0]} and ${versions[1]}), and each has its own reactive core: a signal of one is not seen by an effect of the other, so the page stops updating across them, without a word. Load one version, and import every name from one entry \u2014 @wcstack/signals/dom has all of them` : `"${later}" and "${earlier}" are two entries of @wcstack/signals that each carry their own reactive core here (a CDN that bundles each entry on its own \u2014 esm.run, jsDelivr's +esm, esm.sh \u2014 or files of two builds): a signal of one is not seen by an effect of the other, so the page stops updating across them, without a word. Import every name from one entry \u2014 @wcstack/signals/dom has all of them`,
13869
14034
  signalsImportMapBoth: () => `This import map maps both @wcstack/signals and @wcstack/signals/dom. On a CDN each entry carries its own reactive core, so a module that imports @wcstack/signals \u2014 this page's, or a .js file it loads \u2014 gets a second core and reactivity breaks at the seam. Map only @wcstack/signals/dom (it exports the whole core)`,
13870
14035
  tagPackageMissing: (tags, pkg, url) => `${tags.map((t) => `<${t}>`).join(", ")} ${tags.length === 1 ? "is a tag" : "are tags"} of ${pkg}, and this page loads no script of ${pkg}: the element is never defined, so its bindings wait and nothing happens, without a word in the console. Load it with <script type="module" src="${url}"></script>`,
13871
14036
  linkRouterMissing: (to, n) => `This page has no <wcs-router>, so this <wcs-link to="${to}">${n > 1 ? ` (and the ${n - 1} other${n > 2 ? "s" : ""} on the page)` : ""} throws "[@wcstack/router] wcs-link is not connected to a router." when it connects, and the link is hidden (display: none). On a page without the router write <a href="${to}">, or add the <wcs-router>`,
@@ -20182,30 +20347,6 @@ function validateDocumentEnv(html, locale2) {
20182
20347
  message: msgs.linkQueryKeyIgnored(link.toKeys.join(" "), link.named.join(" "))
20183
20348
  });
20184
20349
  }
20185
- const refs = collectSignalsRefs(scanText);
20186
- const dom = refs.find((r) => r.kind === "dom");
20187
- const bare = refs.find((r) => r.kind === "bare");
20188
- if (dom && bare) {
20189
- const later = bare.start > dom.start ? bare : dom;
20190
- diagnostics.push({
20191
- code: WcsDiagnosticCode.SignalsDualEntry,
20192
- start: later.start,
20193
- end: later.end,
20194
- severity: "error",
20195
- message: msgs.signalsDualEntry()
20196
- });
20197
- } else {
20198
- const both = findSignalsImportMapBoth(scanText);
20199
- if (both) {
20200
- diagnostics.push({
20201
- code: WcsDiagnosticCode.SignalsDualEntry,
20202
- start: both.start,
20203
- end: both.end,
20204
- severity: "warning",
20205
- message: msgs.signalsImportMapBoth()
20206
- });
20207
- }
20208
- }
20209
20350
  const structure = scanStructure(scanText);
20210
20351
  for (const at2 of structure.bareMustaches) {
20211
20352
  diagnostics.push({
@@ -20227,30 +20368,6 @@ function validateDocumentEnv(html, locale2) {
20227
20368
  }
20228
20369
  return diagnostics;
20229
20370
  }
20230
- function findSignalsImportMapBoth(html) {
20231
- const mapRegex = /<script\b((?:"[^"]*"|'[^']*'|[^>"'])*)>([\s\S]*?)<\/script\s*>/gi;
20232
- let match;
20233
- while ((match = mapRegex.exec(html)) !== null) {
20234
- if (!/\btype\s*=\s*(["'])importmap\1/i.test(match[1])) continue;
20235
- let imports;
20236
- try {
20237
- imports = JSON.parse(match[2]).imports;
20238
- } catch {
20239
- continue;
20240
- }
20241
- if (imports === null || typeof imports !== "object") continue;
20242
- const core = imports["@wcstack/signals"];
20243
- const dom = imports["@wcstack/signals/dom"] ?? imports["@wcstack/signals/"];
20244
- if (typeof core !== "string" || typeof dom !== "string") continue;
20245
- if (core.includes("/dist/") && dom.includes("/dist/")) continue;
20246
- const key = '"@wcstack/signals"';
20247
- const at2 = match[2].indexOf(key);
20248
- const bodyStart = match.index + match[0].indexOf(">") + 1;
20249
- const start = bodyStart + (at2 === -1 ? 0 : at2 + 1);
20250
- return { start, end: start + key.length - 2 };
20251
- }
20252
- return null;
20253
- }
20254
20371
  var SCOPED_AUTO = /@wcstack\/([a-z0-9-]+)(?:@[^/"'\s]+)?\/(?:auto\b|dist\/(?:split\/)?auto(?:\.min)?\.js\b)/;
20255
20372
  var BUNDLE_AUTO = /(?:^|\/)wcstack(?:@[^/"'\s]+)?\/(?:auto\b|dist\/auto\.min\.js\b)/;
20256
20373
  var BUNDLE_PACKAGES = ["state", "router", "fetch", "storage", "autoloader"];
@@ -20273,27 +20390,6 @@ function findWcstackAutoScripts(html) {
20273
20390
  }
20274
20391
  return out;
20275
20392
  }
20276
- function collectSignalsRefs(html) {
20277
- const refs = [];
20278
- const scriptRegex = /<script\b((?:"[^"]*"|'[^']*'|[^>"'])*)>/gi;
20279
- let match;
20280
- while ((match = scriptRegex.exec(html)) !== null) {
20281
- const src = extractSrc(match[0]);
20282
- const kind = src ? classifySignalsSpecifier(src.value) : null;
20283
- if (src && kind) {
20284
- refs.push({
20285
- kind,
20286
- start: match.index + src.offsetInTag,
20287
- end: match.index + src.offsetInTag + src.value.length
20288
- });
20289
- }
20290
- }
20291
- for (const im of collectInlineImports(html)) {
20292
- const kind = classifySignalsSpecifier(im.spec);
20293
- if (kind) refs.push({ kind, start: im.start, end: im.end });
20294
- }
20295
- return refs.sort((a, b) => a.start - b.start);
20296
- }
20297
20393
  function collectInlineImports(html) {
20298
20394
  const out = [];
20299
20395
  const scriptRegex = /<script\b((?:"[^"]*"|'[^']*'|[^>"'])*)>([\s\S]*?)<\/script\s*>/gi;
@@ -20311,10 +20407,6 @@ function collectInlineImports(html) {
20311
20407
  }
20312
20408
  return out;
20313
20409
  }
20314
- function classifySignalsSpecifier(spec) {
20315
- if (!spec.includes("@wcstack/signals")) return null;
20316
- return /@wcstack\/signals\/dom\b/.test(spec) ? "dom" : "bare";
20317
- }
20318
20410
  function extractSrc(openTag2) {
20319
20411
  const srcMatch = /\bsrc\s*=\s*(["'])(.*?)\1/i.exec(openTag2);
20320
20412
  if (!srcMatch) return null;
@@ -20526,6 +20618,7 @@ function namedPackages(text3) {
20526
20618
  if (BUNDLE.test(text3)) out.push("wcstack");
20527
20619
  return out.flatMap((p) => p === "wcstack" ? [...BUNDLE_PACKAGES] : [p]);
20528
20620
  }
20621
+ var IMPORT_SPECIFIER = /(?:\bfrom\s*|\bimport\s*\(?\s*)(["'])([^"'\n]*)\1/g;
20529
20622
  var MAX_FILES3 = 32;
20530
20623
  var MAX_DEPTH2 = 4;
20531
20624
  function validatePackageLoads(html, locale2, fileReader) {
@@ -20545,19 +20638,39 @@ function validatePackageLoads(html, locale2, fileReader) {
20545
20638
  patch: m[4] === void 0 ? 0 : Number(m[4])
20546
20639
  };
20547
20640
  if (newest === null || comparePins(pin, newest.pin) > 0) {
20548
- newest = { pin, start: ref2.start + m.index, end: ref2.start + m.index + m[0].length };
20641
+ newest = { pin, at: siteOf(ref2.start, ref2.file, m.index, m[0].length) };
20549
20642
  }
20550
20643
  }
20551
20644
  }
20552
20645
  if (lint !== null && newest !== null && newest.pin.major === lint.major && newest.pin.minor > lint.minor) {
20553
20646
  out.push({
20554
20647
  code: WcsDiagnosticCode.LintVersionBehind,
20555
- start: newest.start,
20556
- end: newest.end,
20648
+ ...newest.at,
20557
20649
  severity: "warning",
20558
20650
  message: msgs.lintVersionBehind(newest.pin.spec, newest.pin.version, `${newest.pin.major}.${newest.pin.minor}`, ENGINE_VERSION)
20559
20651
  });
20560
20652
  }
20653
+ const dual = findSignalsDualEntry(loads.imported);
20654
+ if (dual !== null) {
20655
+ const { later, earlier, versions } = dual;
20656
+ out.push({
20657
+ code: WcsDiagnosticCode.SignalsDualEntry,
20658
+ ...siteOf(later.start, later.file, 0, later.spec.length),
20659
+ severity: "error",
20660
+ message: msgs.signalsDualEntry(later.spec, earlier.spec, versions)
20661
+ });
20662
+ } else {
20663
+ const both = findSignalsImportMapBoth(scan);
20664
+ if (both !== null) {
20665
+ out.push({
20666
+ code: WcsDiagnosticCode.SignalsDualEntry,
20667
+ start: both.start,
20668
+ end: both.end,
20669
+ severity: "warning",
20670
+ message: msgs.signalsImportMapBoth()
20671
+ });
20672
+ }
20673
+ }
20561
20674
  if (!loads.own || loads.unclear) return out;
20562
20675
  const autoloader = loads.autoloader;
20563
20676
  const components = loads.mapKeys.filter((k) => k.startsWith("@components/"));
@@ -20612,6 +20725,99 @@ function findLinksWithoutRouter(scan) {
20612
20725
  function comparePins(a, b) {
20613
20726
  return a.major - b.major || a.minor - b.minor || a.patch - b.patch;
20614
20727
  }
20728
+ function siteOf(start, file, offset2, length) {
20729
+ if (file === void 0) return { start: start + offset2, end: start + offset2 + length };
20730
+ const position = createPositionMapper(file.text);
20731
+ const from = file.start + offset2;
20732
+ return {
20733
+ start,
20734
+ end: file.anchorEnd,
20735
+ origin: { path: file.path, start: from, end: from + length, startPosition: position(from), endPosition: position(from + length) }
20736
+ };
20737
+ }
20738
+ var SIGNALS_URL = /@wcstack\/signals(?![\w-])(?:@([^/?#"'`\s]+))?(\/[^?#"'`\s]*)?/;
20739
+ var REPO_SIGNALS = /\/packages\/signals\/dist\/([^?#"'`\s]*)/;
20740
+ var BUNDLING_HOST = /^(?:https?:)?\/\/(?:esm\.run|esm\.sh)\//i;
20741
+ var JSDELIVR_NPM = /^(?:https?:)?\/\/cdn\.jsdelivr\.net\/npm\//i;
20742
+ function signalsDistFile(name) {
20743
+ const m = /^(?:(index|dom)|core-[\w-]+)\.esm(\.min)?\.js$/.exec(name);
20744
+ if (m === null) return null;
20745
+ return { entry: m[1] === void 0 ? null : m[1] === "index" ? "." : "dom", build: m[2] === void 0 ? "esm" : "min" };
20746
+ }
20747
+ function signalsLoadOf(target) {
20748
+ if (target === void 0 || !(isUrl(target) || isRelative(target))) return null;
20749
+ const repo = REPO_SIGNALS.exec(target);
20750
+ if (repo !== null) {
20751
+ const file2 = signalsDistFile(repo[1]);
20752
+ return file2 === null ? null : { entry: file2.entry, version: null, bundled: false, build: { dir: `${target.slice(0, repo.index)}/packages/signals/dist/`, kind: file2.build } };
20753
+ }
20754
+ const m = SIGNALS_URL.exec(target);
20755
+ if (m === null) return null;
20756
+ const version3 = m[1] ?? null;
20757
+ const rest = m[2] ?? "";
20758
+ const path = target.replace(/[?#].*$/, "");
20759
+ if (BUNDLING_HOST.test(target) || JSDELIVR_NPM.test(target) && path.endsWith("/+esm")) {
20760
+ const sub = rest.replace(/\/\+esm$/, "").replace(/\/$/, "");
20761
+ const file2 = sub.startsWith("/dist/") ? signalsDistFile(sub.slice("/dist/".length)) : null;
20762
+ const entry = sub === "" ? "." : sub === "/dom" ? "dom" : file2?.entry ?? null;
20763
+ return { entry, version: version3, bundled: true, build: null };
20764
+ }
20765
+ const file = rest.startsWith("/dist/") ? signalsDistFile(rest.slice("/dist/".length)) : null;
20766
+ if (file !== null) {
20767
+ return { entry: file.entry, version: version3, bundled: false, build: { dir: `${target.slice(0, m.index + m[0].length - rest.length)}/dist/`, kind: file.build } };
20768
+ }
20769
+ return { entry: rest === "" ? "." : rest === "/dom" ? "dom" : null, version: version3, bundled: false, build: null };
20770
+ }
20771
+ function twoCores(a, b) {
20772
+ if (a.version !== null && b.version !== null && a.version !== b.version) return "versions";
20773
+ if (a.entry === null || b.entry === null || a.entry === b.entry) return null;
20774
+ if (a.bundled || b.bundled) return "entries";
20775
+ if (a.build === null || b.build === null) return null;
20776
+ if (a.build.dir === b.build.dir) return a.build.kind !== b.build.kind ? "entries" : null;
20777
+ return isUrl(a.build.dir) && isUrl(b.build.dir) ? "entries" : null;
20778
+ }
20779
+ function findSignalsDualEntry(imported) {
20780
+ const seen2 = [];
20781
+ for (const at2 of imported) {
20782
+ const load = signalsLoadOf(at2.target);
20783
+ if (load === null) continue;
20784
+ for (const before of seen2) {
20785
+ const why = twoCores(before.load, load);
20786
+ if (why === null) continue;
20787
+ return { later: at2, earlier: before.at, versions: why === "versions" ? [load.version, before.load.version] : null };
20788
+ }
20789
+ seen2.push({ load, at: at2 });
20790
+ }
20791
+ return null;
20792
+ }
20793
+ function findSignalsImportMapBoth(html) {
20794
+ const mapRegex = /<script\b((?:"[^"]*"|'[^']*'|[^>"'])*)>([\s\S]*?)<\/script\s*>/gi;
20795
+ let match;
20796
+ while ((match = mapRegex.exec(html)) !== null) {
20797
+ if (!/\btype\s*=\s*(["'])importmap\1/i.test(match[1])) continue;
20798
+ let imports;
20799
+ try {
20800
+ imports = JSON.parse(match[2]).imports;
20801
+ } catch {
20802
+ continue;
20803
+ }
20804
+ if (imports === null || typeof imports !== "object") continue;
20805
+ const core = imports["@wcstack/signals"];
20806
+ const dom = imports["@wcstack/signals/dom"] ?? imports["@wcstack/signals/"];
20807
+ if (typeof core !== "string" || typeof dom !== "string") continue;
20808
+ if (core.includes("/dist/") && dom.includes("/dist/")) continue;
20809
+ const key = '"@wcstack/signals"';
20810
+ const at2 = match[2].indexOf(key);
20811
+ const bodyStart = match.index + match[0].indexOf(">") + 1;
20812
+ const start = bodyStart + (at2 === -1 ? 0 : at2 + 1);
20813
+ return { start, end: start + key.length - 2 };
20814
+ }
20815
+ return null;
20816
+ }
20817
+ function loadRulesApply(html, fileReader) {
20818
+ const loads = collectPageLoads(blankHtmlComments(html), fileReader);
20819
+ return loads.imported.some((i) => /@wcstack\/signals(?![\w-])|\/packages\/signals\/dist\//.test(i.target ?? i.spec)) || loads.references.some((r) => [...r.text.matchAll(PINNED)].length > 0);
20820
+ }
20615
20821
  function parseVersion(version3) {
20616
20822
  const m = /^(\d+)\.(\d+)/.exec(version3);
20617
20823
  return m === null ? null : { major: Number(m[1]), minor: Number(m[2]) };
@@ -20654,14 +20860,16 @@ function autoloaderModules(scan, imports) {
20654
20860
  const out = [];
20655
20861
  for (const [key, value] of imports) {
20656
20862
  if (!key.startsWith("@components/") || isUrl(value)) continue;
20863
+ const at2 = scan.indexOf(JSON.stringify(key));
20864
+ const anchor = at2 === -1 ? { start: 0, end: 0 } : { start: at2 + 1, end: at2 + 1 + key.length };
20657
20865
  const body = key.slice("@components/".length);
20658
20866
  if (!body.endsWith("/")) {
20659
- if (!body.startsWith("wcs-")) out.push(pagePath2(value));
20867
+ if (!body.startsWith("wcs-")) out.push({ path: pagePath2(value), ...anchor });
20660
20868
  continue;
20661
20869
  }
20662
20870
  const prefix = body.slice(0, -1).replace(/\|[^/]*$/, "").replace(/\//g, "-");
20663
20871
  for (const tag of tags) {
20664
- if (prefix !== "" && tag.startsWith(`${prefix}-`)) out.push(pagePath2(`${value}${tag.slice(prefix.length + 1)}.js`));
20872
+ if (prefix !== "" && tag.startsWith(`${prefix}-`)) out.push({ path: pagePath2(`${value}${tag.slice(prefix.length + 1)}.js`), ...anchor });
20665
20873
  }
20666
20874
  }
20667
20875
  return out;
@@ -20675,7 +20883,8 @@ function collectPageLoads(scan, fileReader) {
20675
20883
  autoloader: false,
20676
20884
  imports: /* @__PURE__ */ new Map(),
20677
20885
  mapKeys: [],
20678
- references: []
20886
+ references: [],
20887
+ imported: []
20679
20888
  };
20680
20889
  const name = (text3, own3) => {
20681
20890
  const pkgs = namedPackages(text3);
@@ -20683,7 +20892,7 @@ function collectPageLoads(scan, fileReader) {
20683
20892
  if (own3 && pkgs.length > 0) loads.own = true;
20684
20893
  };
20685
20894
  const locals = [];
20686
- const specifiers = [];
20895
+ const written = [];
20687
20896
  const scriptRegex = /<script\b((?:"[^"]*"|'[^']*'|[^>"'])*)>([\s\S]*?)<\/script\s*>/gi;
20688
20897
  let match;
20689
20898
  while ((match = scriptRegex.exec(scan)) !== null) {
@@ -20694,8 +20903,9 @@ function collectPageLoads(scan, fileReader) {
20694
20903
  if (src !== null) {
20695
20904
  const start = match.index + src.offsetInTag;
20696
20905
  loads.references.push({ text: src.value, start });
20906
+ written.push({ spec: src.value, start, inline: false });
20697
20907
  name(src.value, true);
20698
- if (namedPackages(src.value).length === 0 && !isUrl(src.value)) locals.push(pagePath2(src.value));
20908
+ if (namedPackages(src.value).length === 0 && !isUrl(src.value)) locals.push({ path: pagePath2(src.value), start, end: start + src.value.length });
20699
20909
  continue;
20700
20910
  }
20701
20911
  if (type === "importmap") {
@@ -20705,11 +20915,11 @@ function collectPageLoads(scan, fileReader) {
20705
20915
  if (type !== "" && type !== "module" && !/^(?:text|application)\/(?:x-)?(?:javascript|ecmascript)$/.test(type)) continue;
20706
20916
  const body = blankJsComments(match[2]);
20707
20917
  name(body, false);
20708
- for (const im of body.matchAll(/(?:\bfrom\s*|\bimport\s*\(?\s*)(["'])([^"'\n]*)\1/g)) {
20918
+ for (const im of body.matchAll(IMPORT_SPECIFIER)) {
20709
20919
  const start = bodyStart + im.index + im[0].indexOf(im[1]) + 1;
20710
20920
  loads.references.push({ text: im[2], start });
20921
+ written.push({ spec: im[2], start, inline: true });
20711
20922
  name(im[2], true);
20712
- specifiers.push(im[2]);
20713
20923
  }
20714
20924
  }
20715
20925
  for (const m of scan.matchAll(/<link\b((?:"[^"]*"|'[^']*'|[^>"'])*)>/gi)) {
@@ -20717,11 +20927,12 @@ function collectPageLoads(scan, fileReader) {
20717
20927
  const href = attrValue(m[1], "href");
20718
20928
  if (href !== null) name(href, false);
20719
20929
  }
20720
- for (const spec of specifiers) {
20721
- if (namedPackages(spec).length > 0) continue;
20722
- const target = resolveSpecifier(spec, loads.imports);
20930
+ for (const w of written) {
20931
+ const target = w.inline ? resolveSpecifier(w.spec, loads.imports) : w.spec;
20932
+ loads.imported.push({ spec: w.spec, target, start: w.start, end: w.start + w.spec.length });
20933
+ if (!w.inline || namedPackages(w.spec).length > 0) continue;
20723
20934
  if (target === void 0 || namedPackages(target).length > 0 || isUrl(target)) continue;
20724
- if (isRelative(target)) locals.push(pagePath2(target));
20935
+ if (isRelative(target)) locals.push({ path: pagePath2(target), start: w.start, end: w.start + w.spec.length });
20725
20936
  }
20726
20937
  loads.autoloader = loads.pkgs.has("autoloader") || /<wcs-autoloader\b/i.test(scan);
20727
20938
  if (loads.autoloader) locals.push(...autoloaderModules(scan, loads.imports));
@@ -20770,9 +20981,9 @@ function readLocalModules(entries, fileReader, loads) {
20770
20981
  return;
20771
20982
  }
20772
20983
  const seen2 = /* @__PURE__ */ new Set();
20773
- const queue = entries.map((spec) => ({ spec, from: "", depth: 0 }));
20984
+ const queue = entries.map((entry) => ({ spec: entry.path, from: "", depth: 0, start: entry.start, end: entry.end }));
20774
20985
  while (queue.length > 0) {
20775
- const { spec, from, depth } = queue.shift();
20986
+ const { spec, from, depth, start, end } = queue.shift();
20776
20987
  const path = joinModulePath(from, spec);
20777
20988
  if (seen2.has(path)) continue;
20778
20989
  if (seen2.size >= MAX_FILES3 || depth > MAX_DEPTH2) {
@@ -20787,14 +20998,25 @@ function readLocalModules(entries, fileReader, loads) {
20787
20998
  }
20788
20999
  for (const p of namedPackages(text3)) loads.pkgs.add(p);
20789
21000
  for (const m of text3.matchAll(/["'`](wcs-[a-z0-9-]+)["'`]/g)) loads.definedTags.add(m[1]);
20790
- for (const im of text3.matchAll(/(?:\bfrom\s*|\bimport\s*\(?\s*)(["'])([^"'\n]*)\1/g)) {
21001
+ for (const im of text3.matchAll(IMPORT_SPECIFIER)) {
20791
21002
  if (namedPackages(im[2]).length > 0) continue;
20792
21003
  const target = resolveSpecifier(im[2], loads.imports);
20793
21004
  if (target === void 0 || namedPackages(target).length > 0 || isUrl(target) || !isRelative(target)) continue;
20794
- queue.push({ spec: target, from: isRelative(im[2]) ? path : "", depth: depth + 1 });
21005
+ queue.push({ spec: target, from: isRelative(im[2]) ? path : "", depth: depth + 1, start, end });
21006
+ }
21007
+ for (const im of blankJsComments(text3).matchAll(IMPORT_SPECIFIER)) {
21008
+ const at2 = im.index + im[0].indexOf(im[1]) + 1;
21009
+ const file = { path, text: text3, start: at2, end: at2 + im[2].length, anchorEnd: end };
21010
+ loads.imported.push({ spec: im[2], target: moduleTarget(im[2], path, loads.imports), start, end, file });
21011
+ loads.references.push({ text: im[2], start, file });
20795
21012
  }
20796
21013
  }
20797
21014
  }
21015
+ function moduleTarget(spec, from, imports) {
21016
+ if (!spec.startsWith("./") && !spec.startsWith("../")) return resolveSpecifier(spec, imports);
21017
+ const path = joinModulePath(from, spec);
21018
+ return path === void 0 ? void 0 : pagePath2(path);
21019
+ }
20798
21020
 
20799
21021
  // src/service/watchDeclarationValidator.ts
20800
21022
  var STATE_NAME_SEPARATOR = "@";
@@ -22432,6 +22654,138 @@ function validateCollectionMutations(html, stateTagName = "wcs-state", locale2)
22432
22654
  return out;
22433
22655
  }
22434
22656
 
22657
+ // src/service/streamDeclarationValidator.ts
22658
+ function validateStreamDeclarations(html, stateTagName = "wcs-state", locale2) {
22659
+ if (!html.includes("$stream")) return [];
22660
+ const msgs = getMessages(locale2);
22661
+ const out = [];
22662
+ for (const element2 of parseWcsStateElements(html, stateTagName)) {
22663
+ if (element2.bindComponent || element2.mountPath !== null) continue;
22664
+ for (const block of element2.scriptBlocks) {
22665
+ if (!block.content.includes("$stream")) continue;
22666
+ for (const entry of analyzeStreamEntries(block.content)) {
22667
+ if (entry.keys === null) continue;
22668
+ const message = !entry.keys.includes("source") ? msgs.streamSourceMissing(entry.name) : entry.keys.includes("fold") && !entry.keys.includes("initial") ? msgs.streamFoldWithoutInitial(entry.name) : null;
22669
+ if (message === null) continue;
22670
+ out.push({
22671
+ code: WcsDiagnosticCode.StreamDeclaration,
22672
+ start: block.contentStart + entry.start,
22673
+ end: block.contentStart + entry.end,
22674
+ message,
22675
+ severity: "error"
22676
+ });
22677
+ }
22678
+ }
22679
+ }
22680
+ return out;
22681
+ }
22682
+
22683
+ // src/service/htmlSinkInputValidator.ts
22684
+ var HTML_SINKS = /* @__PURE__ */ new Set(["html", "innerHTML", "outerHTML", "srcdoc"]);
22685
+ function validateHtmlSinkInputs(html, bindAttribute = "data-wcs", locale2) {
22686
+ const attrs = findAllBindAttributes(html, bindAttribute);
22687
+ if (!attrs.some((attr) => attr.tagName === "input" || attr.tagName === "textarea" || attr.tagName === "select")) return [];
22688
+ const written = /* @__PURE__ */ new Map();
22689
+ for (const attr of attrs) {
22690
+ const tag = attr.tagName;
22691
+ if (tag !== "input" && tag !== "textarea" && tag !== "select") continue;
22692
+ if (tag === "input") {
22693
+ const type = (attr.inputType ?? "text").toLowerCase();
22694
+ if (NOT_ENTERED.has(type) || NOT_TYPED.has(type) || type === "number") continue;
22695
+ }
22696
+ for (const binding of splitBindingExpressions(attr.value)) {
22697
+ const p = parseBindingExpression(binding);
22698
+ if (p.path === null || propertyName(p.property) !== "value" || !writesBack(attr, "value", p.property)) continue;
22699
+ const path = expandRowPath2(p.path.trim(), html, attr.valueStart, bindAttribute);
22700
+ if (path !== null && !written.has(path)) written.set(path, tag);
22701
+ }
22702
+ }
22703
+ if (written.size === 0) return [];
22704
+ const msgs = getMessages(locale2);
22705
+ const out = [];
22706
+ for (const attr of attrs) {
22707
+ let pos = 0;
22708
+ for (const binding of splitBindingExpressions(attr.value)) {
22709
+ const bindingStart = attr.valueStart + pos;
22710
+ pos += binding.length + 1;
22711
+ const p = parseBindingExpression(binding);
22712
+ if (p.path === null || !HTML_SINKS.has(propertyName(p.property))) continue;
22713
+ const path = p.path.trim();
22714
+ const statePath = expandRowPath2(path, html, attr.valueStart, bindAttribute);
22715
+ const control = statePath === null ? void 0 : written.get(statePath);
22716
+ if (control === void 0) continue;
22717
+ const colon = indexOfOutsideQuotes2(binding, ":");
22718
+ const pathStart = bindingStart + binding.indexOf(path, colon + 1);
22719
+ out.push({
22720
+ code: WcsDiagnosticCode.HtmlSinkInput,
22721
+ start: pathStart,
22722
+ end: pathStart + path.length,
22723
+ message: msgs.htmlSinkInput(`${binding.slice(0, colon).trim()}: ${binding.slice(colon + 1).trim()}`, control, path),
22724
+ severity: "warning",
22725
+ statePath
22726
+ });
22727
+ }
22728
+ }
22729
+ return out;
22730
+ }
22731
+
22732
+ // src/service/eventBeforeBindingValidator.ts
22733
+ var STARTED_BY = {
22734
+ "wcs-sse": "url",
22735
+ "wcs-ws": "url",
22736
+ "wcs-broadcast": "name"
22737
+ };
22738
+ function validateEventsBeforeBinding(html, bindAttribute = "data-wcs", stateTagName = "wcs-state", locale2) {
22739
+ if (!/<wcs-(?:sse|ws|broadcast)\b/i.test(html) || !html.toLowerCase().includes(`<${stateTagName.toLowerCase()}`)) return [];
22740
+ const msgs = getMessages(locale2);
22741
+ const out = [];
22742
+ let insideTemplate = null;
22743
+ for (const region of findStartTagRegions(html)) {
22744
+ const attribute = STARTED_BY[region.tagName];
22745
+ if (attribute === void 0) continue;
22746
+ const events = BUILTIN_TAGS[region.tagName]?.events ?? [];
22747
+ if (events.length === 0) continue;
22748
+ const attributes = writtenAttributes(html, region.start, region.end);
22749
+ const bind = attributes.find((a) => a.name === bindAttribute.toLowerCase());
22750
+ if (bind === void 0 || bind.value === null || !bind.value.includes("eventToken.")) continue;
22751
+ if (attributes.some((a) => a.name === "manual")) continue;
22752
+ const literal2 = attributes.find((a) => a.name === attribute);
22753
+ if (literal2 === void 0 || literal2.value === null || literal2.value.trim() === "") continue;
22754
+ const eq3 = /=\s*["']?/.exec(html.slice(bind.start, bind.end));
22755
+ const valueStart = bind.start + eq3.index + eq3[0].length;
22756
+ const bindings = [];
22757
+ let pos = 0;
22758
+ for (const binding of splitBindingExpressions(bind.value)) {
22759
+ const p = parseBindingExpression(binding);
22760
+ const property = p.property.trim();
22761
+ const leading = binding.length - binding.trimStart().length;
22762
+ bindings.push({ name: propertyName(property), start: valueStart + pos + leading, property });
22763
+ pos += binding.length + 1;
22764
+ }
22765
+ const names2 = new Set(bindings.map((b) => b.name));
22766
+ if (names2.has(attribute) || names2.has(`attr.${attribute}`)) continue;
22767
+ if (bindings.some((b) => b.property === "...")) continue;
22768
+ const token = bindings.find((b) => {
22769
+ if (!b.name.startsWith("eventToken.")) return false;
22770
+ const output2 = b.name.slice("eventToken.".length);
22771
+ return events.includes(output2) && !names2.has(output2);
22772
+ });
22773
+ if (token === void 0) continue;
22774
+ if ((insideTemplate ??= createTemplateTester(html))(region.start)) continue;
22775
+ const output = token.name.slice("eventToken.".length);
22776
+ out.push({
22777
+ code: WcsDiagnosticCode.EventBeforeBinding,
22778
+ start: token.start,
22779
+ end: token.start + token.property.length,
22780
+ message: msgs.eventBeforeBinding(region.tagName, output, attribute),
22781
+ severity: "warning",
22782
+ tag: region.tagName,
22783
+ member: output
22784
+ });
22785
+ }
22786
+ return out;
22787
+ }
22788
+
22435
22789
  // src/service/moduleTopReadValidator.ts
22436
22790
  var GUARD_TAG2 = "wcs-guard-handler";
22437
22791
  var STORAGES = /* @__PURE__ */ new Set(["localStorage", "sessionStorage"]);
@@ -22803,6 +23157,30 @@ function parseJsonWithSpans(text3) {
22803
23157
  }
22804
23158
  }
22805
23159
 
23160
+ // src/core/sidecar/statePaths.ts
23161
+ function segmentsOf(path) {
23162
+ const norm = path.replace(/\\/g, "/");
23163
+ const absolute = norm.startsWith("/") || /^[A-Za-z]:\//.test(norm);
23164
+ const segments = [];
23165
+ for (const segment of norm.split("/")) {
23166
+ if (segment === "" || segment === ".") continue;
23167
+ if (segment === ".." && segments.length > 0 && segments[segments.length - 1] !== "..") segments.pop();
23168
+ else segments.push(/^[A-Za-z]:$/.test(segment) ? segment.toUpperCase() : segment);
23169
+ }
23170
+ return { absolute, segments };
23171
+ }
23172
+ function sameStateFile(a, b) {
23173
+ const canonical = (p) => p.replace(/\.ts$/, ".js").replace(/\.mts$/, ".mjs");
23174
+ return canonical(a) === canonical(b);
23175
+ }
23176
+ function differentStateFiles(manifestA, stateSourceA, manifestB, stateSourceB) {
23177
+ const a = segmentsOf(manifestA);
23178
+ const b = segmentsOf(manifestB);
23179
+ if (a.absolute !== b.absolute) return false;
23180
+ const file = (manifest2, stateSource) => segmentsOf([...manifest2.slice(0, -1), stateSource].join("/")).segments.join("/");
23181
+ return !sameStateFile(file(a.segments, stateSourceA), file(b.segments, stateSourceB));
23182
+ }
23183
+
22806
23184
  // src/core/sidecar/types.ts
22807
23185
  var SUPPORTED_SCHEMA_VERSION = 2;
22808
23186
  var SUPPORTED_NAMESPACE_VERSION = 2;
@@ -22895,9 +23273,8 @@ function resolvePackageContracts(loaded) {
22895
23273
  const collided = /* @__PURE__ */ new Set();
22896
23274
  const firstSource = /* @__PURE__ */ new Map();
22897
23275
  const filterOwner = /* @__PURE__ */ new Map();
22898
- let schemaOwner;
22899
- let schemaWinner;
22900
- let schemaStateSource;
23276
+ const schemaEntries = [];
23277
+ let schemaCollided = false;
22901
23278
  let hasApplicationArtifact = false;
22902
23279
  for (const lm of loaded) {
22903
23280
  if (lm.manifest === null) continue;
@@ -22956,16 +23333,21 @@ function resolvePackageContracts(loaded) {
22956
23333
  if (lm.manifest.kind === "application" && application?.stateSchema !== void 0) {
22957
23334
  const schema = application.stateSchema;
22958
23335
  if (schema !== null && typeof schema === "object" && !Array.isArray(schema)) {
22959
- if (schemaOwner === void 0) {
22960
- schemaOwner = lm.artifact.source;
22961
- schemaWinner = schema;
22962
- schemaStateSource = application.stateSource;
23336
+ const stateSource = typeof application.stateSource === "string" && application.stateSource.trim() !== "" ? application.stateSource.trim() : void 0;
23337
+ const entry = {
23338
+ schema,
23339
+ source: lm.artifact.source,
23340
+ ...stateSource !== void 0 ? { stateSource } : {}
23341
+ };
23342
+ const other = schemaEntries.find((e) => !(e.stateSource !== void 0 && entry.stateSource !== void 0 && differentStateFiles(e.source, e.stateSource, entry.source, entry.stateSource)));
23343
+ if (other === void 0) {
23344
+ schemaEntries.push(entry);
22963
23345
  } else {
22964
- schemaWinner = void 0;
23346
+ schemaCollided = true;
22965
23347
  ctxFor(lm).add(
22966
23348
  WcsDiagnosticCode.ManifestStateCollision,
22967
23349
  pointer("manifestExtensions", "wcstack.application", "stateSchema"),
22968
- `Multiple application artifacts declare a stateSchema (also in "${schemaOwner}"); neither is used.`,
23350
+ `Multiple application artifacts declare a stateSchema (also in "${other.source}"); neither is used.`,
22969
23351
  "error",
22970
23352
  void 0,
22971
23353
  true
@@ -22979,12 +23361,14 @@ function resolvePackageContracts(loaded) {
22979
23361
  const kept = diags.filter((d) => !(d.code === WcsDiagnosticCode.ManifestOverride && d.tag !== void 0 && collided.has(d.tag)));
22980
23362
  if (kept.length > 0) diagnosticsBySource.set(source, kept);
22981
23363
  }
22982
- const stateSource = schemaWinner !== void 0 && typeof schemaStateSource === "string" && schemaStateSource.trim() !== "" ? schemaStateSource.trim() : void 0;
23364
+ const schemas = schemaCollided ? [] : schemaEntries;
23365
+ const single = schemas.length === 1 ? schemas[0] : void 0;
22983
23366
  return {
22984
23367
  tags: winners,
22985
- applicationSchema: schemaWinner,
22986
- ...schemaWinner !== void 0 ? { applicationSchemaSource: schemaOwner } : {},
22987
- ...stateSource !== void 0 ? { applicationStateSource: stateSource } : {},
23368
+ applicationSchema: single?.schema,
23369
+ ...single !== void 0 ? { applicationSchemaSource: single.source } : {},
23370
+ ...single?.stateSource !== void 0 ? { applicationStateSource: single.stateSource } : {},
23371
+ applicationSchemas: schemas,
22988
23372
  hasApplicationArtifact,
22989
23373
  diagnosticsBySource
22990
23374
  };
@@ -23026,17 +23410,6 @@ function applicationStateSourceOf(loaded) {
23026
23410
  const stateSource = manifest2.manifestExtensions?.["wcstack.application"]?.stateSource;
23027
23411
  return typeof stateSource === "string" && stateSource.trim() !== "" ? stateSource.trim() : void 0;
23028
23412
  }
23029
- function segmentsOf(path) {
23030
- const norm = path.replace(/\\/g, "/");
23031
- const absolute = norm.startsWith("/") || /^[A-Za-z]:\//.test(norm);
23032
- const segments = [];
23033
- for (const segment of norm.split("/")) {
23034
- if (segment === "" || segment === ".") continue;
23035
- if (segment === ".." && segments.length > 0 && segments[segments.length - 1] !== "..") segments.pop();
23036
- else segments.push(/^[A-Za-z]:$/.test(segment) ? segment.toUpperCase() : segment);
23037
- }
23038
- return { absolute, segments };
23039
- }
23040
23413
  function stateSourceFromPage(pageSource, manifestSource, stateSource) {
23041
23414
  const page = segmentsOf(pageSource);
23042
23415
  const manifest2 = segmentsOf(manifestSource);
@@ -23047,10 +23420,6 @@ function stateSourceFromPage(pageSource, manifestSource, stateSource) {
23047
23420
  while (common < dir.length && common < target.length && dir[common] === target[common] && dir[common] !== "..") common++;
23048
23421
  return [...dir.slice(common).map(() => ".."), ...target.slice(common)].join("/");
23049
23422
  }
23050
- function sameStateFile(a, b) {
23051
- const canonical = (p) => p.replace(/\.ts$/, ".js").replace(/\.mts$/, ".mjs");
23052
- return canonical(a) === canonical(b);
23053
- }
23054
23423
  function schemaAppliesToPage(html, stateTagName, stateSource, fileReader) {
23055
23424
  const roots = parseWcsStateElements(html, stateTagName).filter((e) => e.mountPath === null && !e.bindComponent && e.srcAttr !== void 0);
23056
23425
  if (roots.length === 0) return false;
@@ -23477,6 +23846,8 @@ function validateText(text3, options, applicationSchema, env) {
23477
23846
  out.push(...validateBindingHosts(text3, bindAttribute, stateTagName, locale2));
23478
23847
  out.push(...validateIoAttributes(text3, bindAttribute, locale2));
23479
23848
  out.push(...validateCommandArguments(text3, bindAttribute, locale2));
23849
+ out.push(...validateHtmlSinkInputs(text3, bindAttribute, locale2));
23850
+ out.push(...validateEventsBeforeBinding(text3, bindAttribute, stateTagName, locale2));
23480
23851
  if (env !== null) {
23481
23852
  out.push(...validateDocumentEnv(env, locale2));
23482
23853
  out.push(...validatePackageLoads(env, locale2, fileReader));
@@ -23494,6 +23865,7 @@ function validateText(text3, options, applicationSchema, env) {
23494
23865
  out.push(...validateCollectionMutations(text3, stateTagName, locale2));
23495
23866
  out.push(...validateModuleTopReads(text3, stateTagName, locale2));
23496
23867
  out.push(...validateWatchDeclarations(text3, stateTagName, locale2, fileReader, bindAttribute, applicationSchema));
23868
+ out.push(...validateStreamDeclarations(text3, stateTagName, locale2));
23497
23869
  out.push(...validateScanDeclarations(text3, stateTagName, locale2));
23498
23870
  out.push(...validateRecursion(text3, stateTagName, locale2));
23499
23871
  out.push(...validateConfigDeclarations(text3, stateTagName, locale2));
@@ -23650,6 +24022,7 @@ function validateManifestSet(input) {
23650
24022
  resolvedSchema: resolved.applicationSchema,
23651
24023
  ...resolved.applicationSchemaSource !== void 0 ? { resolvedSchemaSource: resolved.applicationSchemaSource } : {},
23652
24024
  ...resolved.applicationStateSource !== void 0 ? { resolvedStateSource: resolved.applicationStateSource } : {},
24025
+ resolvedSchemas: resolved.applicationSchemas,
23653
24026
  hasApplicationArtifact: resolved.hasApplicationArtifact
23654
24027
  };
23655
24028
  }
@@ -23666,12 +24039,27 @@ function hasAnythingToCheck(text3, bindAttribute, stateTagName) {
23666
24039
  return text3.includes(bindAttribute) || /<wcs-/i.test(text3) || text3.includes(`<${stateTagName}`) || /@wcstack\/|\bwcstack(?:@[\w.-]+)?\/auto\b/.test(text3);
23667
24040
  }
23668
24041
  var severityLabel = { error: "error", warning: "warning", info: "info" };
24042
+ function explicitSchemaFor(input, schemas, stateTagName) {
24043
+ if (schemas.length === 1) {
24044
+ const [only] = schemas;
24045
+ return {
24046
+ schema: only.schema,
24047
+ stateSource: only.stateSource === void 0 ? void 0 : stateSourceFromPage(input.source, only.source, only.stateSource)
24048
+ };
24049
+ }
24050
+ for (const entry of schemas) {
24051
+ const stateSource = stateSourceFromPage(input.source, entry.source, entry.stateSource);
24052
+ if (stateSource !== void 0 && schemaAppliesToPage(input.text, stateTagName, stateSource, input.fileReader)) {
24053
+ return { schema: entry.schema, stateSource };
24054
+ }
24055
+ }
24056
+ return void 0;
24057
+ }
23669
24058
  function runValidation(inputs, options = {}) {
23670
24059
  const diagnosticsBySource = /* @__PURE__ */ new Map();
23671
24060
  const textBySource = new Map(inputs.map((i) => [i.source, i.text]));
23672
24061
  const manifestInputs = inputs.filter((i) => i.kind === "manifest");
23673
- let explicitSchema;
23674
- let explicitStateSource;
24062
+ let explicitSchemas = [];
23675
24063
  let haveExplicitApplication = false;
23676
24064
  if (manifestInputs.length > 0) {
23677
24065
  const result = validateManifestSet({
@@ -23683,21 +24071,19 @@ function runValidation(inputs, options = {}) {
23683
24071
  }
23684
24072
  if (result.hasApplicationArtifact) {
23685
24073
  haveExplicitApplication = true;
23686
- explicitSchema = result.resolvedSchema;
23687
- if (result.resolvedSchemaSource !== void 0 && result.resolvedStateSource !== void 0) {
23688
- explicitStateSource = { manifest: result.resolvedSchemaSource, stateSource: result.resolvedStateSource };
23689
- }
24074
+ explicitSchemas = result.resolvedSchemas;
23690
24075
  }
23691
24076
  }
23692
24077
  const inFiles = /* @__PURE__ */ new Map();
23693
24078
  const nothingToCheck = [];
23694
24079
  for (const input of inputs) {
23695
24080
  if (input.kind !== "html") continue;
23696
- if (!hasAnythingToCheck(input.text, options.bindAttribute ?? "data-wcs", options.stateTagName ?? "wcs-state")) {
24081
+ if (!hasAnythingToCheck(input.text, options.bindAttribute ?? "data-wcs", options.stateTagName ?? "wcs-state") && !loadRulesApply(input.text, input.fileReader)) {
23697
24082
  nothingToCheck.push(input.source);
23698
24083
  }
23699
- let applicationSchema = explicitSchema;
23700
- let applicationStateSource = explicitStateSource === void 0 ? void 0 : stateSourceFromPage(input.source, explicitStateSource.manifest, explicitStateSource.stateSource);
24084
+ const explicit = explicitSchemaFor(input, explicitSchemas, options.stateTagName ?? "wcs-state");
24085
+ let applicationSchema = explicit?.schema;
24086
+ let applicationStateSource = explicit?.stateSource;
23701
24087
  if (!haveExplicitApplication && input.fileReader !== void 0) {
23702
24088
  const discovered = discoverApplicationManifest(input.fileReader);
23703
24089
  applicationSchema = discovered?.schema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wcstack/lint",
3
- "version": "4.31.0",
3
+ "version": "4.33.0",
4
4
  "description": "Static-contract validator CLI (wcs-validate) for wcstack data-wcs bindings and wcstack.manifest.json sidecars. Thin npm wrapper around the wcstack-intellisense validator core.",
5
5
  "type": "module",
6
6
  "bin": {