@pie-element/shared-player-events 0.1.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.
@@ -0,0 +1,29 @@
1
+ /**
2
+ * PIE Player Events
3
+ *
4
+ * Custom events for PIE player communication between elements and the player.
5
+ * Internalized from @pie-framework/pie-player-events for ESM compatibility.
6
+ */
7
+ export type ModelSetDetail = {
8
+ complete: boolean;
9
+ component: any;
10
+ hasModel: boolean;
11
+ };
12
+ export declare class ModelSetEvent extends CustomEvent<ModelSetDetail> {
13
+ readonly component: string;
14
+ readonly complete: boolean;
15
+ static TYPE: string;
16
+ constructor(component: string, complete: boolean, hasModel: boolean);
17
+ }
18
+ export type DeleteDone = (e?: Error) => void;
19
+ export type SessionChangedDetail = {
20
+ complete: boolean;
21
+ component: any;
22
+ };
23
+ export declare class SessionChangedEvent extends CustomEvent<SessionChangedDetail> {
24
+ readonly component: string;
25
+ readonly complete: boolean;
26
+ static TYPE: string;
27
+ constructor(component: string, complete: boolean);
28
+ }
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,GAAG,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,qBAAa,aAAc,SAAQ,WAAW,CAAC,cAAc,CAAC;IAI1D,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,QAAQ,EAAE,OAAO;IAJ5B,MAAM,CAAC,IAAI,SAAe;gBAGf,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,OAAO,EAC1B,QAAQ,EAAE,OAAO;CAQpB;AAED,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;AAE7C,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF,qBAAa,mBAAoB,SAAQ,WAAW,CAAC,oBAAoB,CAAC;IAG5D,QAAQ,CAAC,SAAS,EAAE,MAAM;IAAE,QAAQ,CAAC,QAAQ,EAAE,OAAO;IAFlE,MAAM,CAAC,IAAI,SAAqB;gBAEX,SAAS,EAAE,MAAM,EAAW,QAAQ,EAAE,OAAO;CAOnE"}
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ const u = class u extends CustomEvent {
2
+ constructor(s, t, i) {
3
+ super(u.TYPE, {
4
+ bubbles: !0,
5
+ composed: !0,
6
+ detail: { complete: t, component: s, hasModel: i }
7
+ }), this.component = s, this.complete = t;
8
+ }
9
+ };
10
+ u.TYPE = "model-set";
11
+ let e = u;
12
+ const c = class c extends CustomEvent {
13
+ constructor(s, t) {
14
+ super(c.TYPE, {
15
+ bubbles: !0,
16
+ composed: !0,
17
+ detail: { complete: t, component: s }
18
+ }), this.component = s, this.complete = t;
19
+ }
20
+ };
21
+ c.TYPE = "session-changed";
22
+ let r = c;
23
+ export {
24
+ e as ModelSetEvent,
25
+ r as SessionChangedEvent
26
+ };
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@pie-element/shared-player-events",
3
+ "version": "0.1.0",
4
+ "description": "PIE Player Events (ESM) - internalized from @pie-framework/pie-player-events",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "scripts": {
18
+ "build": "rm -rf dist tsconfig.tsbuildinfo && vite build && tsc --emitDeclarationOnly",
19
+ "dev": "vite build --watch",
20
+ "test": "vitest",
21
+ "clean": "rm -rf dist"
22
+ },
23
+ "dependencies": {},
24
+ "devDependencies": {
25
+ "@types/bun": "latest",
26
+ "typescript": "^5.9.3",
27
+ "vite": "^7.2.2",
28
+ "vitest": "^4.0.17"
29
+ },
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "license": "MIT"
34
+ }