@wcstack/lint 4.32.0 → 4.34.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 +14 -0
- package/README.md +14 -0
- package/dist/cli.cjs +580 -120
- package/package.json +1 -1
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
|
-
//
|
|
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
|
// パッケージのスクリプトを読み込んでいない。要素は定義されず、束縛は待ち続け、コンソールにも何も出ない(継ぎ目アプリ
|
|
@@ -615,7 +638,15 @@ var WcsDiagnosticCode = {
|
|
|
615
638
|
DccAttribute: "wcs/dcc-attribute",
|
|
616
639
|
// `<wcs-state mount="...">` の値が runtime の validateVolumeMountPath で raise する形
|
|
617
640
|
// (空・空セグメント・ワイルドカード・予約文字 $ # @)。runtime と同条件・同文言(v2)。
|
|
618
|
-
MountPathInvalid: "wcs/mount-path-invalid"
|
|
641
|
+
MountPathInvalid: "wcs/mount-path-invalid",
|
|
642
|
+
// --- 5.0 の予告(4.x の最後の minor。docs/v5-direction-2026-11.md §4.1、docs/migration-v5.md) ---
|
|
643
|
+
// 5.0 で既定が変わるものを、マークアップとスクリプトから読める範囲で知らせる(service/v5MigrationValidator.ts):
|
|
644
|
+
// リテラルの `*` を含む `$postUpdate`(4.x は呼んだ側の行、5.0 はすべての行)、`<wcs-storage>` の `key`(5.0 は
|
|
645
|
+
// `storage-key` だけ)、`attr.on*:`(5.0 は拒む)、要素のほかの入力より前に書いた `trigger:`(5.0 は入力を先に当てる)、
|
|
646
|
+
// `$behavior` の `sameValueGuard: false` / `enableDirectionalInitialSync: false`(5.0 で無くなる)。走らせないと
|
|
647
|
+
// 分からないもの(同じ id の取り直し、保存値の上書き、防がれなかった送信)は、@wcstack/state の v5-migration の後付けが
|
|
648
|
+
// 同じ code で実行時に言う。3.5 の lint が 4.0 を `wcs/v4-migration` で予告したのと同じ形。info。
|
|
649
|
+
V5Migration: "wcs/v5-migration"
|
|
619
650
|
};
|
|
620
651
|
function sortDiagnostics(diagnostics) {
|
|
621
652
|
const severityRank = { error: 0, warning: 1, info: 2 };
|
|
@@ -2120,7 +2151,7 @@ var config = {
|
|
|
2120
2151
|
locale: typeof document !== "undefined" ? document.documentElement?.lang || "en" : "en",
|
|
2121
2152
|
enableContractAnalyzer: false
|
|
2122
2153
|
};
|
|
2123
|
-
var FEATURE_NAMES = ["formats", "diagnostics", "temporal", "list-keys", "scopes", "recursion", "ssr", "devtools", "native-commands", "release", "forms"];
|
|
2154
|
+
var FEATURE_NAMES = ["formats", "diagnostics", "temporal", "list-keys", "scopes", "recursion", "ssr", "devtools", "native-commands", "release", "forms", "v5-migration"];
|
|
2124
2155
|
var NATIVE_COMMANDS = {
|
|
2125
2156
|
"*": ["focus", "blur", "click", "scrollIntoView", "showPopover", "hidePopover", "togglePopover"],
|
|
2126
2157
|
"dialog": ["show", "showModal", "close", "requestClose"],
|
|
@@ -2687,7 +2718,7 @@ function getWcsManifest() {
|
|
|
2687
2718
|
}
|
|
2688
2719
|
|
|
2689
2720
|
// ../state/package.json
|
|
2690
|
-
var version = "4.
|
|
2721
|
+
var version = "4.34.0";
|
|
2691
2722
|
|
|
2692
2723
|
// src/service/wcsManifest.ts
|
|
2693
2724
|
var ENGINE_VERSION = version;
|
|
@@ -9539,6 +9570,7 @@ function withImportedTypes(typedefs, script, location) {
|
|
|
9539
9570
|
|
|
9540
9571
|
// src/service/stateAnalyzer.ts
|
|
9541
9572
|
var RESERVED_STREAMS_KEYS = /* @__PURE__ */ new Set(["$stream", "$streams"]);
|
|
9573
|
+
var RESERVED_STREAM_KEY = "$stream";
|
|
9542
9574
|
var RESERVED_COMMAND_TOKENS_KEY = "$commandTokens";
|
|
9543
9575
|
var RESERVED_EVENT_TOKENS_KEY = "$eventTokens";
|
|
9544
9576
|
var RESERVED_LIST_KEYS_KEY = "$listKeys";
|
|
@@ -9714,6 +9746,79 @@ function analyzeHandlerSources(scriptContent, key) {
|
|
|
9714
9746
|
function analyzeListKeyEntries(scriptContent) {
|
|
9715
9747
|
return analyzeObjectEntries(scriptContent, RESERVED_LIST_KEYS_KEY).map((entry) => ({ key: entry.key, start: entry.start, end: entry.end }));
|
|
9716
9748
|
}
|
|
9749
|
+
function analyzeStreamEntries(scriptContent) {
|
|
9750
|
+
const root = locateDefaultExportObject(scriptContent);
|
|
9751
|
+
if (!root) return [];
|
|
9752
|
+
const declaration = parseTopLevelProperties(root.content).filter((p) => p.name === RESERVED_STREAM_KEY).at(-1);
|
|
9753
|
+
if (!declaration || declaration.kind !== "data" || !declaration.value || !isObjectLiteral(declaration.value) || declaration.valueStart === void 0 || declaration.nameStart === void 0) {
|
|
9754
|
+
return [];
|
|
9755
|
+
}
|
|
9756
|
+
if (spreadStarts(root.content).some((at2) => at2 > declaration.nameStart)) return [];
|
|
9757
|
+
const inner = extractObjectContent(declaration.value);
|
|
9758
|
+
const innerStart = root.start + declaration.valueStart + 1;
|
|
9759
|
+
const spreads = spreadStarts(inner);
|
|
9760
|
+
const entries = parseTopLevelProperties(inner);
|
|
9761
|
+
const out = [];
|
|
9762
|
+
entries.forEach((entry, i) => {
|
|
9763
|
+
if (entry.kind !== "data" || entry.nameStart === void 0 || entry.nameEnd === void 0 || entry.value === void 0) return;
|
|
9764
|
+
if (spreads.some((at2) => at2 > entry.nameStart)) return;
|
|
9765
|
+
if (entries.slice(i + 1).some((later) => later.name === entry.name)) return;
|
|
9766
|
+
out.push({
|
|
9767
|
+
name: entry.name,
|
|
9768
|
+
start: innerStart + entry.nameStart,
|
|
9769
|
+
end: innerStart + entry.nameEnd,
|
|
9770
|
+
keys: literalKeyNames(entry.value)
|
|
9771
|
+
});
|
|
9772
|
+
});
|
|
9773
|
+
return out;
|
|
9774
|
+
}
|
|
9775
|
+
function literalKeyNames(value) {
|
|
9776
|
+
const text3 = value.trim();
|
|
9777
|
+
if (!text3.startsWith("{")) return null;
|
|
9778
|
+
const scan = maskCommentsAndStrings(text3);
|
|
9779
|
+
const close = matchingBrace(scan, 0);
|
|
9780
|
+
if (close < 0) return null;
|
|
9781
|
+
const rest = blankCommentMarks(scan.slice(close + 1)).trim();
|
|
9782
|
+
if (rest !== "" && !/^(?:as|satisfies)\b/.test(rest)) return null;
|
|
9783
|
+
const content = text3.slice(1, close);
|
|
9784
|
+
for (const segment of topLevelSegments(blankCommentMarks(scan.slice(1, close)))) {
|
|
9785
|
+
if (/^\s*\.\.\./.test(segment) || /^\s*(?:(?:get|set|async|static)\s+)?\*?\s*\[/.test(segment)) return null;
|
|
9786
|
+
}
|
|
9787
|
+
return withShorthands(content, parseTopLevelProperties(content)).map((p) => p.name);
|
|
9788
|
+
}
|
|
9789
|
+
function blankCommentMarks(scan) {
|
|
9790
|
+
return scan.replace(/\/\*[\s\S]*?\*\/|\/\/[^\n]*/g, (c) => " ".repeat(c.length));
|
|
9791
|
+
}
|
|
9792
|
+
function topLevelSegments(scan) {
|
|
9793
|
+
const out = [];
|
|
9794
|
+
let depth = 0;
|
|
9795
|
+
let start = 0;
|
|
9796
|
+
for (let i = 0; i <= scan.length; i++) {
|
|
9797
|
+
const ch = scan[i];
|
|
9798
|
+
if (ch === "{" || ch === "[" || ch === "(") depth++;
|
|
9799
|
+
else if (ch === "}" || ch === "]" || ch === ")") depth--;
|
|
9800
|
+
else if (ch === "," && depth === 0 || i === scan.length) {
|
|
9801
|
+
out.push(scan.slice(start, i));
|
|
9802
|
+
start = i + 1;
|
|
9803
|
+
}
|
|
9804
|
+
}
|
|
9805
|
+
return out;
|
|
9806
|
+
}
|
|
9807
|
+
function spreadStarts(content) {
|
|
9808
|
+
const scan = blankCommentMarks(maskCommentsAndStrings(content));
|
|
9809
|
+
const out = [];
|
|
9810
|
+
let depth = 0;
|
|
9811
|
+
for (let i = 0; i < scan.length; i++) {
|
|
9812
|
+
const ch = scan[i];
|
|
9813
|
+
if (ch === "(" || ch === "[" || ch === "{") depth++;
|
|
9814
|
+
else if (ch === ")" || ch === "]" || ch === "}") depth--;
|
|
9815
|
+
else if (depth === 0 && ch === "." && scan.startsWith("...", i)) {
|
|
9816
|
+
out.push(i);
|
|
9817
|
+
i += 2;
|
|
9818
|
+
}
|
|
9819
|
+
}
|
|
9820
|
+
return out;
|
|
9821
|
+
}
|
|
9717
9822
|
function findTopLevelDeclaration(scriptContent, key) {
|
|
9718
9823
|
const root = locateDefaultExportObject(scriptContent);
|
|
9719
9824
|
if (!root) return null;
|
|
@@ -11919,6 +12024,10 @@ var BUILTIN_TAGS = {
|
|
|
11919
12024
|
"noteOff",
|
|
11920
12025
|
"allNotesOff"
|
|
11921
12026
|
],
|
|
12027
|
+
"events": [
|
|
12028
|
+
"noteOn",
|
|
12029
|
+
"noteOff"
|
|
12030
|
+
],
|
|
11922
12031
|
"commandArity": {
|
|
11923
12032
|
"resume": 0,
|
|
11924
12033
|
"suspend": 0,
|
|
@@ -12133,6 +12242,9 @@ var BUILTIN_TAGS = {
|
|
|
12133
12242
|
"commands": [
|
|
12134
12243
|
"sample"
|
|
12135
12244
|
],
|
|
12245
|
+
"events": [
|
|
12246
|
+
"frame"
|
|
12247
|
+
],
|
|
12136
12248
|
"commandArity": {
|
|
12137
12249
|
"sample": 0
|
|
12138
12250
|
}
|
|
@@ -12157,6 +12269,9 @@ var BUILTIN_TAGS = {
|
|
|
12157
12269
|
"post",
|
|
12158
12270
|
"close"
|
|
12159
12271
|
],
|
|
12272
|
+
"events": [
|
|
12273
|
+
"message"
|
|
12274
|
+
],
|
|
12160
12275
|
"commandArity": {
|
|
12161
12276
|
"open": 0,
|
|
12162
12277
|
"post": 1,
|
|
@@ -12201,6 +12316,9 @@ var BUILTIN_TAGS = {
|
|
|
12201
12316
|
"handles": [
|
|
12202
12317
|
"streamReady"
|
|
12203
12318
|
],
|
|
12319
|
+
"events": [
|
|
12320
|
+
"ended"
|
|
12321
|
+
],
|
|
12204
12322
|
"commandArity": {
|
|
12205
12323
|
"start": 0,
|
|
12206
12324
|
"stop": 0,
|
|
@@ -12236,6 +12354,10 @@ var BUILTIN_TAGS = {
|
|
|
12236
12354
|
"pause",
|
|
12237
12355
|
"resume"
|
|
12238
12356
|
],
|
|
12357
|
+
"events": [
|
|
12358
|
+
"recorded",
|
|
12359
|
+
"dataavailable"
|
|
12360
|
+
],
|
|
12239
12361
|
"commandArity": {
|
|
12240
12362
|
"attachStream": 1,
|
|
12241
12363
|
"start": 0,
|
|
@@ -12272,6 +12394,13 @@ var BUILTIN_TAGS = {
|
|
|
12272
12394
|
"startMonitor",
|
|
12273
12395
|
"stopMonitor"
|
|
12274
12396
|
],
|
|
12397
|
+
"events": [
|
|
12398
|
+
"text",
|
|
12399
|
+
"items",
|
|
12400
|
+
"copied",
|
|
12401
|
+
"cut",
|
|
12402
|
+
"pasted"
|
|
12403
|
+
],
|
|
12275
12404
|
"commandArity": {
|
|
12276
12405
|
"writeText": 1,
|
|
12277
12406
|
"write": 1,
|
|
@@ -12346,6 +12475,9 @@ var BUILTIN_TAGS = {
|
|
|
12346
12475
|
"cancel",
|
|
12347
12476
|
"flush"
|
|
12348
12477
|
],
|
|
12478
|
+
"events": [
|
|
12479
|
+
"fired"
|
|
12480
|
+
],
|
|
12349
12481
|
"commandArity": {
|
|
12350
12482
|
"trigger": 0,
|
|
12351
12483
|
"cancel": 0,
|
|
@@ -12373,6 +12505,9 @@ var BUILTIN_TAGS = {
|
|
|
12373
12505
|
"cancel",
|
|
12374
12506
|
"flush"
|
|
12375
12507
|
],
|
|
12508
|
+
"events": [
|
|
12509
|
+
"fired"
|
|
12510
|
+
],
|
|
12376
12511
|
"commandArity": {
|
|
12377
12512
|
"trigger": 0,
|
|
12378
12513
|
"cancel": 0,
|
|
@@ -12718,6 +12853,15 @@ var BUILTIN_TAGS = {
|
|
|
12718
12853
|
"close",
|
|
12719
12854
|
"send"
|
|
12720
12855
|
],
|
|
12856
|
+
"events": [
|
|
12857
|
+
"message",
|
|
12858
|
+
"type",
|
|
12859
|
+
"channel",
|
|
12860
|
+
"note",
|
|
12861
|
+
"velocity",
|
|
12862
|
+
"control",
|
|
12863
|
+
"value"
|
|
12864
|
+
],
|
|
12721
12865
|
"commandArity": {
|
|
12722
12866
|
"request": 0,
|
|
12723
12867
|
"close": 0,
|
|
@@ -12775,6 +12919,11 @@ var BUILTIN_TAGS = {
|
|
|
12775
12919
|
"close",
|
|
12776
12920
|
"closeAll"
|
|
12777
12921
|
],
|
|
12922
|
+
"events": [
|
|
12923
|
+
"clicked",
|
|
12924
|
+
"closed",
|
|
12925
|
+
"shown"
|
|
12926
|
+
],
|
|
12778
12927
|
"commandArity": {
|
|
12779
12928
|
"request": 0,
|
|
12780
12929
|
"notify": 2,
|
|
@@ -12992,6 +13141,10 @@ var BUILTIN_TAGS = {
|
|
|
12992
13141
|
"pause",
|
|
12993
13142
|
"resume"
|
|
12994
13143
|
],
|
|
13144
|
+
"events": [
|
|
13145
|
+
"charIndex",
|
|
13146
|
+
"spokenWord"
|
|
13147
|
+
],
|
|
12995
13148
|
"commandArity": {
|
|
12996
13149
|
"speak": 1,
|
|
12997
13150
|
"cancel": 0,
|
|
@@ -13027,6 +13180,9 @@ var BUILTIN_TAGS = {
|
|
|
13027
13180
|
"stop",
|
|
13028
13181
|
"abort"
|
|
13029
13182
|
],
|
|
13183
|
+
"events": [
|
|
13184
|
+
"result"
|
|
13185
|
+
],
|
|
13030
13186
|
"commandArity": {
|
|
13031
13187
|
"start": 0,
|
|
13032
13188
|
"stop": 0,
|
|
@@ -13064,6 +13220,9 @@ var BUILTIN_TAGS = {
|
|
|
13064
13220
|
"connect",
|
|
13065
13221
|
"close"
|
|
13066
13222
|
],
|
|
13223
|
+
"events": [
|
|
13224
|
+
"message"
|
|
13225
|
+
],
|
|
13067
13226
|
"commandArity": {
|
|
13068
13227
|
"connect": 0,
|
|
13069
13228
|
"close": 0
|
|
@@ -13300,6 +13459,9 @@ var BUILTIN_TAGS = {
|
|
|
13300
13459
|
"sendMessage",
|
|
13301
13460
|
"close"
|
|
13302
13461
|
],
|
|
13462
|
+
"events": [
|
|
13463
|
+
"message"
|
|
13464
|
+
],
|
|
13303
13465
|
"commandArity": {
|
|
13304
13466
|
"connect": 0,
|
|
13305
13467
|
"sendMessage": 1,
|
|
@@ -13333,6 +13495,9 @@ var BUILTIN_TAGS = {
|
|
|
13333
13495
|
"post",
|
|
13334
13496
|
"terminate"
|
|
13335
13497
|
],
|
|
13498
|
+
"events": [
|
|
13499
|
+
"message"
|
|
13500
|
+
],
|
|
13336
13501
|
"commandArity": {
|
|
13337
13502
|
"start": 0,
|
|
13338
13503
|
"post": 2,
|
|
@@ -13406,7 +13571,7 @@ var ja = {
|
|
|
13406
13571
|
wildcardOtherList: (p, over, loop) => `"${p}" \u306E "*" \u306F "${over}" \u306E\u884C\u3092\u6307\u3057\u307E\u3059\u304C\u3001\u305D\u306E\u6BB5\u3067\u56F2\u3080 for \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304C\u63CF\u304F\u306E\u306F "${loop}" \u3067\u3059\uFF084.0 \u306F\u30D0\u30A4\u30F3\u30C9\u78BA\u7ACB\u6642\u306B throw \u3057\u307E\u3059\uFF09\u3002\u675F\u7E1B\u306E "*" \u306F\u56F2\u3080\u30EB\u30FC\u30D7\u306E\u884C\u3067\u3059 \u2014 \u5225\u306E\u30EA\u30B9\u30C8\u306E\u884C\u306F getter \u306E\u4E2D\u3067 $resolve(path, indexes) \u3067\u8AAD\u3093\u3067\u304F\u3060\u3055\u3044`,
|
|
13407
13572
|
outerInTemplate: (prop) => `"${prop}:" \u306F\u8981\u7D20\u305D\u306E\u3082\u306E\u3092\u7F6E\u304D\u63DB\u3048\u308B\u306E\u3067\u3001for / if \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u4E2D\u3067\u306F\u4F7F\u3048\u307E\u305B\u3093\uFF08\u884C\u3084\u679D\u306F\u30CE\u30FC\u30C9\u3092\u4F4D\u7F6E\u3067\u6301\u3064\u305F\u3081\u30024.0 \u306F\u521D\u671F\u5316\u3067 throw \u3057\u307E\u3059\uFF09\u3002\u5305\u3080\u8981\u7D20\u306B innerHTML: \u3092\u675F\u7E1B\u3057\u3066\u304F\u3060\u3055\u3044`,
|
|
13408
13573
|
directNotEvent: (prop) => `\u4FEE\u98FE\u5B50 #direct \u306F\u30A4\u30D9\u30F3\u30C8\u675F\u7E1B\uFF08on*:\uFF09\u3060\u3051\u306B\u52B9\u304D\u307E\u3059\u3002"${prop}" \u3067\u306F\u7121\u8996\u3055\u308C\u307E\u3059`,
|
|
13409
|
-
delegatedCurrentTarget: (suggested, eventName, handler) => `"${eventName}" \u30A4\u30D9\u30F3\u30C8\u306E\u675F\u7E1B\u306F root \u3078\u59D4\u8B72\u3055\u308C\u308B\u306E\u3067\u3001"${handler}" \u306E\u4E2D\u306E event.currentTarget \u306F\u3053\u306E\u8981\u7D20\u3067\u306F\u306A\u304F root \u306B\u306A\u308A\u307E\u3059\u3002\u8981\u7D20\u306B\u30EA\u30B9\u30CA\u30FC\u3092\u4ED8\u3051\u308B\u306B\u306F "${suggested}:" \u3068\u66F8\u304F\u304B\u3001event.target.closest(...) \u3067\u8981\u7D20\u3092\u63A2\u3057\u3066\u304F\u3060\u3055\u3044`,
|
|
13574
|
+
delegatedCurrentTarget: (suggested, eventName, handler) => `"${eventName}" \u30A4\u30D9\u30F3\u30C8\u306E\u675F\u7E1B\u306F root \u3078\u59D4\u8B72\u3055\u308C\u308B\u306E\u3067\u3001"${handler}" \u306E\u4E2D\u306E event.currentTarget \u306F\u3053\u306E\u8981\u7D20\u3067\u306F\u306A\u304F root \u306B\u306A\u308A\u307E\u3059\u3002\u8981\u7D20\u306B\u30EA\u30B9\u30CA\u30FC\u3092\u4ED8\u3051\u308B\u306B\u306F "${suggested}:" \u3068\u66F8\u304F\u304B\u3001event.target.closest(...) \u3067\u8981\u7D20\u3092\u63A2\u3057\u3066\u304F\u3060\u3055\u3044\u30025.0 \u306F\u65E2\u5B9A\u3067\u30EA\u30B9\u30CA\u30FC\u3092\u8981\u7D20\u306B\u4ED8\u3051\u307E\u3059\uFF08docs/migration-v5.ja.md#event-delegation\uFF09`,
|
|
13410
13575
|
getterCycle: (cycle) => `\u30D1\u30B9 getter \u304C\u5FAA\u74B0\u53C2\u7167\u3057\u3066\u3044\u307E\u3059: ${cycle}`,
|
|
13411
13576
|
updatedCallbackUnbound: (p) => `$renderedCallback \u306F binding \u99C6\u52D5\u3067\u3059\u3002"${p}" \u306F\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u3069\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306B\u3082\u73FE\u308C\u306A\u3044\u305F\u3081\u3001\u3053\u306E\u5206\u5C90\u306F\u4E00\u5EA6\u3082\u5B9F\u884C\u3055\u308C\u307E\u305B\u3093\u3002\u63CF\u753B\u306B\u4F9D\u5B58\u305B\u305A\u53CD\u5FDC\u3059\u308B\u306A\u3089 $watch \u3092\u4F7F\u3063\u3066\u304F\u3060\u3055\u3044`,
|
|
13412
13577
|
onHandlerThis: (name) => `$on \u306E\u30CF\u30F3\u30C9\u30E9 "${name}" \u304C this \u3092\u4F7F\u3063\u3066\u3044\u307E\u3059\u3002$on \u306E\u30CF\u30F3\u30C9\u30E9\u306F state \u3092\u7B2C 1 \u5F15\u6570\u3067\u53D7\u3051\u53D6\u308A\uFF08\`${name}(state, event) { state.x = \u2026 }\`\uFF09\u3001this \u306F undefined \u306A\u306E\u3067\u3001this.\u2026 \u306F\u547C\u3070\u308C\u305F\u3068\u304D\u306B\u4F8B\u5916\u306B\u306A\u308A\u307E\u3059\u3002$watch \u3084\u30E1\u30BD\u30C3\u30C9\u3068\u9055\u3046\u70B9\u306B\u6CE8\u610F`,
|
|
@@ -13454,7 +13619,7 @@ var ja = {
|
|
|
13454
13619
|
pathDynamicUnknownObjectSpread: (path, n, sp, from) => `${sp}${from === void 0 ? "" : `\uFF08"${from}" \u304B\u3089 import\uFF09`}\u304C "${path}" \u306B\u6301\u3061\u8FBC\u3080\u30AD\u30FC\u306F\u9759\u7684\u306B\u8AAD\u3081\u306A\u3044\u306E\u3067\u3001\u305D\u306E\u4E0B\u306B\u675F\u306D\u305F\u30D1\u30B9\uFF08${n} \u4EF6\uFF09\u306F\u691C\u67FB\u3057\u3066\u3044\u307E\u305B\u3093\u3002\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u30EA\u30C6\u30E9\u30EB\u3092\u675F\u7E1B\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E const \u3092 spread \u3059\u308B\u304B\u3001\u30AD\u30FC\u306B\u5F62\u3092\u8868\u3059 JSDoc \u306E @type \u3092\u4ED8\u3051\u308B\u304B\u3001wcstack.manifest.json \u306E stateSchema \u306B\u5BA3\u8A00\u3059\u308B\u3068\u691C\u67FB\u3055\u308C\u307E\u3059`,
|
|
13455
13620
|
pathReadonlyTwoWay: (p, prop) => `"${p}" \u306F setter \u306E\u7121\u3044 getter \u3067\u3059\u304C\u3001${prop}: \u306F\u8AAD\u8005\u306E\u5165\u529B\u3092\u66F8\u304D\u623B\u3059\u306E\u3067\u3001\u5165\u529B\u306E\u305F\u3073\u306B\u66F8\u304D\u8FBC\u307F\u304C\u5931\u6557\u3057\u307E\u3059\uFF08"${p}" is a getter without a setter\uFF09\u3002setter \u3092\u8DB3\u3059\uFF08set "${p}"(v) { \u2026 }\uFF09\u304B\u3001#ro \u3067\u4E00\u65B9\u5411\u306B\u3057\u3066\u304F\u3060\u3055\u3044\uFF08${prop}#ro: ${p}\uFF09`,
|
|
13456
13621
|
pathReadonlyOutput: (p, tag, member, atInit, twoWay, spread) => `"${p}" \u306F setter \u306E\u7121\u3044 getter \u3067\u3059\u304C\u3001${spread === void 0 ? "" : `"${spread}" \u304C\u675F\u306D\u308B `}"${member}" \u306F <${tag}> \u304C\u66F8\u304F\u30E1\u30F3\u30D0\u30FC\uFF08${twoWay ? "\u5165\u529B\u3067\u3082\u3042\u308B\u51FA\u529B" : "\u51FA\u529B"}\uFF09\u3067\u3059\u3002\u8981\u7D20\u306F\u305D\u306E\u5024\u3092 "${p}" \u306B\u66F8\u304F\u306E\u3067\u3001${atInit ? "\u675F\u306D\u305F\u6642\u70B9\u306E\u66F8\u304D\u8FBC\u307F\u304C\u5931\u6557\u3057\u3001state \u306E\u521D\u671F\u5316\u304C\u5931\u6557\u3057\u307E\u3059" : "\u8981\u7D20\u304C\u5024\u3092\u77E5\u3089\u305B\u308B\u305F\u3073\u306B\u66F8\u304D\u8FBC\u307F\u304C\u5931\u6557\u3057\u307E\u3059"}\uFF08"${p}" is a getter without a setter\uFF09\u3002${spread !== void 0 ? `setter \u3092\u8DB3\u3059\uFF08set "${p}"(v) { \u2026 }\uFF09\u304B\u3001spread \u306E\u5F8C\u308D\u3067 "${member}" \u3092\u30C7\u30FC\u30BF\u306E\u30D1\u30B9\u306B\u675F\u306D\u3066\u304F\u3060\u3055\u3044\uFF08${spread}; ${member}: <\u30C7\u30FC\u30BF\u306E\u30AD\u30FC>\uFF09` : !twoWay ? `\u30C7\u30FC\u30BF\u306E\u30D1\u30B9\u3092\u675F\u306D\u3066\u305D\u308C\u3092 getter \u304B\u3089\u8AAD\u3080\uFF08${member}: <\u30C7\u30FC\u30BF\u306E\u30AD\u30FC>\uFF09\u304B\u3001setter \u3092\u8DB3\u3057\u3066\u304F\u3060\u3055\u3044\uFF08set "${p}"(v) { \u2026 }\uFF09` : atInit ? `setter \u3092\u8DB3\u3059\uFF08set "${p}"(v) { \u2026 }\uFF09\u304B\u3001\u6700\u521D\u306E\u5024\u3092 state \u304B\u3089\u53D6\u3063\u3066\u304F\u3060\u3055\u3044\uFF08#init=element \u3092\u5916\u3059\uFF09` : `setter \u3092\u8DB3\u3059\uFF08set "${p}"(v) { \u2026 }\uFF09\u304B\u3001#ro \u3067\u4E00\u65B9\u5411\u306B\u3057\u3066\u304F\u3060\u3055\u3044\uFF08${member}#ro: ${p} \u2014 state \u304B\u3089\u8981\u7D20\u3078\u306F\u4ECA\u307E\u3067\u3069\u304A\u308A\u66F8\u304B\u308C\u307E\u3059\uFF09`}`,
|
|
13457
|
-
submitWithoutPrevent: (h) => `onsubmit \u306B #prevent \u304C\u7121\u304F\u3001"${h}" \u3082 preventDefault \u3092\u547C\u3073\u307E\u305B\u3093\u3002\u30D6\u30E9\u30A6\u30B6\u306F\u30D5\u30A9\u30FC\u30E0\u3082\u9001\u308B\u306E\u3067\u3001\u30DA\u30FC\u30B8\u304C\u8AAD\u307F\u76F4\u3055\u308C\u308B\u304B\u3001router \u304C\u3042\u308C\u3070 GET \u304C\u6B04\u306E\u5024\uFF08\u30D1\u30B9\u30EF\u30FC\u30C9\u3082\uFF09\u3092 URL \u3068\u5C65\u6B74\u306B\u8F09\u305B\u307E\u3059\u3002onsubmit#prevent: ${h} \u3068\u66F8\u304F\u304B\u3001\u30CF\u30F3\u30C9\u30E9\u3067 event.preventDefault() \u3092\u547C\u3093\u3067\u304F\u3060\u3055\u3044`,
|
|
13622
|
+
submitWithoutPrevent: (h) => `onsubmit \u306B #prevent \u304C\u7121\u304F\u3001"${h}" \u3082 preventDefault \u3092\u547C\u3073\u307E\u305B\u3093\u3002\u30D6\u30E9\u30A6\u30B6\u306F\u30D5\u30A9\u30FC\u30E0\u3082\u9001\u308B\u306E\u3067\u3001\u30DA\u30FC\u30B8\u304C\u8AAD\u307F\u76F4\u3055\u308C\u308B\u304B\u3001router \u304C\u3042\u308C\u3070 GET \u304C\u6B04\u306E\u5024\uFF08\u30D1\u30B9\u30EF\u30FC\u30C9\u3082\uFF09\u3092 URL \u3068\u5C65\u6B74\u306B\u8F09\u305B\u307E\u3059\u3002onsubmit#prevent: ${h} \u3068\u66F8\u304F\u304B\u3001\u30CF\u30F3\u30C9\u30E9\u3067 event.preventDefault() \u3092\u547C\u3093\u3067\u304F\u3060\u3055\u3044\u30025.0 \u306F\u3001action \u3082 method \u3082\u7121\u3044\u30D5\u30A9\u30FC\u30E0\u306E\u9001\u4FE1\u3092\u65E2\u5B9A\u3067\u6B62\u3081\u307E\u3059\uFF08docs/migration-v5.ja.md#submit-default\uFF09`,
|
|
13458
13623
|
guardReadsAtModuleTop: (r) => `\u30AC\u30FC\u30C9\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u3001export \u3059\u308B\u95A2\u6570\u306E\u5916\uFF08\u30C8\u30C3\u30D7\u30EC\u30D9\u30EB\uFF09\u3067 ${r} \u3092\u8AAD\u3093\u3067\u3044\u307E\u3059\u3002\u30E2\u30B8\u30E5\u30FC\u30EB\u306F\u30DA\u30FC\u30B8\u306E\u8AAD\u307F\u8FBC\u307F\u3067 1 \u56DE\u3060\u3051\u8A55\u4FA1\u3055\u308C\u308B\u306E\u3067\u3001\u30AC\u30FC\u30C9\u306F\u305D\u306E\u3068\u304D\u8AAD\u3093\u3060\u5024\u3092\u6301\u3061\u7D9A\u3051\u3001\u9077\u79FB\u306E\u305F\u3073\u306B\u305D\u306E\u5024\u3067\u6C7A\u3081\u307E\u3059\uFF08\u30ED\u30B0\u30A4\u30F3\u3057\u305F\u5F8C\u3082\u30BB\u30C3\u30B7\u30E7\u30F3\u304C\u7121\u3044\u307E\u307E\uFF09\u3002\u9077\u79FB\u306E\u305F\u3073\u306B\u8D70\u308B\u3001export \u3057\u305F\u95A2\u6570\u306E\u4E2D\u3067\u8AAD\u3093\u3067\u304F\u3060\u3055\u3044`,
|
|
13459
13624
|
stateReadsAtModuleTop: (r) => `state \u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u30C8\u30C3\u30D7\u30EC\u30D9\u30EB\u3067 ${r} \u3092\u8AAD\u3093\u3067\u3044\u307E\u3059\u3002\u30E2\u30B8\u30E5\u30FC\u30EB\u306F <wcs-state> \u3054\u3068\u306B 1 \u56DE\u3060\u3051\u8A55\u4FA1\u3055\u308C\u308B\u306E\u3067\u3001state \u306F\u30DA\u30FC\u30B8\u306E\u8AAD\u307F\u8FBC\u307F\u306E\u6642\u70B9\u306E\u5024\u3092\u6301\u3061\u7D9A\u3051\u307E\u3059\uFF08\u5F8C\u3067\u5909\u308F\u308B\u30C8\u30FC\u30AF\u30F3\u3084\u30BB\u30C3\u30B7\u30E7\u30F3\u306F\u898B\u3048\u307E\u305B\u3093\uFF09\u3002\u5024\u3092 state \u306B\u7F6E\u304F\uFF08<wcs-storage> \u306B\u675F\u306D\u308B\uFF09\u304B\u3001\u4F7F\u3046\u30E1\u30BD\u30C3\u30C9\u306E\u4E2D\u3067\u8AAD\u3093\u3067\u304F\u3060\u3055\u3044`,
|
|
13460
13625
|
eventTokenUnbound: (t, handler) => `\u30A4\u30D9\u30F3\u30C8\u30C8\u30FC\u30AF\u30F3 "${t}" \u3092 $eventTokens \u306B\u5BA3\u8A00\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u305D\u308C\u3092\u51FA\u3059 eventToken.<\u30E1\u30F3\u30D0\u30FC>: ${t} \u306E\u675F\u7E1B\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u3069\u306E\u8981\u7D20\u3082\u767A\u706B\u3055\u305B\u306A\u3044\u306E\u3067\u3001${handler ? "$on \u306E\u30CF\u30F3\u30C9\u30E9\u306F\u4E00\u5EA6\u3082\u8D70\u308A\u307E\u305B\u3093" : "\u3053\u306E\u30C8\u30FC\u30AF\u30F3\u306F\u4E00\u5EA6\u3082\u767A\u706B\u3057\u307E\u305B\u3093"}\u3002\u767A\u706B\u3055\u305B\u308B\u8981\u7D20\u306B\u675F\u306D\u308B\uFF08eventToken.<\u30E1\u30F3\u30D0\u30FC>: ${t} \u2014 <\u30E1\u30F3\u30D0\u30FC> \u306F\u305D\u306E\u8981\u7D20\u306E wcBindable \u306E\u30D7\u30ED\u30D1\u30C6\u30A3\uFF09\u304B\u3001$eventTokens \u304B\u3089\u5916\u3057\u3066\u304F\u3060\u3055\u3044`,
|
|
@@ -13466,7 +13631,7 @@ var ja = {
|
|
|
13466
13631
|
typeExpectation: (label, expected, resultType) => `"${label}" \u306B\u306F${JA_EXPECTED_LABEL[expected]}\u304C\u5FC5\u8981\u3067\u3059\uFF08\u73FE\u5728\u306E\u578B: ${resultType}\uFF09`,
|
|
13467
13632
|
attrBooleanPresence: (a, p, rhs) => `"attr.${a}" \u306B boolean \u3092\u675F\u306D\u3066\u3044\u307E\u3059\u3002attr.* \u306F String(value) \u3092\u66F8\u304F\u306E\u3067\u3001false \u306E\u3068\u304D ${a}="false" \u306B\u306A\u308A\u307E\u3059\u3002\u8AD6\u7406\u5C5E\u6027\u306F\u5024\u306B\u95A2\u4FC2\u306A\u304F\u3001\u5728\u308B\u3060\u3051\u3067\u52B9\u304D\u307E\u3059: ${a}="false" \u3067\u3082 ${a} \u306E\u307E\u307E\u3067\u3059\uFF08\u5C5E\u6027\u3092\u5916\u3059\u306E\u306F null / undefined \u3060\u3051\uFF09\u3002\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u675F\u306D\u3066\u304F\u3060\u3055\u3044: ${p}: ${rhs}`,
|
|
13468
13633
|
attrBooleanText: (a, rhs) => `"attr.${a}" \u306B boolean \u3092\u675F\u306D\u3066\u3044\u307E\u3059\u3002attr.* \u306F String(value) \u3092\u66F8\u304F\u306E\u3067\u3001\u5C5E\u6027\u306F "true" \u304B "false" \u306B\u306A\u308A\u3001\u5916\u308C\u308B\u3053\u3068\u306F\u3042\u308A\u307E\u305B\u3093\uFF08\u5916\u3059\u306E\u306F null / undefined \u3060\u3051\uFF09\u3002\u5C5E\u6027\u306E\u6709\u7121\u3092\u898B\u308B\u5074\uFF08CSS \u306E [${a}]\u30FBhasAttribute()\uFF09\u306B\u306F\u3001\u3069\u3061\u3089\u3067\u3082\u5728\u308A\u307E\u3059\u3002false \u306E\u9593\u306F\u5916\u3059\u306A\u3089 attr.${a}: ${rhs}|defaults(null)\u3001\u6587\u5B57\u306E "true" / "false" \u304C\u610F\u56F3\u306A\u3089 attr.${a}: ${rhs}|string \u3068\u66F8\u3044\u3066\u304F\u3060\u3055\u3044`,
|
|
13469
|
-
radioBeforeValue: (binding, value, checkbox, fix) => `\u300C${binding}:\u300D\u304C\u3001\u3053\u306E${checkbox ? "\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9" : "\u30E9\u30B8\u30AA"}\u306B\u5024\u3092\u4E0E\u3048\u308B\u300C${value}:\u300D\u3088\u308A\u524D\u306B\u66F8\u304B\u308C\u3066\u3044\u307E\u3059\u3002\u675F\u7E1B\u306F\u66F8\u3044\u305F\u9806\u306B\u5F53\u305F\u308B\u306E\u3067\u3001\u5024\u304C\u307E\u3060\u30D6\u30E9\u30A6\u30B6\u306E\u65E2\u5B9A\u306E "on" \u306E\u3046\u3061\u306B\u6BD4\u3079\u3089\u308C\u3001\u6700\u521D\u306E\u63CF\u753B\u3067\u306F\u4F55\u3082\u30C1\u30A7\u30C3\u30AF\u3055\u308C\u307E\u305B\u3093\uFF08\u4F55\u3082\u77E5\u3089\u305B\u307E\u305B\u3093\u3002\u5F8C\u304B\u3089 state \u306B\u66F8\u304F\u3068\u6B63\u3057\u3044\u3082\u306E\u304C\u30C1\u30A7\u30C3\u30AF\u3055\u308C\u307E\u3059\uFF09\u3002\u5024\u3092\u5148\u306B\u66F8\u3044\u3066\u304F\u3060\u3055\u3044: ${fix}`,
|
|
13634
|
+
radioBeforeValue: (binding, value, checkbox, fix) => `\u300C${binding}:\u300D\u304C\u3001\u3053\u306E${checkbox ? "\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9" : "\u30E9\u30B8\u30AA"}\u306B\u5024\u3092\u4E0E\u3048\u308B\u300C${value}:\u300D\u3088\u308A\u524D\u306B\u66F8\u304B\u308C\u3066\u3044\u307E\u3059\u3002\u675F\u7E1B\u306F\u66F8\u3044\u305F\u9806\u306B\u5F53\u305F\u308B\u306E\u3067\u3001\u5024\u304C\u307E\u3060\u30D6\u30E9\u30A6\u30B6\u306E\u65E2\u5B9A\u306E "on" \u306E\u3046\u3061\u306B\u6BD4\u3079\u3089\u308C\u3001\u6700\u521D\u306E\u63CF\u753B\u3067\u306F\u4F55\u3082\u30C1\u30A7\u30C3\u30AF\u3055\u308C\u307E\u305B\u3093\uFF08\u4F55\u3082\u77E5\u3089\u305B\u307E\u305B\u3093\u3002\u5F8C\u304B\u3089 state \u306B\u66F8\u304F\u3068\u6B63\u3057\u3044\u3082\u306E\u304C\u30C1\u30A7\u30C3\u30AF\u3055\u308C\u307E\u3059\uFF09\u3002\u5024\u3092\u5148\u306B\u66F8\u3044\u3066\u304F\u3060\u3055\u3044: ${fix}\u30025.0 \u306F\u8981\u7D20\u306E\u5165\u529B\u3092 radio: / checkbox: \u3088\u308A\u5148\u306B\u5F53\u3066\u307E\u3059\uFF08docs/migration-v5.ja.md#inputs-before-commands\uFF09`,
|
|
13470
13635
|
bindingExpression: (expression, fix) => `\u675F\u7E1B\u306E\u53F3\u8FBA\u306F\u30D1\u30B9\u3068\u30D5\u30A3\u30EB\u30BF\u3067\u3001\u5F0F\u3067\u306F\u3042\u308A\u307E\u305B\u3093: "${expression}" \u306F\u8A55\u4FA1\u3055\u308C\u305A\u3001\u305D\u306E\u540D\u524D\u306E\u30D1\u30B9\u3068\u3057\u3066\u5F15\u304B\u308C\u307E\u3059\u3002${fix !== null ? `${fix} \u3068\u66F8\u3044\u3066\u304F\u3060\u3055\u3044` : "\u305D\u306E\u5024\u3092\u8A08\u7B97\u3059\u308B getter \u3092 state \u306B\u66F8\u304D\u3001getter \u306E\u540D\u524D\u3092\u675F\u306D\u3066\u304F\u3060\u3055\u3044"}`,
|
|
13471
13636
|
handlerExpression: (property, expression, method) => `\u30A4\u30D9\u30F3\u30C8\u306E\u675F\u7E1B\u306E\u53F3\u8FBA\u306F\u30E1\u30BD\u30C3\u30C9\u306E\u540D\u524D\u3067\u3001\u547C\u3073\u51FA\u3057\u3084\u95A2\u6570\u3067\u306F\u3042\u308A\u307E\u305B\u3093: "${expression}" \u306F\u8A55\u4FA1\u3055\u308C\u307E\u305B\u3093\u3002${method !== null ? `"${property}: ${method}" \u3068\u66F8\u3044\u3066\u304F\u3060\u3055\u3044` : "\u30E1\u30BD\u30C3\u30C9\u306E\u540D\u524D\u3092\u66F8\u3044\u3066\u304F\u3060\u3055\u3044"}\u3002\u30CF\u30F3\u30C9\u30E9\u306F (event, ...\u30EB\u30FC\u30D7\u306E\u6DFB\u5B57) \u3067\u547C\u3070\u308C\u308B\u306E\u3067\u3001\u884C\u306E\u5024\u306F\u30E1\u30BD\u30C3\u30C9\u306E\u4E2D\u3067\u6DFB\u5B57\u304B\u3089\u8AAD\u3093\u3067\u304F\u3060\u3055\u3044`,
|
|
13472
13637
|
attributeMustache: (name) => `{{ }} \u306F\u30C6\u30AD\u30B9\u30C8\u306E\u4E2D\u3067\u3057\u304B\u8AAD\u307E\u308C\u307E\u305B\u3093\u3002\u5C5E\u6027 "${name}" \u306E\u4E2D\u3067\u306F\u66F8\u3044\u305F\u307E\u307E\u6B8B\u308A\u307E\u3059\u3002\u5C5E\u6027\u3092\u675F\u306D\u3066\u304F\u3060\u3055\u3044\uFF08attr.${name}: <\u30D1\u30B9>\u3002\u6587\u5B57\u5217\u3092\u7D44\u307F\u7ACB\u3066\u308B getter \u3092\u66F8\u3044\u3066\uFF09\u3002\u30DA\u30FC\u30B8\u3092\u8FD4\u3059\u524D\u306B\u30B5\u30FC\u30D0\u30FC\u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304C\u57CB\u3081\u308B\u306E\u306A\u3089\u3001\u3053\u306E\u307E\u307E\u3067\u6B63\u3057\u3044\u66F8\u304D\u65B9\u3067\u3059`,
|
|
@@ -13476,8 +13641,18 @@ var ja = {
|
|
|
13476
13641
|
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
13642
|
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
13643
|
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`,
|
|
13644
|
+
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`,
|
|
13645
|
+
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`,
|
|
13646
|
+
v5PostUpdateWildcard: (path, list) => `$postUpdate("${path}"): 4.x \u3067\u306F * \u306F\u547C\u3093\u3060\u5074\u306E\u3044\u308B\u884C\u3067\u3059\uFF08\u884C\u306E\u5916\u3067\u306F\u4F55\u3082\u66F4\u65B0\u3055\u308C\u307E\u305B\u3093\uFF09\u30025.0 \u3067\u306F\u3059\u3079\u3066\u306E\u884C\u306B\u306A\u308A\u307E\u3059\u3002\u3069\u3061\u3089\u3067\u3082 1 \u884C\u3060\u3051\u306B\u3059\u308B\u306B\u306F\u6DFB\u5B57\u3092\u66F8\u304D\uFF08$postUpdate(\`${list}.\${index}\u2026\`)\uFF09\u3001\u3069\u3061\u3089\u3067\u3082\u3059\u3079\u3066\u306E\u884C\u306B\u3059\u308B\u306B\u306F\u4E00\u89A7\u3092\u540D\u6307\u3057\u307E\u3059\uFF08$postUpdate("${list}")\uFF09\u3002\uFF08docs/migration-v5.ja.md#post-update-wildcard\uFF09`,
|
|
13647
|
+
v5StorageKey: (value) => `<wcs-storage key="${value}">: 5.0 \u3067\u306F\u3001\u30AD\u30FC\u306F storage-key \u3060\u3051\u306B\u306A\u308A\u307E\u3059\uFF08React \u3068 Vue \u306F key \u3092\u81EA\u5206\u306E\u3082\u306E\u306B\u3057\u307E\u3059\uFF09\u3002storage-key="${value}" \u3068\u66F8\u3044\u3066\u304F\u3060\u3055\u3044\u3002\uFF08docs/migration-v5.ja.md#storage-key\uFF09`,
|
|
13648
|
+
v5StorageKeyBinding: () => `<wcs-storage> \u306E key: \u2014 5.0 \u3067\u306F\u3001\u30AD\u30FC\u306F storageKey \u3060\u3051\u306B\u306A\u308A\u307E\u3059\u3002\u540C\u3058\u30D1\u30B9\u3067 storageKey: \u3068\u66F8\u3044\u3066\u304F\u3060\u3055\u3044\u3002\uFF08docs/migration-v5.ja.md#storage-key\uFF09`,
|
|
13649
|
+
v5AttrOn: (name) => `attr.${name}: \u306F\u30CF\u30F3\u30C9\u30E9\u3092\u6587\u5B57\u5217\u3067\u66F8\u304D\u3001\u30D6\u30E9\u30A6\u30B6\u304C\u305D\u308C\u3092\u30B3\u30FC\u30C9\u3068\u3057\u3066\u5B9F\u884C\u3057\u307E\u3059\u30025.0 \u306F attr.on*: \u3092\u62D2\u307F\u307E\u3059\u3002\u30A4\u30D9\u30F3\u30C8\u3092\u675F\u306D\u3066\u304F\u3060\u3055\u3044: ${name}: \u306B state \u306E\u30E1\u30BD\u30C3\u30C9\u3002\uFF08docs/migration-v5.ja.md#attr-on\uFF09`,
|
|
13650
|
+
v5TriggerBeforeInput: (input) => `trigger: \u304C ${input}: \u3088\u308A\u524D\u306B\u66F8\u304B\u308C\u3066\u3044\u307E\u3059\u3002\u675F\u7E1B\u306F\u66F8\u3044\u305F\u9806\u306B\u5F53\u305F\u308B\u306E\u3067\u30014.x \u3067\u306F\u771F\u306E trigger \u304C ${input} \u306E\u5C4A\u304F\u524D\u306B\u767A\u706B\u3057\u307E\u3059\u30025.0 \u306F\u8981\u7D20\u306E\u5165\u529B\u3092\u5148\u306B\u5F53\u3066\u307E\u3059\u3002\u3069\u3061\u3089\u3067\u3082\u52D5\u304F\u3088\u3046\u306B\u3001trigger: \u3092\u6700\u5F8C\u306B\u66F8\u3044\u3066\u304F\u3060\u3055\u3044\u3002\uFF08docs/migration-v5.ja.md#inputs-before-commands\uFF09`,
|
|
13651
|
+
v5BehaviorRemoved: (name) => `$behavior \u306E ${name}: false \u2014 5.0 \u3067\u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u7121\u304F\u306A\u308A\u307E\u3059\uFF08\u5E38\u306B\u6709\u52B9\u306B\u306A\u308A\u307E\u3059\uFF09\u3002\u5916\u3057\u3066\u3001\u30DA\u30FC\u30B8\u3092\u78BA\u304B\u3081\u3066\u304F\u3060\u3055\u3044\u3002\uFF08docs/migration-v5.ja.md#behavior-removed\uFF09`,
|
|
13652
|
+
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`,
|
|
13653
|
+
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
13654
|
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
|
-
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`,
|
|
13655
|
+
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\u30025.0 \u306F\u3001\u6570\u5024\u306E\u5165\u529B\u306E\u53CC\u65B9\u5411\u306E value: \u306B\u6570\u5024\u3092\u66F8\u304B\u305B\u307E\u3059\uFF08docs/migration-v5.ja.md#number-input\uFF09`,
|
|
13481
13656
|
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`,
|
|
13482
13657
|
bodyBinding: (tag, attribute) => `<${tag}> \u306E ${attribute} \u306F\u675F\u7E1B\u3055\u308C\u307E\u305B\u3093\u3002<wcs-state> \u304C\u675F\u306D\u308B\u306E\u306F <body> \u306E\u4E2D\u3067\u3001<body> \u3068 <html> \u305D\u306E\u3082\u306E\u306F\u675F\u306D\u306A\u3044\u306E\u3067\u3001\u3053\u3053\u306B\u66F8\u3044\u305F\u675F\u7E1B\u306F\u4F55\u3082\u3057\u307E\u305B\u3093\uFF08\u30A4\u30D9\u30F3\u30C8\u306E\u30CF\u30F3\u30C9\u30E9\u306F\u8D70\u3089\u305A\u3001class. / attr. \u306A\u3069\u306F\u66F8\u304B\u308C\u307E\u305B\u3093\uFF09\u3002\u675F\u7E1B\u3092 <body> \u306E\u4E2D\u306E\u8981\u7D20\uFF08\u5305\u3080\u8981\u7D20\u30FB<main>\uFF09\u3078\u79FB\u3059\u304B\u3001\u5024\u3092 $connectedCallback \u3084 $watch \u306E\u30CF\u30F3\u30C9\u30E9\u304B\u3089\u66F8\u3044\u3066\u304F\u3060\u3055\u3044\uFF08document.documentElement.lang = \u2026\uFF09`,
|
|
13483
13658
|
linkHandler: (property, handler) => `<wcs-link> \u306E "${property}:" \u306F "${handler}" \u3092\u547C\u3073\u307E\u305B\u3093\u3002<wcs-link> \u81EA\u8EAB\u306F display: none \u3067\u3001\u5229\u7528\u8005\u304C\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u306E\u306F\u30EA\u30F3\u30AF\u304C\u81EA\u5206\u306E\u96A3\u306B\u4F5C\u308B <a> \u306A\u306E\u3067\u3001\u30A4\u30D9\u30F3\u30C8\u306F\u30DB\u30B9\u30C8\u306B\u5C4A\u304D\u307E\u305B\u3093\u3002\u30CF\u30F3\u30C9\u30E9\u306F\u3001\u30EA\u30F3\u30AF\u306E\u4E2D\u306E\u8981\u7D20\uFF08\u5B50\u306F <a> \u306E\u4E2D\u3078\u79FB\u308A\u307E\u3059\uFF09\u304B\u3001\u30EA\u30F3\u30AF\u3092\u56F2\u3080\u8981\u7D20\u306B\u66F8\u3044\u3066\u304F\u3060\u3055\u3044\u3002\u30CF\u30F3\u30C9\u30E9\u304B\u3089\u9077\u79FB\u3059\u308B\u306A\u3089\u3001router \u306E navigateUrl \u306B\u66F8\u304D\u307E\u3059\uFF08<wcs-router> \u306E data-wcs="navigateUrl: \u2026"\uFF09`,
|
|
@@ -13488,7 +13663,7 @@ var ja = {
|
|
|
13488
13663
|
},
|
|
13489
13664
|
frequencyInvalid: (tag, value, suggested) => `frequency="${value}" \u306F\u6B63\u306E\u6570\u5024\u3067\u306F\u306A\u3044\u306E\u3067\u3001<${tag}> \u306F\u3053\u308C\u3092\u300C\u6307\u5B9A\u306A\u3057\u300D\u3068\u3057\u3066\u8AAD\u307F\u3001\u30BB\u30F3\u30B5\u30FC\u306F\u30D6\u30E9\u30A6\u30B6\u306E\u65E2\u5B9A\u306E\u983B\u5EA6\u3067\u52D5\u304D\u307E\u3059\uFF08\u4F55\u3082\u77E5\u3089\u305B\u307E\u305B\u3093\uFF09\u3002${suggested === null ? "\u6B63\u306E\u6570\u5024\uFF08Hz\uFF09\u3092\u66F8\u304F\u304B\u3001\u65E2\u5B9A\u306E\u983B\u5EA6\u3067\u3088\u3051\u308C\u3070\u5C5E\u6027\u3092\u5916\u3057\u3066\u304F\u3060\u3055\u3044" : `\u6570\u5024\u3060\u3051\u3092\u66F8\u3044\u3066\u304F\u3060\u3055\u3044: frequency="${suggested}"`}`,
|
|
13490
13665
|
targetSelector: (tag, value) => `<${tag}> \u306E target \u306F CSS \u30BB\u30EC\u30AF\u30BF\u3067\u3059\u3002target="${value}" \u306F <${value}> \u8981\u7D20\u3092\u9078\u3073\u307E\u3059\u304C\u3001\u3053\u306E\u6587\u66F8\u306B\u305D\u306E\u8981\u7D20\u306F\u7121\u304F\u3001id="${value}" \u306E\u8981\u7D20\u304C\u3042\u308A\u307E\u3059\u3002\u5BFE\u8C61\u304C\u898B\u3064\u304B\u3089\u306A\u3044\u306E\u3067\u3001${TARGET_EFFECT_JA[tag] ?? "\u8981\u7D20\u306F\u4F55\u3082\u3057\u307E\u305B\u3093"}\u3002id \u3092\u6307\u3059\u306A\u3089 target="#${value}" \u3068\u66F8\u3044\u3066\u304F\u3060\u3055\u3044`,
|
|
13491
|
-
commandEventArgument: (property, token, tag, method, more) => `"${property}: ${token}" \u306F\u30C8\u30FC\u30AF\u30F3\u3092\u30A4\u30D9\u30F3\u30C8\u304B\u3089\u76F4\u63A5 emit \u3059\u308B\u306E\u3067\u3001\u53D7\u3051\u5074\u306E\u30B3\u30DE\u30F3\u30C9\u306F\u30A4\u30D9\u30F3\u30C8\u3092\u7B2C 1 \u5F15\u6570\u3068\u3057\u3066\u547C\u3070\u308C\u307E\u3059\u3002<${tag}> \u306E ${method}() \u306F\u5F15\u6570\u3092\u53D6\u308B\u30B3\u30DE\u30F3\u30C9\u3067\u3001${method}(event) \u306B\u306A\u308A\u307E\u3059${more > 0 ? `\uFF08\u307B\u304B\u306B ${more} \u4EF6\u306E\u53D7\u3051\u5074\u3082\u540C\u3058\u3067\u3059\uFF09` : ""}\u3002state \u306E\u30E1\u30BD\u30C3\u30C9\u304B\u3089 emit \u3057\u3066\u304F\u3060\u3055\u3044 \u2014 ${property}: <\u30E1\u30BD\u30C3\u30C9> \u3068\u66F8\u304D\u3001<\u30E1\u30BD\u30C3\u30C9>() { this.${token}.emit(\u2026) } \u3067 ${method}() \u304C\u53D7\u3051\u53D6\u308B\u5024\u3092\u6E21\u3057\u307E\u3059\uFF08\u6E21\u3059\u5024\u304C\u7121\u3051\u308C\u3070\u5F15\u6570\u306A\u3057\u3067 emit \u3057\u307E\u3059\uFF09`,
|
|
13666
|
+
commandEventArgument: (property, token, tag, method, more) => `"${property}: ${token}" \u306F\u30C8\u30FC\u30AF\u30F3\u3092\u30A4\u30D9\u30F3\u30C8\u304B\u3089\u76F4\u63A5 emit \u3059\u308B\u306E\u3067\u3001\u53D7\u3051\u5074\u306E\u30B3\u30DE\u30F3\u30C9\u306F\u30A4\u30D9\u30F3\u30C8\u3092\u7B2C 1 \u5F15\u6570\u3068\u3057\u3066\u547C\u3070\u308C\u307E\u3059\u3002<${tag}> \u306E ${method}() \u306F\u5F15\u6570\u3092\u53D6\u308B\u30B3\u30DE\u30F3\u30C9\u3067\u3001${method}(event) \u306B\u306A\u308A\u307E\u3059${more > 0 ? `\uFF08\u307B\u304B\u306B ${more} \u4EF6\u306E\u53D7\u3051\u5074\u3082\u540C\u3058\u3067\u3059\uFF09` : ""}\u3002state \u306E\u30E1\u30BD\u30C3\u30C9\u304B\u3089 emit \u3057\u3066\u304F\u3060\u3055\u3044 \u2014 ${property}: <\u30E1\u30BD\u30C3\u30C9> \u3068\u66F8\u304D\u3001<\u30E1\u30BD\u30C3\u30C9>() { this.${token}.emit(\u2026) } \u3067 ${method}() \u304C\u53D7\u3051\u53D6\u308B\u5024\u3092\u6E21\u3057\u307E\u3059\uFF08\u6E21\u3059\u5024\u304C\u7121\u3051\u308C\u3070\u5F15\u6570\u306A\u3057\u3067 emit \u3057\u307E\u3059\uFF09\u30025.0 \u306F\u3001\u3053\u306E\u76F4\u7D50\u306E\u5F62\u3092\u5F15\u6570\u306A\u3057\u3067 emit \u3057\u307E\u3059\uFF08docs/migration-v5.ja.md#command-event-argument\uFF09`,
|
|
13492
13667
|
outputPathWritten: (path, tag, member, commands) => `"${path}" \u306F <${tag}> \u306E\u51FA\u529B "${member}" \u306B\u675F\u306D\u3066\u3042\u308A\u307E\u3059\u3002\u51FA\u529B\u306F\u8981\u7D20\u304C\u66F8\u304F\u3082\u306E\u3067\u3001\u30B9\u30AF\u30EA\u30D7\u30C8\u306E\u66F8\u304D\u8FBC\u307F\u306F\u8981\u7D20\u306B\u5C4A\u304D\u307E\u305B\u3093\u3002true \u3092\u4EE3\u5165\u3057\u3066\u3082\u8981\u7D20\u306F\u4F55\u3082\u305B\u305A\u3001\u30DA\u30FC\u30B8\u3060\u3051\u304C\u305D\u3046\u306A\u3063\u305F\u3053\u3068\u306B\u3057\u307E\u3059\u3002${commands.length === 0 ? `<${tag}> \u306B\u30B3\u30DE\u30F3\u30C9\u306F\u7121\u304F\u3001\u3053\u306E\u5024\u306F\u8981\u7D20\u304C\u77E5\u3089\u305B\u308B\u3082\u306E\u3067\u3059\u3002\u4EE3\u5165\u3092\u5916\u3057\u3066\u304F\u3060\u3055\u3044` : `\u8981\u7D20\u306B\u306F\u30B3\u30DE\u30F3\u30C9\u3067\u983C\u3093\u3067\u304F\u3060\u3055\u3044\uFF08${commands.join("\u30FB")} \u2014 command.<\u30E1\u30BD\u30C3\u30C9>: $command.<\u540D\u524D> \u3092\u675F\u306D\u3001\u3053\u3053\u3067 this.$command.<\u540D\u524D>.emit() \u3092\u547C\u3076\uFF09\u3002"${path}" \u306F\u8981\u7D20\u304C\u66F8\u304D\u307E\u3059`}`,
|
|
13493
13668
|
filterUnknown: (n) => `\u30D5\u30A3\u30EB\u30BF "${n}" \u306F\u7D44\u307F\u8FBC\u307F\u30D5\u30A3\u30EB\u30BF\u306B\u5B58\u5728\u3057\u307E\u305B\u3093`,
|
|
13494
13669
|
filterRemoved: (n, c) => `\u30D5\u30A3\u30EB\u30BF "${n}" \u306F 4.0 \u3067\u5916\u308C\u307E\u3057\u305F\uFF08"${c}" \u306E 3.x \u306E\u65E7\u540D\uFF09\u3002"${c}" \u3068\u66F8\u3044\u3066\u304F\u3060\u3055\u3044`,
|
|
@@ -13549,22 +13724,22 @@ var ja = {
|
|
|
13549
13724
|
nativeCommandUnknown: (method, tag, allowed) => `"${method}" \u306F\u30CD\u30A4\u30C6\u30A3\u30D6\u306E <${tag}> \u306B command \u3067\u547C\u3079\u308B\u30E1\u30BD\u30C3\u30C9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\uFF08\u547C\u3079\u308B\u306E\u306F ${allowed}\u3002\u30E9\u30F3\u30BF\u30A4\u30E0\u306F\u521D\u671F\u5316\u3067 wcs/token-misconfigured \u3092\u6295\u3052\u307E\u3059\uFF09`,
|
|
13550
13725
|
spreadNoBindable: (tag) => `'...'\uFF08spread\uFF09\u306F <${tag}> \u306B\u6709\u52B9\u306A wcBindable \u5BA3\u8A00\u304C\u5FC5\u8981\u3067\u3059 \u2014 \u3053\u306E\u30BF\u30B0\u306F\u5BA3\u8A00\u3092\u6301\u305F\u306A\u3044\u305F\u3081\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u306F\u30A8\u30E9\u30FC\u3092\u9001\u51FA\u3057\u307E\u3059`,
|
|
13551
13726
|
tagEventTokenKeyUnknown: (name, tag, declared) => `eventToken \u306E\u30AD\u30FC "${name}" \u306F <${tag}> \u306E wcBindable \u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u751F DOM \u30A4\u30D9\u30F3\u30C8\u540D\u306F\u767A\u706B\u3057\u307E\u305B\u3093 \u2014 \u30D7\u30ED\u30D1\u30C6\u30A3\u540D\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\uFF08\u5BA3\u8A00\u6E08\u307F: ${declared}\uFF09`,
|
|
13552
|
-
handleBoundAsValue: (name, tag) => `<${tag}> \u306E "${name}" \u306F\u751F\u304D\u305F\u30EA\u30BD\u30FC\u30B9\uFF08\u30CF\u30F3\u30C9\u30EB\uFF09\u3067\u3001\u5024\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002state \u306E\u30D1\u30B9\u306B\u675F\u306D\u308B\u3068\u3001\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3084 SSR \u306B\u8F09\u3089\u306A\u3044\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C state \u306B\u5165\u308A\u307E\u3059 \u2014 eventToken.${name}: \u3067\u53D7\u3051\u3001\u30B3\u30DE\u30F3\u30C9\u306E\u5F15\u6570\u3068\u3057\u3066\u6B21\u306E\u8981\u7D20\u3078\u76F4\u63A5\u6E21\u3057\u3066\u304F\u3060\u3055\u3044`,
|
|
13727
|
+
handleBoundAsValue: (name, tag) => `<${tag}> \u306E "${name}" \u306F\u751F\u304D\u305F\u30EA\u30BD\u30FC\u30B9\uFF08\u30CF\u30F3\u30C9\u30EB\uFF09\u3067\u3001\u5024\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002state \u306E\u30D1\u30B9\u306B\u675F\u306D\u308B\u3068\u3001\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3084 SSR \u306B\u8F09\u3089\u306A\u3044\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C state \u306B\u5165\u308A\u307E\u3059 \u2014 eventToken.${name}: \u3067\u53D7\u3051\u3001\u30B3\u30DE\u30F3\u30C9\u306E\u5F15\u6570\u3068\u3057\u3066\u6B21\u306E\u8981\u7D20\u3078\u76F4\u63A5\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\u30025.0 \u306F\u3001\u30D1\u30B9\u306B\u675F\u306D\u305F handle \u3092\u62D2\u307F\u307E\u3059\uFF08docs/migration-v5.ja.md#handle-as-value\uFF09`,
|
|
13553
13728
|
ariaAttrUnknown: (name) => `"${name}" \u306F WAI-ARIA \u306E\u5C5E\u6027\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002setAttribute \u306F\u305D\u306E\u307E\u307E\u66F8\u304D\u8FBC\u307F\u307E\u3059\u304C\u3001\u652F\u63F4\u6280\u8853\u306B\u306F\u9ED9\u3063\u3066\u7121\u8996\u3055\u308C\u307E\u3059`,
|
|
13554
13729
|
liveRegionInserted: (attribute, by, condition) => `\u3053\u306E\u30E9\u30A4\u30D6\u30EA\u30FC\u30B8\u30E7\u30F3\uFF08${attribute}\uFF09\u306F\u3001${by === "route" ? "<wcs-route> \u306B\u5165\u3063\u305F\u3068\u304D" : by === "for" ? "for: \u306E\u884C\u304C\u8DB3\u3055\u308C\u305F\u3068\u304D" : "\u679D\u304C\u73FE\u308C\u305F\u3068\u304D"}\u306B\u6587\u3054\u3068\u633F\u5165\u3055\u308C\u307E\u3059\uFF08${condition === null ? "\u6587\u3092\u66F8\u3044\u3066\u6301\u3063\u3066\u3044\u307E\u3059" : `\u6587\u306F\u6761\u4EF6 "${condition}" \u304C\u8AAD\u3080\u3082\u306E\u306B\u675F\u306D\u3066\u3042\u308A\u3001\u679D\u306F\u305D\u306E\u6587\u3068\u4E00\u7DD2\u306B\u73FE\u308C\u307E\u3059`}\uFF09\u3002\u30B9\u30AF\u30EA\u30FC\u30F3\u30EA\u30FC\u30C0\u30FC\u304C\u8AAD\u307F\u4E0A\u3052\u308B\u306E\u306F\u30DA\u30FC\u30B8\u306B\u3042\u308B\u30EA\u30FC\u30B8\u30E7\u30F3\u306E\u6587\u304C\u5909\u308F\u3063\u305F\u3068\u304D\u306A\u306E\u3067\u3001\u3053\u306E\u6587\u306F\u8AAD\u307F\u4E0A\u3052\u3089\u308C\u307E\u305B\u3093\uFF08\u633F\u5165\u3057\u305F\u3068\u304D\u306B\u8AAD\u307F\u4E0A\u3052\u3089\u308C\u308B\u306E\u306F role="alert" \u3060\u3051\u3067\u3059\uFF09\u2014 \u805E\u304B\u305B\u305F\u3044\u77E5\u3089\u305B\u306F\u3001\u5E38\u306B\u30DA\u30FC\u30B8\u306B\u3042\u308B\u30EA\u30FC\u30B8\u30E7\u30F3\u306B\u7F6E\u3044\u3066\u304F\u3060\u3055\u3044: \u30EA\u30FC\u30B8\u30E7\u30F3\u306F${by === "route" ? "\u30EB\u30FC\u30C8" : " template "}\u306E\u5916\u306B\u7F6E\u304D\u3001textContent: \u3092\u77E5\u3089\u305B\u308B\u6587\u306B\u675F\u306D\u3001\u77E5\u3089\u305B\u308B\u3053\u3068\u304C\u7121\u3044\u3068\u304D\u306F\u7A7A\u306B\u3059\u308B`,
|
|
13555
13730
|
didYouMean: (c) => `\u3002\u3082\u3057\u304B\u3057\u3066: "${c}"`,
|
|
13556
13731
|
none: () => `\u306A\u3057`,
|
|
13557
|
-
triggerSeededTruthy: (path) => `trigger \u30D0\u30A4\u30F3\u30C9\u5148 "${path}" \u304C true \u3067\u30B7\u30FC\u30C9\u3055\u308C\u3066\u3044\u307E\u3059\u3002trigger \u306F\u30A8\u30C3\u30B8\u691C\u51FA\u306A\u3057\uFF08truthy \u66F8\u304D\u8FBC\u307F\u3067\u5373\u767A\u706B\u30FBmanual \u3082\u30D0\u30A4\u30D1\u30B9\uFF09\u306E\u305F\u3081\u3001\u30D0\u30A4\u30F3\u30C9\u6642\u306B\u5373\u767A\u706B\u3057\u307E\u3059\u3002false \u3067\u30B7\u30FC\u30C9\u3057\u3066\u304F\u3060\u3055\u3044`,
|
|
13558
|
-
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
|
-
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`,
|
|
13732
|
+
triggerSeededTruthy: (path) => `trigger \u30D0\u30A4\u30F3\u30C9\u5148 "${path}" \u304C true \u3067\u30B7\u30FC\u30C9\u3055\u308C\u3066\u3044\u307E\u3059\u3002trigger \u306F\u30A8\u30C3\u30B8\u691C\u51FA\u306A\u3057\uFF08truthy \u66F8\u304D\u8FBC\u307F\u3067\u5373\u767A\u706B\u30FBmanual \u3082\u30D0\u30A4\u30D1\u30B9\uFF09\u306E\u305F\u3081\u3001\u30D0\u30A4\u30F3\u30C9\u6642\u306B\u5373\u767A\u706B\u3057\u307E\u3059\u3002false \u3067\u30B7\u30FC\u30C9\u3057\u3066\u304F\u3060\u3055\u3044\u30025.0 \u3067\u306F trigger \u306E\u6700\u521D\u306E\u540C\u671F\u306F\u8981\u7D20\u304C\u52DD\u3061\u3001\u4F55\u3082\u767A\u706B\u305B\u305A\u3001\u30B9\u30ED\u30C3\u30C8\u306F false \u306B\u306A\u308A\u307E\u3059\uFF08docs/migration-v5.ja.md#trigger-first-sync\uFF09`,
|
|
13733
|
+
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\u30025.0 \u3067\u306F\u3001\u6700\u521D\u306E\u540C\u671F\u306F\u4FDD\u5B58\u5024\u304C\u52DD\u3061\u307E\u3059\uFF08docs/migration-v5.ja.md#storage-first-sync\uFF09`,
|
|
13734
|
+
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\u30025.0 \u3067\u306F\u3001\u4FDD\u5B58\u306E\u7121\u3044\u30AD\u30FC\u306F\u7A2E\u3092\u6B8B\u3057\u307E\u3059\uFF08docs/migration-v5.ja.md#storage-missing-key\uFF09`,
|
|
13560
13735
|
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`,
|
|
13736
|
+
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
13737
|
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
13738
|
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
|
-
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`,
|
|
13739
|
+
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\u30025.0 \u306F basename \u3092\u5C0E\u304D\u307E\u305B\u3093\uFF08docs/migration-v5.ja.md#base-href\uFF09`,
|
|
13565
13740
|
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
13741
|
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: () =>
|
|
13742
|
+
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
13743
|
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
13744
|
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
13745
|
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`,
|
|
@@ -13707,7 +13882,7 @@ var en = {
|
|
|
13707
13882
|
wildcardOtherList: (p, over, loop) => `"${p}" ranges over the rows of "${over}", but the enclosing "for" template at that level renders "${loop}" (4.0 throws when the binding is established). A "*" in a binding is the row of the loop around it \u2014 read a row of another list in a getter, with $resolve(path, indexes)`,
|
|
13708
13883
|
outerInTemplate: (prop) => `"${prop}:" replaces its element, so it cannot be used inside a "for" / "if" template (a row or branch keeps its nodes by position; 4.0 throws at init). Bind innerHTML: on a wrapper element instead`,
|
|
13709
13884
|
directNotEvent: (prop) => `The #direct modifier applies only to event bindings (on*:); it is ignored on "${prop}"`,
|
|
13710
|
-
delegatedCurrentTarget: (suggested, eventName, handler) => `"${eventName}" bindings are delegated to the root, so event.currentTarget in "${handler}" is the root, not this element. Write "${suggested}:" to keep the listener on the element, or find the element with event.target.closest(...)`,
|
|
13885
|
+
delegatedCurrentTarget: (suggested, eventName, handler) => `"${eventName}" bindings are delegated to the root, so event.currentTarget in "${handler}" is the root, not this element. Write "${suggested}:" to keep the listener on the element, or find the element with event.target.closest(...). 5.0 puts the listener on the element by default (docs/migration-v5.md#event-delegation)`,
|
|
13711
13886
|
getterCycle: (cycle) => `Path getters form a dependency cycle: ${cycle}`,
|
|
13712
13887
|
updatedCallbackUnbound: (p) => `$renderedCallback is binding-driven. "${p}" is not bound anywhere in this document, so this branch never runs. Use $watch to react without depending on what is rendered`,
|
|
13713
13888
|
onHandlerThis: (name) => `The $on handler "${name}" uses this. A $on handler receives the state as its first argument (\`${name}(state, event) { state.x = \u2026 }\`) and this is undefined, so this.\u2026 throws when it is called \u2014 unlike $watch handlers and methods`,
|
|
@@ -13755,7 +13930,7 @@ var en = {
|
|
|
13755
13930
|
pathDynamicUnknownObjectSpread: (path, n, sp, from) => `The keys ${sp}${from === void 0 ? "" : ` (imported from "${from}")`} brings into "${path}" cannot be read statically, so the ${n === 1 ? "path" : `${n} paths`} bound under it ${n === 1 ? "is" : "are"} not checked. Spread a const of the module bound to an object literal, give the key a JSDoc @type with its shape, or declare it in the stateSchema of wcstack.manifest.json to have them checked`,
|
|
13756
13931
|
pathReadonlyTwoWay: (p, prop) => `"${p}" is a getter without a setter, and ${prop}: writes back what the reader enters, so every edit fails ("${p}" is a getter without a setter). Add a setter (set "${p}"(v) { \u2026 }), or bind it one way with #ro (${prop}#ro: ${p})`,
|
|
13757
13932
|
pathReadonlyOutput: (p, tag, member, atInit, twoWay, spread) => `"${p}" is a getter without a setter, but "${member}"${spread === void 0 ? "" : `, which "${spread}" binds,`} is ${twoWay ? "a member <" + tag + "> writes too (an output as well as an input)" : "an output of <" + tag + ">"}: the element writes its value to "${p}", and ${atInit ? "the write made when it is bound fails, so the state fails to initialize" : "that write fails each time the element reports a value"} ("${p}" is a getter without a setter). ${spread !== void 0 ? `Add a setter (set "${p}"(v) { \u2026 }), or bind "${member}" to a data path after the spread (${spread}; ${member}: <a data key>)` : !twoWay ? `Bind a data path and read it in the getter (${member}: <a data key>), or add a setter (set "${p}"(v) { \u2026 })` : atInit ? `Add a setter (set "${p}"(v) { \u2026 }), or take the first value from the state (remove #init=element)` : `Add a setter (set "${p}"(v) { \u2026 }), or bind it one way with #ro (${member}#ro: ${p} \u2014 the state still writes the element)`}`,
|
|
13758
|
-
submitWithoutPrevent: (h) => `onsubmit has no #prevent and "${h}" does not call preventDefault, so the browser submits the form too: the page reloads, or with the router a GET puts the fields (a password too) in the URL and the history. Write onsubmit#prevent: ${h}, or call event.preventDefault() in the handler`,
|
|
13933
|
+
submitWithoutPrevent: (h) => `onsubmit has no #prevent and "${h}" does not call preventDefault, so the browser submits the form too: the page reloads, or with the router a GET puts the fields (a password too) in the URL and the history. Write onsubmit#prevent: ${h}, or call event.preventDefault() in the handler. 5.0 prevents the submission by default on a form with neither action nor method (docs/migration-v5.md#submit-default)`,
|
|
13759
13934
|
guardReadsAtModuleTop: (r) => `The guard's module reads ${r} at its top level, outside the function it exports. The module is evaluated once, when the page loads, so the guard keeps the value it read then and decides every navigation with it (after a login, the session is still not there). Read it inside the exported function, which runs on every navigation`,
|
|
13760
13935
|
stateReadsAtModuleTop: (r) => `The state's module reads ${r} at its top level. The module is evaluated once per <wcs-state>, so the state keeps the value it read when the page loaded (a token or a session that changes later is not seen). Keep the value in state (bind it with <wcs-storage>), or read it inside the method that uses it`,
|
|
13761
13936
|
eventTokenUnbound: (t, handler) => `The event token "${t}" is declared in $eventTokens, but no eventToken.<member>: ${t} binding in this document emits it: no element fires it, so ${handler ? "its $on handler never runs" : "it never fires"}. Bind it on the element whose event should fire it (eventToken.<member>: ${t}, with <member> a wcBindable property of that element), or remove it from $eventTokens`,
|
|
@@ -13767,7 +13942,7 @@ var en = {
|
|
|
13767
13942
|
typeExpectation: (label, expected, resultType) => `"${label}" requires ${EN_EXPECTED_LABEL[expected]} (current type: ${resultType})`,
|
|
13768
13943
|
attrBooleanPresence: (a, p, rhs) => `"attr.${a}" is given a boolean. attr.* writes String(value), so false is written as ${a}="false" \u2014 and a boolean attribute is on whenever it is present, whatever its value: ${a}="false" still means ${a} (only null / undefined remove an attribute). Bind the property instead: ${p}: ${rhs}`,
|
|
13769
13944
|
attrBooleanText: (a, rhs) => `"attr.${a}" is given a boolean. attr.* writes String(value), so the attribute is "true" or "false" and is never removed (only null / undefined remove it): whatever tests its presence \u2014 [${a}] in CSS, hasAttribute() \u2014 finds it either way. To remove it while false, write attr.${a}: ${rhs}|defaults(null); if the text "true" / "false" is what is meant, say so: attr.${a}: ${rhs}|string`,
|
|
13770
|
-
radioBeforeValue: (binding, value, checkbox, fix) => `"${binding}:" is written before "${value}:", which gives this ${checkbox ? "checkbox" : "radio"} its value. Bindings are applied in the order written, so it is compared while its value is still the browser's default "on": nothing is checked at the first render \u2014 nothing says so, and a later write of the state checks the right one. Write the value first: ${fix}`,
|
|
13945
|
+
radioBeforeValue: (binding, value, checkbox, fix) => `"${binding}:" is written before "${value}:", which gives this ${checkbox ? "checkbox" : "radio"} its value. Bindings are applied in the order written, so it is compared while its value is still the browser's default "on": nothing is checked at the first render \u2014 nothing says so, and a later write of the state checks the right one. Write the value first: ${fix}. 5.0 applies an element's inputs before its radio: / checkbox: (docs/migration-v5.md#inputs-before-commands)`,
|
|
13771
13946
|
bindingExpression: (expression, fix) => `A binding takes a path and filters, not an expression: "${expression}" is not evaluated, it is looked up as a path of that name. ${fix !== null ? `Write ${fix}` : "Write a getter in the state that computes the value, and bind the getter's name"}`,
|
|
13772
13947
|
handlerExpression: (property, expression, method) => `An event binding names a method, not a call or a function: "${expression}" is not evaluated. ${method !== null ? `Write "${property}: ${method}"` : "Write the method's name"}; the handler is called with (event, ...loopIndexes), so read the row's values in the method through the loop index`,
|
|
13773
13948
|
attributeMustache: (name) => `{{ }} is read in text only: in the attribute "${name}" it stays as written. Bind the attribute (attr.${name}: <path>, with a getter that builds the string) \u2014 a server-side template that fills it before the page is served is fine`,
|
|
@@ -13777,8 +13952,18 @@ var en = {
|
|
|
13777
13952
|
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
13953
|
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
13954
|
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`,
|
|
13955
|
+
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`,
|
|
13956
|
+
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)`,
|
|
13957
|
+
v5PostUpdateWildcard: (path, list) => `$postUpdate("${path}"): in 4.x the * is the caller's row (outside a row, nothing is updated); in 5.0 it is every row. For one row in both, write its index ($postUpdate(\`${list}.\${index}\u2026\`)); for every row in both, name the list ($postUpdate("${list}")). (docs/migration-v5.md#post-update-wildcard)`,
|
|
13958
|
+
v5StorageKey: (value) => `<wcs-storage key="${value}">: 5.0 takes the key as storage-key only (React and Vue keep key for themselves). Write storage-key="${value}". (docs/migration-v5.md#storage-key)`,
|
|
13959
|
+
v5StorageKeyBinding: () => `key: on a <wcs-storage> \u2014 5.0 takes the key as storageKey only. Write storageKey: with the same path. (docs/migration-v5.md#storage-key)`,
|
|
13960
|
+
v5AttrOn: (name) => `attr.${name}: writes a handler as a string, which the browser runs as code. 5.0 refuses attr.on*:. Bind the event: ${name}: with a method of the state. (docs/migration-v5.md#attr-on)`,
|
|
13961
|
+
v5TriggerBeforeInput: (input) => `trigger: is written before ${input}:. Bindings apply in the order written, so in 4.x a trigger that is true fires before ${input} is there; 5.0 applies an element's inputs first. For both, write trigger: last. (docs/migration-v5.md#inputs-before-commands)`,
|
|
13962
|
+
v5BehaviorRemoved: (name) => `$behavior's ${name}: false \u2014 5.0 removes this option (it is always on). Take it out and check the page. (docs/migration-v5.md#behavior-removed)`,
|
|
13963
|
+
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}`,
|
|
13964
|
+
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
13965
|
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
|
-
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)`,
|
|
13966
|
+
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). 5.0 writes a number from a two-way value: on a number input (docs/migration-v5.md#number-input)`,
|
|
13782
13967
|
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}`,
|
|
13783
13968
|
bodyBinding: (tag, attribute) => `${attribute} on <${tag}> is never bound: <wcs-state> binds what is inside <body>, not <body> or <html> themselves, so the bindings written here do nothing (an event handler never runs; class., attr. and the rest are never written). Move the binding to an element inside <body> (a wrapper, <main>), or write the value from $connectedCallback or a $watch handler (document.documentElement.lang = \u2026)`,
|
|
13784
13969
|
linkHandler: (property, handler) => `"${property}:" on <wcs-link> never runs "${handler}": the <wcs-link> itself is display: none, and what the user clicks is the <a> it generates beside itself, so no event reaches the host. Put the handler on an element inside the link (its children move into the <a>) or on an element around it; to navigate from a handler, write the router's navigateUrl (data-wcs="navigateUrl: \u2026" on <wcs-router>)`,
|
|
@@ -13789,7 +13974,7 @@ var en = {
|
|
|
13789
13974
|
},
|
|
13790
13975
|
frequencyInvalid: (tag, value, suggested) => `frequency="${value}" is not a positive number, so <${tag}> reads it as "none" and the sensor runs at the browser's default rate, without a word. ${suggested === null ? "Write a positive number (Hz), or remove the attribute for the default rate" : `Write the number alone: frequency="${suggested}"`}`,
|
|
13791
13976
|
targetSelector: (tag, value) => `The target of <${tag}> is a CSS selector: target="${value}" selects <${value}> elements, and this document has none \u2014 it has an element with id="${value}". No target is found, so ${TARGET_EFFECT_EN[tag] ?? "the element does nothing"}. To name the id, write target="#${value}"`,
|
|
13792
|
-
commandEventArgument: (property, token, tag, method, more) => `"${property}: ${token}" emits the token straight from the event, so the commands that receive it are called with the event as their first argument. ${method}() of <${tag}> takes an argument there, and gets the event: ${method}(event)${more > 0 ? ` (and ${more} more such ${more === 1 ? "receiver" : "receivers"})` : ""}. Emit from a state method instead \u2014 write ${property}: <method>, with <method>() { this.${token}.emit(\u2026) } passing what ${method}() takes (emit with no argument when there is nothing to pass)`,
|
|
13977
|
+
commandEventArgument: (property, token, tag, method, more) => `"${property}: ${token}" emits the token straight from the event, so the commands that receive it are called with the event as their first argument. ${method}() of <${tag}> takes an argument there, and gets the event: ${method}(event)${more > 0 ? ` (and ${more} more such ${more === 1 ? "receiver" : "receivers"})` : ""}. Emit from a state method instead \u2014 write ${property}: <method>, with <method>() { this.${token}.emit(\u2026) } passing what ${method}() takes (emit with no argument when there is nothing to pass). 5.0 emits with no arguments from this form (docs/migration-v5.md#command-event-argument)`,
|
|
13793
13978
|
outputPathWritten: (path, tag, member, commands) => `"${path}" is bound to "${member}" of <${tag}>, an output: the element writes it, and a write from a script does not reach the element. Assigning true makes the element do nothing \u2014 only the page now says so. ${commands.length === 0 ? `<${tag}> has no command: the value is the element's to report. Remove the assignment` : `Ask the element with a command (${commands.join(", ")} \u2014 bind command.<method>: $command.<name> and call this.$command.<name>.emit() here), and let the element write "${path}"`}`,
|
|
13794
13979
|
filterUnknown: (n) => `Filter "${n}" is not a built-in filter`,
|
|
13795
13980
|
filterRemoved: (n, c) => `Filter "${n}" was removed in 4.0 (it was the 3.x old name of "${c}") \u2014 write "${c}"`,
|
|
@@ -13850,22 +14035,22 @@ var en = {
|
|
|
13850
14035
|
nativeCommandUnknown: (method, tag, allowed) => `"${method}" is not a command of a native <${tag}> (its commands: ${allowed}; the runtime throws wcs/token-misconfigured at initialization)`,
|
|
13851
14036
|
spreadNoBindable: (tag) => `'...' (spread) requires <${tag}> to expose a valid wcBindable declaration \u2014 this tag declares none, so the runtime raises an error`,
|
|
13852
14037
|
tagEventTokenKeyUnknown: (name, tag, declared) => `eventToken key "${name}" is not a wcBindable property of <${tag}>. Raw DOM event names never fire \u2014 use the property name (declared: ${declared})`,
|
|
13853
|
-
handleBoundAsValue: (name, tag) => `"${name}" of <${tag}> is a live resource (a handle), not a value. Bound to a state path, it puts an object no snapshot or SSR can carry into the state \u2014 receive it with eventToken.${name}: and hand it to the next element as a command argument`,
|
|
14038
|
+
handleBoundAsValue: (name, tag) => `"${name}" of <${tag}> is a live resource (a handle), not a value. Bound to a state path, it puts an object no snapshot or SSR can carry into the state \u2014 receive it with eventToken.${name}: and hand it to the next element as a command argument. 5.0 refuses a handle bound to a path (docs/migration-v5.md#handle-as-value)`,
|
|
13854
14039
|
ariaAttrUnknown: (name) => `"${name}" is not a WAI-ARIA attribute. setAttribute writes it anyway, and assistive technology silently ignores it`,
|
|
13855
14040
|
liveRegionInserted: (attribute, by, condition) => `This live region (${attribute}) is inserted with its text when ${by === "route" ? "its <wcs-route> is entered" : by === "for" ? "its for: row is added" : "its branch appears"} (${condition === null ? "it holds text written in the markup" : `its text is bound to what the condition "${condition}" reads, so the branch appears with the text`}). A screen reader announces a region whose text changes while it is in the page, so this text is not announced (an inserted role="alert" is the one form announced on insertion) \u2014 a status message meant to be heard belongs in a region that is always in the page: keep the region outside the ${by === "route" ? "route" : "template"}, bind its textContent: to the message, and empty it when there is nothing to say`,
|
|
13856
14041
|
didYouMean: (c) => `. Did you mean "${c}"?`,
|
|
13857
14042
|
none: () => `none`,
|
|
13858
|
-
triggerSeededTruthy: (path) => `The trigger-bound slot "${path}" is seeded with true. trigger has no edge detection (any truthy write fires, and it bypasses manual), so it fires immediately at bind. Seed it with false`,
|
|
13859
|
-
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
|
-
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`,
|
|
14043
|
+
triggerSeededTruthy: (path) => `The trigger-bound slot "${path}" is seeded with true. trigger has no edge detection (any truthy write fires, and it bypasses manual), so it fires immediately at bind. Seed it with false. In 5.0 the element wins the first sync of a trigger: nothing fires, and the slot becomes false (docs/migration-v5.md#trigger-first-sync)`,
|
|
14044
|
+
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). In 5.0 the stored value wins the first sync (docs/migration-v5.md#storage-first-sync)`,
|
|
14045
|
+
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. In 5.0 a key that is not stored leaves the seed (docs/migration-v5.md#storage-missing-key)`,
|
|
13861
14046
|
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`,
|
|
14047
|
+
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
14048
|
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
14049
|
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
|
-
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)`,
|
|
14050
|
+
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). 5.0 derives no basename (docs/migration-v5.md#base-href)`,
|
|
13866
14051
|
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
14052
|
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: () => `
|
|
14053
|
+
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
14054
|
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
14055
|
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
14056
|
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 +20367,6 @@ function validateDocumentEnv(html, locale2) {
|
|
|
20182
20367
|
message: msgs.linkQueryKeyIgnored(link.toKeys.join(" "), link.named.join(" "))
|
|
20183
20368
|
});
|
|
20184
20369
|
}
|
|
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
20370
|
const structure = scanStructure(scanText);
|
|
20210
20371
|
for (const at2 of structure.bareMustaches) {
|
|
20211
20372
|
diagnostics.push({
|
|
@@ -20227,30 +20388,6 @@ function validateDocumentEnv(html, locale2) {
|
|
|
20227
20388
|
}
|
|
20228
20389
|
return diagnostics;
|
|
20229
20390
|
}
|
|
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
20391
|
var SCOPED_AUTO = /@wcstack\/([a-z0-9-]+)(?:@[^/"'\s]+)?\/(?:auto\b|dist\/(?:split\/)?auto(?:\.min)?\.js\b)/;
|
|
20255
20392
|
var BUNDLE_AUTO = /(?:^|\/)wcstack(?:@[^/"'\s]+)?\/(?:auto\b|dist\/auto\.min\.js\b)/;
|
|
20256
20393
|
var BUNDLE_PACKAGES = ["state", "router", "fetch", "storage", "autoloader"];
|
|
@@ -20273,27 +20410,6 @@ function findWcstackAutoScripts(html) {
|
|
|
20273
20410
|
}
|
|
20274
20411
|
return out;
|
|
20275
20412
|
}
|
|
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
20413
|
function collectInlineImports(html) {
|
|
20298
20414
|
const out = [];
|
|
20299
20415
|
const scriptRegex = /<script\b((?:"[^"]*"|'[^']*'|[^>"'])*)>([\s\S]*?)<\/script\s*>/gi;
|
|
@@ -20311,10 +20427,6 @@ function collectInlineImports(html) {
|
|
|
20311
20427
|
}
|
|
20312
20428
|
return out;
|
|
20313
20429
|
}
|
|
20314
|
-
function classifySignalsSpecifier(spec) {
|
|
20315
|
-
if (!spec.includes("@wcstack/signals")) return null;
|
|
20316
|
-
return /@wcstack\/signals\/dom\b/.test(spec) ? "dom" : "bare";
|
|
20317
|
-
}
|
|
20318
20430
|
function extractSrc(openTag2) {
|
|
20319
20431
|
const srcMatch = /\bsrc\s*=\s*(["'])(.*?)\1/i.exec(openTag2);
|
|
20320
20432
|
if (!srcMatch) return null;
|
|
@@ -20526,6 +20638,7 @@ function namedPackages(text3) {
|
|
|
20526
20638
|
if (BUNDLE.test(text3)) out.push("wcstack");
|
|
20527
20639
|
return out.flatMap((p) => p === "wcstack" ? [...BUNDLE_PACKAGES] : [p]);
|
|
20528
20640
|
}
|
|
20641
|
+
var IMPORT_SPECIFIER = /(?:\bfrom\s*|\bimport\s*\(?\s*)(["'])([^"'\n]*)\1/g;
|
|
20529
20642
|
var MAX_FILES3 = 32;
|
|
20530
20643
|
var MAX_DEPTH2 = 4;
|
|
20531
20644
|
function validatePackageLoads(html, locale2, fileReader) {
|
|
@@ -20545,19 +20658,39 @@ function validatePackageLoads(html, locale2, fileReader) {
|
|
|
20545
20658
|
patch: m[4] === void 0 ? 0 : Number(m[4])
|
|
20546
20659
|
};
|
|
20547
20660
|
if (newest === null || comparePins(pin, newest.pin) > 0) {
|
|
20548
|
-
newest = { pin,
|
|
20661
|
+
newest = { pin, at: siteOf(ref2.start, ref2.file, m.index, m[0].length) };
|
|
20549
20662
|
}
|
|
20550
20663
|
}
|
|
20551
20664
|
}
|
|
20552
20665
|
if (lint !== null && newest !== null && newest.pin.major === lint.major && newest.pin.minor > lint.minor) {
|
|
20553
20666
|
out.push({
|
|
20554
20667
|
code: WcsDiagnosticCode.LintVersionBehind,
|
|
20555
|
-
|
|
20556
|
-
end: newest.end,
|
|
20668
|
+
...newest.at,
|
|
20557
20669
|
severity: "warning",
|
|
20558
20670
|
message: msgs.lintVersionBehind(newest.pin.spec, newest.pin.version, `${newest.pin.major}.${newest.pin.minor}`, ENGINE_VERSION)
|
|
20559
20671
|
});
|
|
20560
20672
|
}
|
|
20673
|
+
const dual = findSignalsDualEntry(loads.imported);
|
|
20674
|
+
if (dual !== null) {
|
|
20675
|
+
const { later, earlier, versions } = dual;
|
|
20676
|
+
out.push({
|
|
20677
|
+
code: WcsDiagnosticCode.SignalsDualEntry,
|
|
20678
|
+
...siteOf(later.start, later.file, 0, later.spec.length),
|
|
20679
|
+
severity: "error",
|
|
20680
|
+
message: msgs.signalsDualEntry(later.spec, earlier.spec, versions)
|
|
20681
|
+
});
|
|
20682
|
+
} else {
|
|
20683
|
+
const both = findSignalsImportMapBoth(scan);
|
|
20684
|
+
if (both !== null) {
|
|
20685
|
+
out.push({
|
|
20686
|
+
code: WcsDiagnosticCode.SignalsDualEntry,
|
|
20687
|
+
start: both.start,
|
|
20688
|
+
end: both.end,
|
|
20689
|
+
severity: "warning",
|
|
20690
|
+
message: msgs.signalsImportMapBoth()
|
|
20691
|
+
});
|
|
20692
|
+
}
|
|
20693
|
+
}
|
|
20561
20694
|
if (!loads.own || loads.unclear) return out;
|
|
20562
20695
|
const autoloader = loads.autoloader;
|
|
20563
20696
|
const components = loads.mapKeys.filter((k) => k.startsWith("@components/"));
|
|
@@ -20612,6 +20745,99 @@ function findLinksWithoutRouter(scan) {
|
|
|
20612
20745
|
function comparePins(a, b) {
|
|
20613
20746
|
return a.major - b.major || a.minor - b.minor || a.patch - b.patch;
|
|
20614
20747
|
}
|
|
20748
|
+
function siteOf(start, file, offset2, length) {
|
|
20749
|
+
if (file === void 0) return { start: start + offset2, end: start + offset2 + length };
|
|
20750
|
+
const position = createPositionMapper(file.text);
|
|
20751
|
+
const from = file.start + offset2;
|
|
20752
|
+
return {
|
|
20753
|
+
start,
|
|
20754
|
+
end: file.anchorEnd,
|
|
20755
|
+
origin: { path: file.path, start: from, end: from + length, startPosition: position(from), endPosition: position(from + length) }
|
|
20756
|
+
};
|
|
20757
|
+
}
|
|
20758
|
+
var SIGNALS_URL = /@wcstack\/signals(?![\w-])(?:@([^/?#"'`\s]+))?(\/[^?#"'`\s]*)?/;
|
|
20759
|
+
var REPO_SIGNALS = /\/packages\/signals\/dist\/([^?#"'`\s]*)/;
|
|
20760
|
+
var BUNDLING_HOST = /^(?:https?:)?\/\/(?:esm\.run|esm\.sh)\//i;
|
|
20761
|
+
var JSDELIVR_NPM = /^(?:https?:)?\/\/cdn\.jsdelivr\.net\/npm\//i;
|
|
20762
|
+
function signalsDistFile(name) {
|
|
20763
|
+
const m = /^(?:(index|dom)|core-[\w-]+)\.esm(\.min)?\.js$/.exec(name);
|
|
20764
|
+
if (m === null) return null;
|
|
20765
|
+
return { entry: m[1] === void 0 ? null : m[1] === "index" ? "." : "dom", build: m[2] === void 0 ? "esm" : "min" };
|
|
20766
|
+
}
|
|
20767
|
+
function signalsLoadOf(target) {
|
|
20768
|
+
if (target === void 0 || !(isUrl(target) || isRelative(target))) return null;
|
|
20769
|
+
const repo = REPO_SIGNALS.exec(target);
|
|
20770
|
+
if (repo !== null) {
|
|
20771
|
+
const file2 = signalsDistFile(repo[1]);
|
|
20772
|
+
return file2 === null ? null : { entry: file2.entry, version: null, bundled: false, build: { dir: `${target.slice(0, repo.index)}/packages/signals/dist/`, kind: file2.build } };
|
|
20773
|
+
}
|
|
20774
|
+
const m = SIGNALS_URL.exec(target);
|
|
20775
|
+
if (m === null) return null;
|
|
20776
|
+
const version3 = m[1] ?? null;
|
|
20777
|
+
const rest = m[2] ?? "";
|
|
20778
|
+
const path = target.replace(/[?#].*$/, "");
|
|
20779
|
+
if (BUNDLING_HOST.test(target) || JSDELIVR_NPM.test(target) && path.endsWith("/+esm")) {
|
|
20780
|
+
const sub = rest.replace(/\/\+esm$/, "").replace(/\/$/, "");
|
|
20781
|
+
const file2 = sub.startsWith("/dist/") ? signalsDistFile(sub.slice("/dist/".length)) : null;
|
|
20782
|
+
const entry = sub === "" ? "." : sub === "/dom" ? "dom" : file2?.entry ?? null;
|
|
20783
|
+
return { entry, version: version3, bundled: true, build: null };
|
|
20784
|
+
}
|
|
20785
|
+
const file = rest.startsWith("/dist/") ? signalsDistFile(rest.slice("/dist/".length)) : null;
|
|
20786
|
+
if (file !== null) {
|
|
20787
|
+
return { entry: file.entry, version: version3, bundled: false, build: { dir: `${target.slice(0, m.index + m[0].length - rest.length)}/dist/`, kind: file.build } };
|
|
20788
|
+
}
|
|
20789
|
+
return { entry: rest === "" ? "." : rest === "/dom" ? "dom" : null, version: version3, bundled: false, build: null };
|
|
20790
|
+
}
|
|
20791
|
+
function twoCores(a, b) {
|
|
20792
|
+
if (a.version !== null && b.version !== null && a.version !== b.version) return "versions";
|
|
20793
|
+
if (a.entry === null || b.entry === null || a.entry === b.entry) return null;
|
|
20794
|
+
if (a.bundled || b.bundled) return "entries";
|
|
20795
|
+
if (a.build === null || b.build === null) return null;
|
|
20796
|
+
if (a.build.dir === b.build.dir) return a.build.kind !== b.build.kind ? "entries" : null;
|
|
20797
|
+
return isUrl(a.build.dir) && isUrl(b.build.dir) ? "entries" : null;
|
|
20798
|
+
}
|
|
20799
|
+
function findSignalsDualEntry(imported) {
|
|
20800
|
+
const seen2 = [];
|
|
20801
|
+
for (const at2 of imported) {
|
|
20802
|
+
const load = signalsLoadOf(at2.target);
|
|
20803
|
+
if (load === null) continue;
|
|
20804
|
+
for (const before of seen2) {
|
|
20805
|
+
const why = twoCores(before.load, load);
|
|
20806
|
+
if (why === null) continue;
|
|
20807
|
+
return { later: at2, earlier: before.at, versions: why === "versions" ? [load.version, before.load.version] : null };
|
|
20808
|
+
}
|
|
20809
|
+
seen2.push({ load, at: at2 });
|
|
20810
|
+
}
|
|
20811
|
+
return null;
|
|
20812
|
+
}
|
|
20813
|
+
function findSignalsImportMapBoth(html) {
|
|
20814
|
+
const mapRegex = /<script\b((?:"[^"]*"|'[^']*'|[^>"'])*)>([\s\S]*?)<\/script\s*>/gi;
|
|
20815
|
+
let match;
|
|
20816
|
+
while ((match = mapRegex.exec(html)) !== null) {
|
|
20817
|
+
if (!/\btype\s*=\s*(["'])importmap\1/i.test(match[1])) continue;
|
|
20818
|
+
let imports;
|
|
20819
|
+
try {
|
|
20820
|
+
imports = JSON.parse(match[2]).imports;
|
|
20821
|
+
} catch {
|
|
20822
|
+
continue;
|
|
20823
|
+
}
|
|
20824
|
+
if (imports === null || typeof imports !== "object") continue;
|
|
20825
|
+
const core = imports["@wcstack/signals"];
|
|
20826
|
+
const dom = imports["@wcstack/signals/dom"] ?? imports["@wcstack/signals/"];
|
|
20827
|
+
if (typeof core !== "string" || typeof dom !== "string") continue;
|
|
20828
|
+
if (core.includes("/dist/") && dom.includes("/dist/")) continue;
|
|
20829
|
+
const key = '"@wcstack/signals"';
|
|
20830
|
+
const at2 = match[2].indexOf(key);
|
|
20831
|
+
const bodyStart = match.index + match[0].indexOf(">") + 1;
|
|
20832
|
+
const start = bodyStart + (at2 === -1 ? 0 : at2 + 1);
|
|
20833
|
+
return { start, end: start + key.length - 2 };
|
|
20834
|
+
}
|
|
20835
|
+
return null;
|
|
20836
|
+
}
|
|
20837
|
+
function loadRulesApply(html, fileReader) {
|
|
20838
|
+
const loads = collectPageLoads(blankHtmlComments(html), fileReader);
|
|
20839
|
+
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);
|
|
20840
|
+
}
|
|
20615
20841
|
function parseVersion(version3) {
|
|
20616
20842
|
const m = /^(\d+)\.(\d+)/.exec(version3);
|
|
20617
20843
|
return m === null ? null : { major: Number(m[1]), minor: Number(m[2]) };
|
|
@@ -20654,14 +20880,16 @@ function autoloaderModules(scan, imports) {
|
|
|
20654
20880
|
const out = [];
|
|
20655
20881
|
for (const [key, value] of imports) {
|
|
20656
20882
|
if (!key.startsWith("@components/") || isUrl(value)) continue;
|
|
20883
|
+
const at2 = scan.indexOf(JSON.stringify(key));
|
|
20884
|
+
const anchor = at2 === -1 ? { start: 0, end: 0 } : { start: at2 + 1, end: at2 + 1 + key.length };
|
|
20657
20885
|
const body = key.slice("@components/".length);
|
|
20658
20886
|
if (!body.endsWith("/")) {
|
|
20659
|
-
if (!body.startsWith("wcs-")) out.push(pagePath2(value));
|
|
20887
|
+
if (!body.startsWith("wcs-")) out.push({ path: pagePath2(value), ...anchor });
|
|
20660
20888
|
continue;
|
|
20661
20889
|
}
|
|
20662
20890
|
const prefix = body.slice(0, -1).replace(/\|[^/]*$/, "").replace(/\//g, "-");
|
|
20663
20891
|
for (const tag of tags) {
|
|
20664
|
-
if (prefix !== "" && tag.startsWith(`${prefix}-`)) out.push(pagePath2(`${value}${tag.slice(prefix.length + 1)}.js`));
|
|
20892
|
+
if (prefix !== "" && tag.startsWith(`${prefix}-`)) out.push({ path: pagePath2(`${value}${tag.slice(prefix.length + 1)}.js`), ...anchor });
|
|
20665
20893
|
}
|
|
20666
20894
|
}
|
|
20667
20895
|
return out;
|
|
@@ -20675,7 +20903,8 @@ function collectPageLoads(scan, fileReader) {
|
|
|
20675
20903
|
autoloader: false,
|
|
20676
20904
|
imports: /* @__PURE__ */ new Map(),
|
|
20677
20905
|
mapKeys: [],
|
|
20678
|
-
references: []
|
|
20906
|
+
references: [],
|
|
20907
|
+
imported: []
|
|
20679
20908
|
};
|
|
20680
20909
|
const name = (text3, own3) => {
|
|
20681
20910
|
const pkgs = namedPackages(text3);
|
|
@@ -20683,7 +20912,7 @@ function collectPageLoads(scan, fileReader) {
|
|
|
20683
20912
|
if (own3 && pkgs.length > 0) loads.own = true;
|
|
20684
20913
|
};
|
|
20685
20914
|
const locals = [];
|
|
20686
|
-
const
|
|
20915
|
+
const written = [];
|
|
20687
20916
|
const scriptRegex = /<script\b((?:"[^"]*"|'[^']*'|[^>"'])*)>([\s\S]*?)<\/script\s*>/gi;
|
|
20688
20917
|
let match;
|
|
20689
20918
|
while ((match = scriptRegex.exec(scan)) !== null) {
|
|
@@ -20694,8 +20923,9 @@ function collectPageLoads(scan, fileReader) {
|
|
|
20694
20923
|
if (src !== null) {
|
|
20695
20924
|
const start = match.index + src.offsetInTag;
|
|
20696
20925
|
loads.references.push({ text: src.value, start });
|
|
20926
|
+
written.push({ spec: src.value, start, inline: false });
|
|
20697
20927
|
name(src.value, true);
|
|
20698
|
-
if (namedPackages(src.value).length === 0 && !isUrl(src.value)) locals.push(pagePath2(src.value));
|
|
20928
|
+
if (namedPackages(src.value).length === 0 && !isUrl(src.value)) locals.push({ path: pagePath2(src.value), start, end: start + src.value.length });
|
|
20699
20929
|
continue;
|
|
20700
20930
|
}
|
|
20701
20931
|
if (type === "importmap") {
|
|
@@ -20705,11 +20935,11 @@ function collectPageLoads(scan, fileReader) {
|
|
|
20705
20935
|
if (type !== "" && type !== "module" && !/^(?:text|application)\/(?:x-)?(?:javascript|ecmascript)$/.test(type)) continue;
|
|
20706
20936
|
const body = blankJsComments(match[2]);
|
|
20707
20937
|
name(body, false);
|
|
20708
|
-
for (const im of body.matchAll(
|
|
20938
|
+
for (const im of body.matchAll(IMPORT_SPECIFIER)) {
|
|
20709
20939
|
const start = bodyStart + im.index + im[0].indexOf(im[1]) + 1;
|
|
20710
20940
|
loads.references.push({ text: im[2], start });
|
|
20941
|
+
written.push({ spec: im[2], start, inline: true });
|
|
20711
20942
|
name(im[2], true);
|
|
20712
|
-
specifiers.push(im[2]);
|
|
20713
20943
|
}
|
|
20714
20944
|
}
|
|
20715
20945
|
for (const m of scan.matchAll(/<link\b((?:"[^"]*"|'[^']*'|[^>"'])*)>/gi)) {
|
|
@@ -20717,11 +20947,12 @@ function collectPageLoads(scan, fileReader) {
|
|
|
20717
20947
|
const href = attrValue(m[1], "href");
|
|
20718
20948
|
if (href !== null) name(href, false);
|
|
20719
20949
|
}
|
|
20720
|
-
for (const
|
|
20721
|
-
|
|
20722
|
-
|
|
20950
|
+
for (const w of written) {
|
|
20951
|
+
const target = w.inline ? resolveSpecifier(w.spec, loads.imports) : w.spec;
|
|
20952
|
+
loads.imported.push({ spec: w.spec, target, start: w.start, end: w.start + w.spec.length });
|
|
20953
|
+
if (!w.inline || namedPackages(w.spec).length > 0) continue;
|
|
20723
20954
|
if (target === void 0 || namedPackages(target).length > 0 || isUrl(target)) continue;
|
|
20724
|
-
if (isRelative(target)) locals.push(pagePath2(target));
|
|
20955
|
+
if (isRelative(target)) locals.push({ path: pagePath2(target), start: w.start, end: w.start + w.spec.length });
|
|
20725
20956
|
}
|
|
20726
20957
|
loads.autoloader = loads.pkgs.has("autoloader") || /<wcs-autoloader\b/i.test(scan);
|
|
20727
20958
|
if (loads.autoloader) locals.push(...autoloaderModules(scan, loads.imports));
|
|
@@ -20770,9 +21001,9 @@ function readLocalModules(entries, fileReader, loads) {
|
|
|
20770
21001
|
return;
|
|
20771
21002
|
}
|
|
20772
21003
|
const seen2 = /* @__PURE__ */ new Set();
|
|
20773
|
-
const queue = entries.map((
|
|
21004
|
+
const queue = entries.map((entry) => ({ spec: entry.path, from: "", depth: 0, start: entry.start, end: entry.end }));
|
|
20774
21005
|
while (queue.length > 0) {
|
|
20775
|
-
const { spec, from, depth } = queue.shift();
|
|
21006
|
+
const { spec, from, depth, start, end } = queue.shift();
|
|
20776
21007
|
const path = joinModulePath(from, spec);
|
|
20777
21008
|
if (seen2.has(path)) continue;
|
|
20778
21009
|
if (seen2.size >= MAX_FILES3 || depth > MAX_DEPTH2) {
|
|
@@ -20787,14 +21018,25 @@ function readLocalModules(entries, fileReader, loads) {
|
|
|
20787
21018
|
}
|
|
20788
21019
|
for (const p of namedPackages(text3)) loads.pkgs.add(p);
|
|
20789
21020
|
for (const m of text3.matchAll(/["'`](wcs-[a-z0-9-]+)["'`]/g)) loads.definedTags.add(m[1]);
|
|
20790
|
-
for (const im of text3.matchAll(
|
|
21021
|
+
for (const im of text3.matchAll(IMPORT_SPECIFIER)) {
|
|
20791
21022
|
if (namedPackages(im[2]).length > 0) continue;
|
|
20792
21023
|
const target = resolveSpecifier(im[2], loads.imports);
|
|
20793
21024
|
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 });
|
|
21025
|
+
queue.push({ spec: target, from: isRelative(im[2]) ? path : "", depth: depth + 1, start, end });
|
|
21026
|
+
}
|
|
21027
|
+
for (const im of blankJsComments(text3).matchAll(IMPORT_SPECIFIER)) {
|
|
21028
|
+
const at2 = im.index + im[0].indexOf(im[1]) + 1;
|
|
21029
|
+
const file = { path, text: text3, start: at2, end: at2 + im[2].length, anchorEnd: end };
|
|
21030
|
+
loads.imported.push({ spec: im[2], target: moduleTarget(im[2], path, loads.imports), start, end, file });
|
|
21031
|
+
loads.references.push({ text: im[2], start, file });
|
|
20795
21032
|
}
|
|
20796
21033
|
}
|
|
20797
21034
|
}
|
|
21035
|
+
function moduleTarget(spec, from, imports) {
|
|
21036
|
+
if (!spec.startsWith("./") && !spec.startsWith("../")) return resolveSpecifier(spec, imports);
|
|
21037
|
+
const path = joinModulePath(from, spec);
|
|
21038
|
+
return path === void 0 ? void 0 : pagePath2(path);
|
|
21039
|
+
}
|
|
20798
21040
|
|
|
20799
21041
|
// src/service/watchDeclarationValidator.ts
|
|
20800
21042
|
var STATE_NAME_SEPARATOR = "@";
|
|
@@ -22432,6 +22674,220 @@ function validateCollectionMutations(html, stateTagName = "wcs-state", locale2)
|
|
|
22432
22674
|
return out;
|
|
22433
22675
|
}
|
|
22434
22676
|
|
|
22677
|
+
// src/service/streamDeclarationValidator.ts
|
|
22678
|
+
function validateStreamDeclarations(html, stateTagName = "wcs-state", locale2) {
|
|
22679
|
+
if (!html.includes("$stream")) return [];
|
|
22680
|
+
const msgs = getMessages(locale2);
|
|
22681
|
+
const out = [];
|
|
22682
|
+
for (const element2 of parseWcsStateElements(html, stateTagName)) {
|
|
22683
|
+
if (element2.bindComponent || element2.mountPath !== null) continue;
|
|
22684
|
+
for (const block of element2.scriptBlocks) {
|
|
22685
|
+
if (!block.content.includes("$stream")) continue;
|
|
22686
|
+
for (const entry of analyzeStreamEntries(block.content)) {
|
|
22687
|
+
if (entry.keys === null) continue;
|
|
22688
|
+
const message = !entry.keys.includes("source") ? msgs.streamSourceMissing(entry.name) : entry.keys.includes("fold") && !entry.keys.includes("initial") ? msgs.streamFoldWithoutInitial(entry.name) : null;
|
|
22689
|
+
if (message === null) continue;
|
|
22690
|
+
out.push({
|
|
22691
|
+
code: WcsDiagnosticCode.StreamDeclaration,
|
|
22692
|
+
start: block.contentStart + entry.start,
|
|
22693
|
+
end: block.contentStart + entry.end,
|
|
22694
|
+
message,
|
|
22695
|
+
severity: "error"
|
|
22696
|
+
});
|
|
22697
|
+
}
|
|
22698
|
+
}
|
|
22699
|
+
}
|
|
22700
|
+
return out;
|
|
22701
|
+
}
|
|
22702
|
+
|
|
22703
|
+
// src/service/htmlSinkInputValidator.ts
|
|
22704
|
+
var HTML_SINKS = /* @__PURE__ */ new Set(["html", "innerHTML", "outerHTML", "srcdoc"]);
|
|
22705
|
+
function validateHtmlSinkInputs(html, bindAttribute = "data-wcs", locale2) {
|
|
22706
|
+
const attrs = findAllBindAttributes(html, bindAttribute);
|
|
22707
|
+
if (!attrs.some((attr) => attr.tagName === "input" || attr.tagName === "textarea" || attr.tagName === "select")) return [];
|
|
22708
|
+
const written = /* @__PURE__ */ new Map();
|
|
22709
|
+
for (const attr of attrs) {
|
|
22710
|
+
const tag = attr.tagName;
|
|
22711
|
+
if (tag !== "input" && tag !== "textarea" && tag !== "select") continue;
|
|
22712
|
+
if (tag === "input") {
|
|
22713
|
+
const type = (attr.inputType ?? "text").toLowerCase();
|
|
22714
|
+
if (NOT_ENTERED.has(type) || NOT_TYPED.has(type) || type === "number") continue;
|
|
22715
|
+
}
|
|
22716
|
+
for (const binding of splitBindingExpressions(attr.value)) {
|
|
22717
|
+
const p = parseBindingExpression(binding);
|
|
22718
|
+
if (p.path === null || propertyName(p.property) !== "value" || !writesBack(attr, "value", p.property)) continue;
|
|
22719
|
+
const path = expandRowPath2(p.path.trim(), html, attr.valueStart, bindAttribute);
|
|
22720
|
+
if (path !== null && !written.has(path)) written.set(path, tag);
|
|
22721
|
+
}
|
|
22722
|
+
}
|
|
22723
|
+
if (written.size === 0) return [];
|
|
22724
|
+
const msgs = getMessages(locale2);
|
|
22725
|
+
const out = [];
|
|
22726
|
+
for (const attr of attrs) {
|
|
22727
|
+
let pos = 0;
|
|
22728
|
+
for (const binding of splitBindingExpressions(attr.value)) {
|
|
22729
|
+
const bindingStart = attr.valueStart + pos;
|
|
22730
|
+
pos += binding.length + 1;
|
|
22731
|
+
const p = parseBindingExpression(binding);
|
|
22732
|
+
if (p.path === null || !HTML_SINKS.has(propertyName(p.property))) continue;
|
|
22733
|
+
const path = p.path.trim();
|
|
22734
|
+
const statePath = expandRowPath2(path, html, attr.valueStart, bindAttribute);
|
|
22735
|
+
const control = statePath === null ? void 0 : written.get(statePath);
|
|
22736
|
+
if (control === void 0) continue;
|
|
22737
|
+
const colon = indexOfOutsideQuotes2(binding, ":");
|
|
22738
|
+
const pathStart = bindingStart + binding.indexOf(path, colon + 1);
|
|
22739
|
+
out.push({
|
|
22740
|
+
code: WcsDiagnosticCode.HtmlSinkInput,
|
|
22741
|
+
start: pathStart,
|
|
22742
|
+
end: pathStart + path.length,
|
|
22743
|
+
message: msgs.htmlSinkInput(`${binding.slice(0, colon).trim()}: ${binding.slice(colon + 1).trim()}`, control, path),
|
|
22744
|
+
severity: "warning",
|
|
22745
|
+
statePath
|
|
22746
|
+
});
|
|
22747
|
+
}
|
|
22748
|
+
}
|
|
22749
|
+
return out;
|
|
22750
|
+
}
|
|
22751
|
+
|
|
22752
|
+
// src/service/v5MigrationValidator.ts
|
|
22753
|
+
var STORAGE_TAG = "wcs-storage";
|
|
22754
|
+
var REMOVED_BEHAVIORS = /* @__PURE__ */ new Set(["sameValueGuard", "enableDirectionalInitialSync"]);
|
|
22755
|
+
function validateV5Migration(html, bindAttribute = "data-wcs", stateTagName = "wcs-state", locale2, fileReader) {
|
|
22756
|
+
const msgs = getMessages(locale2);
|
|
22757
|
+
const out = [];
|
|
22758
|
+
const report = (start, end, message) => {
|
|
22759
|
+
out.push({ code: WcsDiagnosticCode.V5Migration, start, end, message, severity: "info" });
|
|
22760
|
+
};
|
|
22761
|
+
if (html.includes(STORAGE_TAG)) {
|
|
22762
|
+
for (const tag of findStartTagRegions(html)) {
|
|
22763
|
+
if (tag.tagName !== STORAGE_TAG) continue;
|
|
22764
|
+
const key = extractAttributeSpan(html.slice(tag.start, tag.end), "key", tag.start);
|
|
22765
|
+
if (key !== null) report(key.start, key.end, msgs.v5StorageKey(html.slice(key.valueStart, key.valueEnd)));
|
|
22766
|
+
}
|
|
22767
|
+
}
|
|
22768
|
+
if (html.includes("attr.on") || html.includes("trigger") || html.includes(STORAGE_TAG)) {
|
|
22769
|
+
let lookup = null;
|
|
22770
|
+
let ignored = null;
|
|
22771
|
+
for (const attr of findAllBindAttributes(html, bindAttribute)) {
|
|
22772
|
+
ignored ??= findIgnoredRanges(html, bindAttribute);
|
|
22773
|
+
if (ignored.some(([start, end]) => attr.valueStart >= start && attr.valueStart < end)) continue;
|
|
22774
|
+
const bindings = [];
|
|
22775
|
+
let pos = 0;
|
|
22776
|
+
for (const binding of splitBindingExpressions(attr.value)) {
|
|
22777
|
+
const bindingStart = attr.valueStart + pos;
|
|
22778
|
+
pos += binding.length + 1;
|
|
22779
|
+
const parsed = parseBindingExpression(binding);
|
|
22780
|
+
if (parsed.path === null) continue;
|
|
22781
|
+
const leading = binding.length - binding.trimStart().length;
|
|
22782
|
+
const start = bindingStart + leading;
|
|
22783
|
+
bindings.push({ name: propertyName(parsed.property), start, end: start + parsed.property.length });
|
|
22784
|
+
}
|
|
22785
|
+
for (const binding of bindings) {
|
|
22786
|
+
if (/^attr\.on[a-z]+$/i.test(binding.name)) {
|
|
22787
|
+
report(binding.start, binding.end, msgs.v5AttrOn(binding.name.slice("attr.".length).toLowerCase()));
|
|
22788
|
+
} else if (binding.name === "key" && attr.tagName === STORAGE_TAG) {
|
|
22789
|
+
report(binding.start, binding.end, msgs.v5StorageKeyBinding());
|
|
22790
|
+
}
|
|
22791
|
+
}
|
|
22792
|
+
const trigger = bindings.findIndex((binding) => binding.name === "trigger");
|
|
22793
|
+
if (trigger < 0 || trigger === bindings.length - 1 || attr.tagName === void 0 || !attr.tagName.includes("-")) continue;
|
|
22794
|
+
lookup ??= createContractLookup(html, fileReader);
|
|
22795
|
+
const contract = lookup(attr.tagName);
|
|
22796
|
+
if (contract === null || memberRole(contract, "trigger") === null) continue;
|
|
22797
|
+
const later = bindings.slice(trigger + 1).find((binding) => {
|
|
22798
|
+
const role = memberRole(contract, binding.name);
|
|
22799
|
+
return role === "input" || role === "two-way";
|
|
22800
|
+
});
|
|
22801
|
+
if (later !== void 0) report(bindings[trigger].start, bindings[trigger].end, msgs.v5TriggerBeforeInput(later.name));
|
|
22802
|
+
}
|
|
22803
|
+
}
|
|
22804
|
+
if (html.includes("$postUpdate") || html.includes("$behavior")) {
|
|
22805
|
+
for (const element2 of parseWcsStateElements(html, stateTagName)) {
|
|
22806
|
+
for (const block of element2.scriptBlocks) {
|
|
22807
|
+
if (block.content.includes("$postUpdate")) {
|
|
22808
|
+
const source = blankComments2(block.content);
|
|
22809
|
+
const calls = createApiCallRegex(["postUpdate"]);
|
|
22810
|
+
for (let match = calls.exec(source); match !== null; match = calls.exec(source)) {
|
|
22811
|
+
const call = splitCallArgs(source, match.index + match[0].length);
|
|
22812
|
+
if (call === null || call.args.length === 0) continue;
|
|
22813
|
+
const path = literalString(call.args[0]);
|
|
22814
|
+
if (path === null) continue;
|
|
22815
|
+
const segments = path.split(".");
|
|
22816
|
+
const at2 = segments.indexOf("*");
|
|
22817
|
+
if (at2 <= 0) continue;
|
|
22818
|
+
const start = block.contentStart + call.starts[0];
|
|
22819
|
+
report(start, start + call.args[0].trimEnd().length, msgs.v5PostUpdateWildcard(path, segments.slice(0, at2).join(".")));
|
|
22820
|
+
}
|
|
22821
|
+
}
|
|
22822
|
+
if (block.content.includes("$behavior") && element2.mountPath === null && !element2.bindComponent) {
|
|
22823
|
+
for (const entry of analyzeDeclarationEntries(block.content, "$behavior")) {
|
|
22824
|
+
if (!REMOVED_BEHAVIORS.has(entry.name) || entry.value !== "false") continue;
|
|
22825
|
+
report(block.contentStart + entry.start, block.contentStart + entry.end, msgs.v5BehaviorRemoved(entry.name));
|
|
22826
|
+
}
|
|
22827
|
+
}
|
|
22828
|
+
}
|
|
22829
|
+
}
|
|
22830
|
+
}
|
|
22831
|
+
return out;
|
|
22832
|
+
}
|
|
22833
|
+
|
|
22834
|
+
// src/service/eventBeforeBindingValidator.ts
|
|
22835
|
+
var STARTED_BY = {
|
|
22836
|
+
"wcs-sse": "url",
|
|
22837
|
+
"wcs-ws": "url",
|
|
22838
|
+
"wcs-broadcast": "name"
|
|
22839
|
+
};
|
|
22840
|
+
function validateEventsBeforeBinding(html, bindAttribute = "data-wcs", stateTagName = "wcs-state", locale2) {
|
|
22841
|
+
if (!/<wcs-(?:sse|ws|broadcast)\b/i.test(html) || !html.toLowerCase().includes(`<${stateTagName.toLowerCase()}`)) return [];
|
|
22842
|
+
const msgs = getMessages(locale2);
|
|
22843
|
+
const out = [];
|
|
22844
|
+
let insideTemplate = null;
|
|
22845
|
+
for (const region of findStartTagRegions(html)) {
|
|
22846
|
+
const attribute = STARTED_BY[region.tagName];
|
|
22847
|
+
if (attribute === void 0) continue;
|
|
22848
|
+
const events = BUILTIN_TAGS[region.tagName]?.events ?? [];
|
|
22849
|
+
if (events.length === 0) continue;
|
|
22850
|
+
const attributes = writtenAttributes(html, region.start, region.end);
|
|
22851
|
+
const bind = attributes.find((a) => a.name === bindAttribute.toLowerCase());
|
|
22852
|
+
if (bind === void 0 || bind.value === null || !bind.value.includes("eventToken.")) continue;
|
|
22853
|
+
if (attributes.some((a) => a.name === "manual")) continue;
|
|
22854
|
+
const literal2 = attributes.find((a) => a.name === attribute);
|
|
22855
|
+
if (literal2 === void 0 || literal2.value === null || literal2.value.trim() === "") continue;
|
|
22856
|
+
const eq3 = /=\s*["']?/.exec(html.slice(bind.start, bind.end));
|
|
22857
|
+
const valueStart = bind.start + eq3.index + eq3[0].length;
|
|
22858
|
+
const bindings = [];
|
|
22859
|
+
let pos = 0;
|
|
22860
|
+
for (const binding of splitBindingExpressions(bind.value)) {
|
|
22861
|
+
const p = parseBindingExpression(binding);
|
|
22862
|
+
const property = p.property.trim();
|
|
22863
|
+
const leading = binding.length - binding.trimStart().length;
|
|
22864
|
+
bindings.push({ name: propertyName(property), start: valueStart + pos + leading, property });
|
|
22865
|
+
pos += binding.length + 1;
|
|
22866
|
+
}
|
|
22867
|
+
const names2 = new Set(bindings.map((b) => b.name));
|
|
22868
|
+
if (names2.has(attribute) || names2.has(`attr.${attribute}`)) continue;
|
|
22869
|
+
if (bindings.some((b) => b.property === "...")) continue;
|
|
22870
|
+
const token = bindings.find((b) => {
|
|
22871
|
+
if (!b.name.startsWith("eventToken.")) return false;
|
|
22872
|
+
const output2 = b.name.slice("eventToken.".length);
|
|
22873
|
+
return events.includes(output2) && !names2.has(output2);
|
|
22874
|
+
});
|
|
22875
|
+
if (token === void 0) continue;
|
|
22876
|
+
if ((insideTemplate ??= createTemplateTester(html))(region.start)) continue;
|
|
22877
|
+
const output = token.name.slice("eventToken.".length);
|
|
22878
|
+
out.push({
|
|
22879
|
+
code: WcsDiagnosticCode.EventBeforeBinding,
|
|
22880
|
+
start: token.start,
|
|
22881
|
+
end: token.start + token.property.length,
|
|
22882
|
+
message: msgs.eventBeforeBinding(region.tagName, output, attribute),
|
|
22883
|
+
severity: "warning",
|
|
22884
|
+
tag: region.tagName,
|
|
22885
|
+
member: output
|
|
22886
|
+
});
|
|
22887
|
+
}
|
|
22888
|
+
return out;
|
|
22889
|
+
}
|
|
22890
|
+
|
|
22435
22891
|
// src/service/moduleTopReadValidator.ts
|
|
22436
22892
|
var GUARD_TAG2 = "wcs-guard-handler";
|
|
22437
22893
|
var STORAGES = /* @__PURE__ */ new Set(["localStorage", "sessionStorage"]);
|
|
@@ -23492,6 +23948,8 @@ function validateText(text3, options, applicationSchema, env) {
|
|
|
23492
23948
|
out.push(...validateBindingHosts(text3, bindAttribute, stateTagName, locale2));
|
|
23493
23949
|
out.push(...validateIoAttributes(text3, bindAttribute, locale2));
|
|
23494
23950
|
out.push(...validateCommandArguments(text3, bindAttribute, locale2));
|
|
23951
|
+
out.push(...validateHtmlSinkInputs(text3, bindAttribute, locale2));
|
|
23952
|
+
out.push(...validateEventsBeforeBinding(text3, bindAttribute, stateTagName, locale2));
|
|
23495
23953
|
if (env !== null) {
|
|
23496
23954
|
out.push(...validateDocumentEnv(env, locale2));
|
|
23497
23955
|
out.push(...validatePackageLoads(env, locale2, fileReader));
|
|
@@ -23509,6 +23967,8 @@ function validateText(text3, options, applicationSchema, env) {
|
|
|
23509
23967
|
out.push(...validateCollectionMutations(text3, stateTagName, locale2));
|
|
23510
23968
|
out.push(...validateModuleTopReads(text3, stateTagName, locale2));
|
|
23511
23969
|
out.push(...validateWatchDeclarations(text3, stateTagName, locale2, fileReader, bindAttribute, applicationSchema));
|
|
23970
|
+
out.push(...validateStreamDeclarations(text3, stateTagName, locale2));
|
|
23971
|
+
out.push(...validateV5Migration(text3, bindAttribute, stateTagName, locale2, fileReader));
|
|
23512
23972
|
out.push(...validateScanDeclarations(text3, stateTagName, locale2));
|
|
23513
23973
|
out.push(...validateRecursion(text3, stateTagName, locale2));
|
|
23514
23974
|
out.push(...validateConfigDeclarations(text3, stateTagName, locale2));
|
|
@@ -23721,7 +24181,7 @@ function runValidation(inputs, options = {}) {
|
|
|
23721
24181
|
const nothingToCheck = [];
|
|
23722
24182
|
for (const input of inputs) {
|
|
23723
24183
|
if (input.kind !== "html") continue;
|
|
23724
|
-
if (!hasAnythingToCheck(input.text, options.bindAttribute ?? "data-wcs", options.stateTagName ?? "wcs-state")) {
|
|
24184
|
+
if (!hasAnythingToCheck(input.text, options.bindAttribute ?? "data-wcs", options.stateTagName ?? "wcs-state") && !loadRulesApply(input.text, input.fileReader)) {
|
|
23725
24185
|
nothingToCheck.push(input.source);
|
|
23726
24186
|
}
|
|
23727
24187
|
const explicit = explicitSchemaFor(input, explicitSchemas, options.stateTagName ?? "wcs-state");
|