@aperture-browser/session-element 0.0.0-init.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/LICENSE +21 -0
- package/README.md +62 -0
- package/dist/aperture-session-view.js +5 -0
- package/dist/aperture-session.js +11 -0
- package/dist/aperture-t-Xm6-Va.js +22 -0
- package/dist/headless.d.ts +44 -0
- package/dist/index.d.ts +24 -0
- package/package.json +47 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface ApertureTab {
|
|
2
|
+
readonly id: string;
|
|
3
|
+
readonly title: string;
|
|
4
|
+
readonly url: string;
|
|
5
|
+
readonly loading: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ApertureSessionSnapshot {
|
|
8
|
+
readonly status: "invalid" | "loading" | "expired" | "unavailable" | "ready";
|
|
9
|
+
readonly role: "editor" | "viewer" | null;
|
|
10
|
+
readonly connection: "idle" | "connecting" | "connected" | "disconnected" | "error";
|
|
11
|
+
readonly tabs: readonly ApertureTab[];
|
|
12
|
+
readonly activeTabId: string | null;
|
|
13
|
+
}
|
|
14
|
+
export interface ApertureNotice {
|
|
15
|
+
readonly level: "error" | "success";
|
|
16
|
+
readonly message: string;
|
|
17
|
+
}
|
|
18
|
+
export declare class ApertureSessionViewElement extends HTMLElement {
|
|
19
|
+
#private;
|
|
20
|
+
static readonly observedAttributes: string[];
|
|
21
|
+
get snapshot(): ApertureSessionSnapshot;
|
|
22
|
+
navigate(url: string): Promise<void>;
|
|
23
|
+
back(): Promise<void>;
|
|
24
|
+
forward(): Promise<void>;
|
|
25
|
+
reload(): Promise<void>;
|
|
26
|
+
stop(): Promise<void>;
|
|
27
|
+
openTab(url?: string): Promise<string | null>;
|
|
28
|
+
closeTab(tabId: string): Promise<void>;
|
|
29
|
+
activateTab(tabId: string): Promise<void>;
|
|
30
|
+
reconnect(): void;
|
|
31
|
+
whenConnected(): Promise<ApertureSessionSnapshot>;
|
|
32
|
+
connectedCallback(): void;
|
|
33
|
+
disconnectedCallback(): void;
|
|
34
|
+
attributeChangedCallback(): void;
|
|
35
|
+
}
|
|
36
|
+
declare global {
|
|
37
|
+
interface HTMLElementTagNameMap {
|
|
38
|
+
"aperture-session-view": ApertureSessionViewElement;
|
|
39
|
+
}
|
|
40
|
+
interface HTMLElementEventMap {
|
|
41
|
+
"aperture-change": CustomEvent<ApertureSessionSnapshot>;
|
|
42
|
+
"aperture-notice": CustomEvent<ApertureNotice>;
|
|
43
|
+
}
|
|
44
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ApertureSessionFeatures {
|
|
2
|
+
readonly tabs?: boolean;
|
|
3
|
+
readonly navigation?: boolean;
|
|
4
|
+
readonly addressBar?: boolean;
|
|
5
|
+
readonly presence?: boolean;
|
|
6
|
+
readonly drawing?: boolean;
|
|
7
|
+
readonly menus?: boolean;
|
|
8
|
+
readonly statusBadge?: boolean;
|
|
9
|
+
readonly toaster?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class ApertureSessionElement extends HTMLElement {
|
|
12
|
+
#private;
|
|
13
|
+
static readonly observedAttributes: string[];
|
|
14
|
+
get features(): ApertureSessionFeatures;
|
|
15
|
+
set features(features: ApertureSessionFeatures);
|
|
16
|
+
connectedCallback(): void;
|
|
17
|
+
disconnectedCallback(): void;
|
|
18
|
+
attributeChangedCallback(): void;
|
|
19
|
+
}
|
|
20
|
+
declare global {
|
|
21
|
+
interface HTMLElementTagNameMap {
|
|
22
|
+
"aperture-session": ApertureSessionElement;
|
|
23
|
+
}
|
|
24
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aperture-browser/session-element",
|
|
3
|
+
"version": "0.0.0-init.0",
|
|
4
|
+
"description": "Custom elements that embed a live Aperture browser session in any page: <aperture-session> with the full session UI, and the headless <aperture-session-view>.",
|
|
5
|
+
"homepage": "https://github.com/tarik02/aperture#readme",
|
|
6
|
+
"bugs": "https://github.com/tarik02/aperture/issues",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/tarik02/aperture.git",
|
|
11
|
+
"directory": "packages/session-element"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"type": "module",
|
|
17
|
+
"sideEffects": true,
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/aperture-session.js"
|
|
22
|
+
},
|
|
23
|
+
"./headless": {
|
|
24
|
+
"types": "./dist/headless.d.ts",
|
|
25
|
+
"default": "./dist/aperture-session-view.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@aperture-browser/session-react": "0.0.0-init.0",
|
|
33
|
+
"@tailwindcss/vite": "^4.3.2",
|
|
34
|
+
"@types/react": "^19.2.17",
|
|
35
|
+
"@types/react-dom": "^19.2.3",
|
|
36
|
+
"effect": "4.0.0-rc.117",
|
|
37
|
+
"react": "^19.2.7",
|
|
38
|
+
"react-dom": "^19.2.7",
|
|
39
|
+
"tailwindcss": "^4.3.2",
|
|
40
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.2.4",
|
|
41
|
+
"vite-plus": "0.2.4"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "vp build && tsgo -p tsconfig.build.json && publint",
|
|
45
|
+
"typecheck": "tsgo --noEmit"
|
|
46
|
+
}
|
|
47
|
+
}
|