@wcstack/state 3.1.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.ja.md +128 -90
  2. package/README.md +129 -91
  3. package/dist/auto.min.js +1 -1
  4. package/dist/auto.min.js.map +1 -1
  5. package/dist/define.d.ts +11 -7
  6. package/dist/index.d.ts +58 -15
  7. package/dist/index.esm.js +1 -1
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/manifest.d.ts +39 -5
  10. package/dist/manifest.esm.js +315 -253
  11. package/dist/parser.d.ts +16 -2
  12. package/dist/parser.esm.js +223 -50
  13. package/dist/split/chunks/binder.js +1 -1
  14. package/dist/split/chunks/binder.js.map +1 -1
  15. package/dist/split/chunks/checkDependency.js +1 -1
  16. package/dist/split/chunks/declarationAliases.js +2 -0
  17. package/dist/split/chunks/declarationAliases.js.map +1 -0
  18. package/dist/split/chunks/declarationHooks.js +2 -0
  19. package/dist/split/chunks/declarationHooks.js.map +1 -0
  20. package/dist/split/chunks/featureBridge.js +2 -0
  21. package/dist/split/chunks/featureBridge.js.map +1 -0
  22. package/dist/split/chunks/filterRegistry.js +1 -1
  23. package/dist/split/chunks/filterRegistry.js.map +1 -1
  24. package/dist/split/chunks/getAllPropertyDescriptors.js +1 -1
  25. package/dist/split/chunks/getAllPropertyDescriptors.js.map +1 -1
  26. package/dist/split/chunks/lifecycleHooks.js +1 -1
  27. package/dist/split/chunks/pathDiagnostics.js +1 -1
  28. package/dist/split/chunks/pathDiagnostics.js.map +1 -1
  29. package/dist/split/chunks/registerComponents.js +1 -1
  30. package/dist/split/chunks/registerComponents.js.map +1 -1
  31. package/dist/split/chunks/setAll.js +1 -1
  32. package/dist/split/chunks/setAll.js.map +1 -1
  33. package/dist/split/chunks/version.js +1 -1
  34. package/dist/split/core.d.ts +21 -9
  35. package/dist/split/core.js +1 -1
  36. package/dist/split/core.js.map +1 -1
  37. package/dist/split/features/devtools.js +1 -1
  38. package/dist/split/features/devtools.js.map +1 -1
  39. package/dist/split/features/diagnostics.js +1 -1
  40. package/dist/split/features/diagnostics.js.map +1 -1
  41. package/dist/split/features/formats.js +1 -1
  42. package/dist/split/features/formats.js.map +1 -1
  43. package/dist/split/features/recursion.js +1 -1
  44. package/dist/split/features/recursion.js.map +1 -1
  45. package/dist/split/features/scopes.js +1 -1
  46. package/dist/split/features/scopes.js.map +1 -1
  47. package/dist/split/features/ssr.js +1 -1
  48. package/dist/split/features/ssr.js.map +1 -1
  49. package/dist/split/features/temporal.js +1 -1
  50. package/dist/split/features/temporal.js.map +1 -1
  51. package/dist/wcs-manifest.json +98 -44
  52. package/package.json +1 -1
  53. package/dist/split/chunks/mount.js +0 -2
  54. package/dist/split/chunks/mount.js.map +0 -1
  55. package/dist/split/chunks/watchRuntime.js +0 -2
  56. package/dist/split/chunks/watchRuntime.js.map +0 -1
@@ -30,12 +30,35 @@ interface IFilterMeta {
30
30
  /** 組み込みフィルタ名 → 構造化メタデータ。キー集合は builtinFilters と一致しなければならない。 */
31
31
  declare const builtinFilterMeta: Record<string, IFilterMeta>;
32
32
 
33
+ /**
34
+ * filters/filterAliases.ts — 組み込みフィルタの旧名 → 正式名(要件 B12・docs/state-3x-naming.ja.md V1〜V9)。
35
+ *
36
+ * 旧名は 3.x の間エイリアスとして残り、4.0 で外す(D4)。解決は登録簿(core/filterRegistry)が行い、
37
+ * 実装・引数の個数・メタデータは正式名だけが持つ。formats の install と manifest(tooling)の両方が読むので、
38
+ * 実装にもメタデータにも依存しない小さな表として独立させている。
39
+ */
40
+ declare const builtinFilterAliases: Readonly<Record<string, string>>;
41
+
42
+ declare const DECLARATION_ALIASES: Readonly<Record<string, string>>;
43
+
33
44
  type BindingType = 'text' | 'prop' | 'event' | 'for' | 'if' | 'elseif' | 'else' | 'radio' | 'checkbox' | 'spread';
34
45
 
35
46
  declare const STRUCTURAL_BINDING_TYPE_SET: Set<BindingType>;
36
47
 
37
- /** マニフェストのバージョン(構造を変えたら上げる)。 */
38
- declare const WCS_MANIFEST_VERSION = 1;
48
+ /**
49
+ * マニフェストのバージョン(構造を変えたら上げる)。
50
+ *
51
+ * 3.1 で `syntax.bindingTypes.explicitPropertyPrefix`、3.2 で `filterAliases`、
52
+ * 3.x の次で `declarationAliases` / `apiAliases` を足したので 2。
53
+ * 消費側(vscode-wcs)はまだこの定数を参照していないが、公開している以上ドリフトさせない。
54
+ */
55
+ declare const WCS_MANIFEST_VERSION = 2;
56
+ /**
57
+ * state API の旧名 → 正式名(要件 B12・docs/state-3x-naming.ja.md)。正本は
58
+ * `proxy/traps/get.ts` の case ラベルで、ここはそれを機械可読にした写し
59
+ * (一致は `__tests__/manifest.test.ts` が固定する)。
60
+ */
61
+ declare const STATE_API_ALIASES: Readonly<Record<string, string>>;
39
62
  interface IWcsManifest {
40
63
  version: number;
41
64
  syntax: {
@@ -98,13 +121,24 @@ interface IWcsManifest {
98
121
  filters: string[];
99
122
  /** 組み込みフィルタの構造化メタデータ(説明・引数仕様・型)。vscode-wcs の手リスト撤去用。 */
100
123
  filterMeta: Record<string, IFilterMeta>;
101
- /** 予約ライフサイクルフック名 */
124
+ /** 組み込みフィルタの旧名 → 正式名(要件 B12)。旧名も解決するが、ツールは正式名を提案する */
125
+ filterAliases: Readonly<Record<string, string>>;
126
+ /**
127
+ * 宣言キーの旧名 → 正式名(要件 B12。`$updatedCallback` → `$renderedCallback`、
128
+ * `$streams` → `$stream`)。ランタイムは旧名も受けるが、ツールは正式名を提案する。
129
+ * `reservedLifecycle` / `reservedStateApi` は**正式名だけ**なので、旧名が予約かどうかは
130
+ * この表と併せて判断する
131
+ */
132
+ declarationAliases: Readonly<Record<string, string>>;
133
+ /** state API の旧名 → 正式名(`$trackDependency` → `$dependOn` 等、要件 B12) */
134
+ apiAliases: Readonly<Record<string, string>>;
135
+ /** 予約ライフサイクルフック名(正式名のみ。旧名は `declarationAliases` を見る) */
102
136
  reservedLifecycle: readonly string[];
103
- /** 予約 state API(プロトコル系の `$` 名前空間) */
137
+ /** 予約 state API(プロトコル系の `$` 名前空間。正式名のみ) */
104
138
  reservedStateApi: readonly string[];
105
139
  }
106
140
  /** 機械可読な単一正本を返す。vscode-wcs はこれを消費する想定。 */
107
141
  declare function getWcsManifest(): IWcsManifest;
108
142
 
109
- export { STRUCTURAL_BINDING_TYPE_SET, WCS_MANIFEST_VERSION, builtinFilterMeta, getWcsManifest };
143
+ export { DECLARATION_ALIASES, STATE_API_ALIASES, STRUCTURAL_BINDING_TYPE_SET, WCS_MANIFEST_VERSION, builtinFilterAliases, builtinFilterMeta, getWcsManifest };
110
144
  export type { FilterArgType, FilterResultType, IFilterMeta, IWcsManifest };