@ssgoi/core 6.6.0 → 6.6.2
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.md +51 -5
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +431 -369
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts +4 -4
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/ssgoi-transition/find-matching-transition.d.ts +9 -3
- package/dist/ssgoi-transition/find-matching-transition.d.ts.map +1 -1
- package/dist/ssgoi-transition/unmount-observer.d.ts +5 -1
- package/dist/ssgoi-transition/unmount-observer.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -5,10 +5,10 @@ import { HostAnimation } from '../animation/host-animation';
|
|
|
5
5
|
*
|
|
6
6
|
* Pure promise plumbing: the framework adapter calls `in(element)` on mount
|
|
7
7
|
* and `out(element)` on unmount; the dispatcher pairs them by path via
|
|
8
|
-
* NavigationDetector, then `.then`-chains the prepare result, the
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* NavigationDetector, then `.then`-chains the prepare result, the `from`
|
|
9
|
+
* element, and the `to` element. `animation()` runs once the chain resolves —
|
|
10
|
+
* never via blocking `await` — so a follow-up navigation can start its own pair
|
|
11
|
+
* while a prior one is still building.
|
|
12
12
|
*/
|
|
13
13
|
export interface CreateSsgoiTransitionContextOptions {
|
|
14
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-ssgoi-transition-context.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/create-ssgoi-transition-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EACX,YAAY,EAOb,MAAM,QAAQ,CAAC;AAShB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AA8C5D;;;;;;;;;GASG;AACH,MAAM,WAAW,mCAAmC;IAClD;;;;OAIG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,EACpB,cAAc,GAAE,mCAAwC,GACvD,YAAY,
|
|
1
|
+
{"version":3,"file":"create-ssgoi-transition-context.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/create-ssgoi-transition-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EACX,YAAY,EAOb,MAAM,QAAQ,CAAC;AAShB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AA8C5D;;;;;;;;;GASG;AACH,MAAM,WAAW,mCAAmC;IAClD;;;;OAIG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,EACpB,cAAc,GAAE,mCAAwC,GACvD,YAAY,CAwgBd"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { TransitionConfig } from '../types/index.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Matches a path against a pattern
|
|
4
|
-
* Supports exact matches and
|
|
4
|
+
* Supports exact matches, wildcard patterns, and common route segment params
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* matchPath('/products', '/products') // true
|
|
8
8
|
* matchPath('/products/123', '/products/*') // true
|
|
9
|
+
* matchPath('/products', '/products/**') // true
|
|
10
|
+
* matchPath('/products/123/reviews', '/products/**') // true
|
|
11
|
+
* matchPath('/products/123', '/products/:id') // true
|
|
12
|
+
* matchPath('/products/123', '/products/[id]') // true
|
|
13
|
+
* matchPath('/products/123', '/products/{id}') // true
|
|
9
14
|
* matchPath('/products/123', '/products') // false
|
|
10
15
|
* matchPath('/anything', '*') // true
|
|
11
16
|
*/
|
|
@@ -13,8 +18,9 @@ export declare function matchPath(path: string, pattern: string): boolean;
|
|
|
13
18
|
/**
|
|
14
19
|
* Finds a matching transition configuration for the given from and to paths
|
|
15
20
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
21
|
+
* Chooses the most specific matching config. Exact paths outrank wildcard
|
|
22
|
+
* paths, deeper static wildcard prefixes outrank broader fallbacks, and equal
|
|
23
|
+
* specificity preserves the original config order.
|
|
18
24
|
*/
|
|
19
25
|
export declare function findMatchingTransition(from: string, to: string, transitions: Array<{
|
|
20
26
|
from: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-matching-transition.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/find-matching-transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"find-matching-transition.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/find-matching-transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AA6H/C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,KAAK,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC,GACD,gBAAgB,GAAG,IAAI,CAsBzB"}
|
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
* - parent re-mounts that detach the watched node also fire
|
|
11
11
|
* - lower memory / browser overhead than dozens of observers
|
|
12
12
|
*/
|
|
13
|
-
type
|
|
13
|
+
export type UnmountAnchor = {
|
|
14
|
+
parent: Node;
|
|
15
|
+
nextSibling: Node | null;
|
|
16
|
+
};
|
|
17
|
+
type UnmountCallback = (anchor?: UnmountAnchor) => void;
|
|
14
18
|
/** Register `cb` to fire when `element` is removed from the DOM. */
|
|
15
19
|
export declare function watchUnmount(element: HTMLElement, cb: UnmountCallback): () => void;
|
|
16
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unmount-observer.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/unmount-observer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,KAAK,eAAe,GAAG,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"unmount-observer.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/unmount-observer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,IAAI,CAAC;IACb,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,KAAK,eAAe,GAAG,CAAC,MAAM,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;AAuDxD,oEAAoE;AACpE,wBAAgB,YAAY,CAC1B,OAAO,EAAE,WAAW,EACpB,EAAE,EAAE,eAAe,GAClB,MAAM,IAAI,CAMZ"}
|