@wcstack/router 1.14.0 → 1.16.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/dist/index.d.ts CHANGED
@@ -1,3 +1,24 @@
1
+ interface IWcBindableProperty {
2
+ readonly name: string;
3
+ readonly event: string;
4
+ readonly getter?: (event: Event) => any;
5
+ }
6
+ interface IWcBindableInput {
7
+ readonly name: string;
8
+ readonly attribute?: string;
9
+ }
10
+ interface IWcBindableCommand {
11
+ readonly name: string;
12
+ readonly async?: boolean;
13
+ }
14
+ interface IWcBindable {
15
+ readonly protocol: "wc-bindable";
16
+ readonly version: 1;
17
+ readonly properties: readonly IWcBindableProperty[];
18
+ readonly inputs?: readonly IWcBindableInput[];
19
+ readonly commands?: readonly IWcBindableCommand[];
20
+ }
21
+
1
22
  interface ITagNames {
2
23
  readonly route: string;
3
24
  readonly router: string;
@@ -29,26 +50,6 @@ interface IWritableConfig {
29
50
  basenameFileExtensions?: string[];
30
51
  }
31
52
  type BuiltinParamTypes = "int" | "float" | "bool" | "uuid" | "slug" | "isoDate" | "any";
32
- interface IWcBindableProperty {
33
- readonly name: string;
34
- readonly event: string;
35
- readonly getter?: (event: Event) => any;
36
- }
37
- interface IWcBindableInput {
38
- readonly name: string;
39
- readonly attribute?: string;
40
- }
41
- interface IWcBindableCommand {
42
- readonly name: string;
43
- readonly async?: boolean;
44
- }
45
- interface IWcBindable {
46
- readonly protocol: "wc-bindable";
47
- readonly version: 1;
48
- readonly properties: IWcBindableProperty[];
49
- readonly inputs?: readonly IWcBindableInput[];
50
- readonly commands?: readonly IWcBindableCommand[];
51
- }
52
53
 
53
54
  /**
54
55
  * Initialize the router with optional configuration.
package/dist/index.esm.js CHANGED
@@ -1244,11 +1244,11 @@ function testPath(route, path, segments) {
1244
1244
  finalResult = true;
1245
1245
  }
1246
1246
  else if (i === route.absoluteSegmentInfos.length && segIndex === segments.length) {
1247
- // 全セグメントが消費された
1248
- finalResult = true;
1249
- }
1250
- else if (i === route.absoluteSegmentInfos.length && segIndex === segments.length - 1 && segments.at(-1) === '') {
1251
- // 末尾スラッシュ対応: /users/ -> ['', 'users', '']
1247
+ // 全セグメントが消費された。
1248
+ // 末尾スラッシュ(例: /users/)は matchRoutes 側で処理済み: normalizePathname が
1249
+ // ルート以外の末尾スラッシュを除去し、matchRoutes の filter が末尾の空セグメントを
1250
+ // 落とすため、testPath に渡る segments に末尾 '' は含まれない。よってここで
1251
+ // 末尾スラッシュ用の分岐は不要(trailing-slash の結合テストは matchRoutes.test.ts 参照)。
1252
1252
  finalResult = true;
1253
1253
  }
1254
1254
  }
@@ -2233,7 +2233,7 @@ function bootstrapRouter(config) {
2233
2233
  registerComponents();
2234
2234
  }
2235
2235
 
2236
- var version = "1.14.0";
2236
+ var version = "1.16.0";
2237
2237
  var pkg = {
2238
2238
  version: version};
2239
2239