@pie-players/pie-section-player-tools-shared 0.3.67 → 0.3.69
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 +1 -0
- package/dist/index.js +2693 -1819
- package/dist/section-controller-subscription.d.ts +29 -0
- package/package.json +11 -7
- package/dist/vite.config.d.ts +0 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SectionControllerLifecycleEventLike } from './section-controller.js';
|
|
2
|
+
export interface SectionControllerSubscriptionHandlers<TController> {
|
|
3
|
+
/** Look up the current controller for the caller's active sectionId/attemptId. */
|
|
4
|
+
getController: () => TController | null | undefined;
|
|
5
|
+
/** Attach whatever event listeners this caller needs; return their combined teardown. */
|
|
6
|
+
subscribe: (controller: TController) => () => void;
|
|
7
|
+
/** Called once right after a fresh subscribe (not on an already-current target). */
|
|
8
|
+
onSubscribed?: (controller: TController) => void;
|
|
9
|
+
/** Called when no controller is available for the current target. */
|
|
10
|
+
onControllerUnavailable?: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Tracks the controller subscription + lifecycle-driven resubscribe queue
|
|
14
|
+
* shared by every debugger panel that follows a section controller across
|
|
15
|
+
* `sectionId`/`attemptId` and coordinator-republish changes. Callers wire
|
|
16
|
+
* this from inside a Svelte `$effect`; see `bindLifecycle`'s doc comment for
|
|
17
|
+
* the untrack requirement from this repo's Svelte Subscription Safety rule.
|
|
18
|
+
*/
|
|
19
|
+
export declare function createSectionControllerSubscriptionManager<TController>(handlers: SectionControllerSubscriptionHandlers<TController>): {
|
|
20
|
+
ensure: (sectionId: string, attemptId?: string) => void;
|
|
21
|
+
queueEnsure: (sectionId: string, attemptId?: string) => void;
|
|
22
|
+
isActiveTarget: (sectionId: string, attemptId?: string) => boolean;
|
|
23
|
+
bindLifecycle: (coordinator: {
|
|
24
|
+
onSectionControllerLifecycle?: (listener: (event: SectionControllerLifecycleEventLike) => void) => () => void;
|
|
25
|
+
} | null | undefined, sectionId: string, attemptId: string | undefined, onMatchingEvent?: (event: SectionControllerLifecycleEventLike) => void) => void;
|
|
26
|
+
detachController: () => void;
|
|
27
|
+
detachLifecycle: () => void;
|
|
28
|
+
detachAll: () => void;
|
|
29
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-players/pie-section-player-tools-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.69",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shared UI and helpers for PIE section-player debug tools",
|
|
6
6
|
"repository": {
|
|
@@ -32,21 +32,25 @@
|
|
|
32
32
|
],
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@pie-players/pie-
|
|
35
|
+
"@pie-players/pie-players-shared": "0.3.69",
|
|
36
|
+
"@pie-players/pie-theme": "0.3.69"
|
|
36
37
|
},
|
|
37
38
|
"types": "./dist/index.types.d.ts",
|
|
38
39
|
"scripts": {
|
|
39
40
|
"build": "vite build",
|
|
40
41
|
"dev": "vite build --watch",
|
|
41
42
|
"typecheck": "tsc --noEmit",
|
|
42
|
-
"
|
|
43
|
+
"check": "svelte-check --tsconfig ./tsconfig.json --compiler-warnings options_missing_custom_element:ignore",
|
|
44
|
+
"test": "bun test tests",
|
|
45
|
+
"lint": "biome check PanelWindowControls.svelte PanelResizeHandle.svelte SharedFloatingPanel.svelte SessionDbPanel.svelte DebugPanelToggles.svelte floating-panel.ts section-controller.ts index.ts vite.config.ts package.json tests"
|
|
43
46
|
},
|
|
44
47
|
"devDependencies": {
|
|
45
|
-
"@biomejs/biome": "^2.5.
|
|
46
|
-
"@sveltejs/vite-plugin-svelte": "^7.
|
|
47
|
-
"svelte": "^5.56.
|
|
48
|
+
"@biomejs/biome": "^2.5.10",
|
|
49
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
50
|
+
"svelte": "^5.56.10",
|
|
51
|
+
"svelte-check": "^4.7.5",
|
|
48
52
|
"typescript": "^5.9.3",
|
|
49
|
-
"vite": "^8.
|
|
53
|
+
"vite": "^8.2.1",
|
|
50
54
|
"vite-plugin-dts": "^5.0.3"
|
|
51
55
|
},
|
|
52
56
|
"homepage": "https://github.com/pie-framework/pie-players/tree/master/packages/section-player-tools-shared#readme",
|
package/dist/vite.config.d.ts
DELETED