lido-standalone 0.0.0-alpha-1
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/.editorconfig +15 -0
- package/.prettierrc.json +13 -0
- package/LICENSE +21 -0
- package/dist/cjs/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/index-52f24ddb.js +1154 -0
- package/dist/cjs/index-52f24ddb.js.map +1 -0
- package/dist/cjs/index.cjs.js +299 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/index.es2017-d19f0aae.js +1491 -0
- package/dist/cjs/index.es2017-d19f0aae.js.map +1 -0
- package/dist/cjs/lido-avatar_13.entry-e9636d08.js +9227 -0
- package/dist/cjs/lido-avatar_13.entry-e9636d08.js.map +1 -0
- package/dist/cjs/lido-standalone.cjs.entry.js +160 -0
- package/dist/cjs/lido-standalone.cjs.entry.js.map +1 -0
- package/dist/cjs/lido-standalone.cjs.js +27 -0
- package/dist/cjs/lido-standalone.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/lido-standalone/lido-standalone.css +0 -0
- package/dist/collection/components/lido-standalone/lido-standalone.js +295 -0
- package/dist/collection/components/lido-standalone/lido-standalone.js.map +1 -0
- package/dist/collection/index.js +3 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +996 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/lido-standalone.d.ts +11 -0
- package/dist/components/lido-standalone.js +187 -0
- package/dist/components/lido-standalone.js.map +1 -0
- package/dist/components/p-5510f322.js +1464 -0
- package/dist/components/p-5510f322.js.map +1 -0
- package/dist/components/p-c2ee3e8c.js +959 -0
- package/dist/components/p-c2ee3e8c.js.map +1 -0
- package/dist/components/p-f41b329e.js +9213 -0
- package/dist/components/p-f41b329e.js.map +1 -0
- package/dist/esm/app-globals-0f993ce5.js +5 -0
- package/dist/esm/app-globals-0f993ce5.js.map +1 -0
- package/dist/esm/index-5da3b4be.js +1126 -0
- package/dist/esm/index-5da3b4be.js.map +1 -0
- package/dist/esm/index.es2017-09c06e72.js +1464 -0
- package/dist/esm/index.es2017-09c06e72.js.map +1 -0
- package/dist/esm/index.js +295 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lido-avatar_13.entry-7e8c9c55.js +9213 -0
- package/dist/esm/lido-avatar_13.entry-7e8c9c55.js.map +1 -0
- package/dist/esm/lido-standalone.entry.js +156 -0
- package/dist/esm/lido-standalone.entry.js.map +1 -0
- package/dist/esm/lido-standalone.js +22 -0
- package/dist/esm/lido-standalone.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/lido-standalone/index.esm.js +2 -0
- package/dist/lido-standalone/index.esm.js.map +1 -0
- package/dist/lido-standalone/lido-standalone.esm.js +2 -0
- package/dist/lido-standalone/lido-standalone.esm.js.map +1 -0
- package/dist/lido-standalone/p-3a3323c8.js +3 -0
- package/dist/lido-standalone/p-3a3323c8.js.map +1 -0
- package/dist/lido-standalone/p-4b9cc16f.entry.js +2 -0
- package/dist/lido-standalone/p-4b9cc16f.entry.js.map +1 -0
- package/dist/lido-standalone/p-5510f322.js +2 -0
- package/dist/lido-standalone/p-5510f322.js.map +1 -0
- package/dist/lido-standalone/p-e1255160.js +2 -0
- package/dist/lido-standalone/p-e1255160.js.map +1 -0
- package/dist/lido-standalone/p-f41b329e.js +2 -0
- package/dist/lido-standalone/p-f41b329e.js.map +1 -0
- package/dist/types/components/lido-standalone/lido-standalone.d.ts +65 -0
- package/dist/types/components.d.ts +137 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +1680 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +46 -0
- package/readme.md +41 -0
- package/src/assets/icon/favicon.ico +0 -0
- package/src/assets/icon/icon.png +0 -0
- package/src/components/lido-standalone/lido-standalone.css +0 -0
- package/src/components/lido-standalone/lido-standalone.tsx +205 -0
- package/src/components/lido-standalone/readme.md +38 -0
- package/src/components.d.ts +137 -0
- package/src/index.html +49 -0
- package/src/index.ts +5 -0
- package/src/manifest.json +13 -0
- package/stencil.config.ts +32 -0
- package/tsconfig.json +25 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <lido-standalone> usage example:
|
|
3
|
+
*
|
|
4
|
+
* <lido-standalone
|
|
5
|
+
* base-url="https://example.com/path/to/folder/lido-game"
|
|
6
|
+
* xml-path="https://example.com/path/to/folder/lido-game/assets/xmlData.xml"
|
|
7
|
+
* initial-index="2"
|
|
8
|
+
* canplay="true"
|
|
9
|
+
* height="75vh"
|
|
10
|
+
* ></lido-standalone>
|
|
11
|
+
*
|
|
12
|
+
* This attempts to load the external Lido scripts at runtime (from `baseUrl`).
|
|
13
|
+
* If they aren't found, it falls back to loading the Lido npm package
|
|
14
|
+
* and calls defineCustomElements(...) to register <lido-home>.
|
|
15
|
+
*/
|
|
16
|
+
export declare class LidoStandalone {
|
|
17
|
+
/**
|
|
18
|
+
* The public URL where the unzipped Lido code is hosted, e.g.
|
|
19
|
+
* "https://example.com/path/to/lido-game".
|
|
20
|
+
*
|
|
21
|
+
* Inside that folder, we expect:
|
|
22
|
+
* - code/lido-player.esm.js
|
|
23
|
+
* - code/lido-player.js
|
|
24
|
+
* - assets/ (optional)
|
|
25
|
+
*/
|
|
26
|
+
baseUrl: string;
|
|
27
|
+
/**
|
|
28
|
+
* If provided, we'll fetch this XML path once and pass the loaded string
|
|
29
|
+
* to <lido-home>'s `xml-data` attribute.
|
|
30
|
+
*/
|
|
31
|
+
xmlPath?: string;
|
|
32
|
+
/** The initial index to pass down to <lido-home>. Defaults to 0. */
|
|
33
|
+
initialIndex: number;
|
|
34
|
+
/** Whether the <lido-home> can play. Defaults to false. */
|
|
35
|
+
canplay: boolean;
|
|
36
|
+
/** The height prop to pass to <lido-home>. Defaults to "75vh". */
|
|
37
|
+
height: string;
|
|
38
|
+
/**
|
|
39
|
+
* Optional prop for directly providing XML data instead of fetching.
|
|
40
|
+
*/
|
|
41
|
+
xmlData?: string;
|
|
42
|
+
/** Whether scripts are already injected (remote or fallback). */
|
|
43
|
+
scriptsInjected: boolean;
|
|
44
|
+
/** Stores the fetched or provided XML data. */
|
|
45
|
+
localXmlData?: string;
|
|
46
|
+
/** This might be used by <lido-home> if referencing assets. */
|
|
47
|
+
xmlBaseUrl?: string;
|
|
48
|
+
onBaseUrlChange(): void;
|
|
49
|
+
onXmlPathChange(): void;
|
|
50
|
+
componentWillLoad(): void;
|
|
51
|
+
private injectLidoScripts;
|
|
52
|
+
/**
|
|
53
|
+
* Synchronously checks if a file exists via HTTP HEAD request.
|
|
54
|
+
* Returns true if status is 2xx, false otherwise.
|
|
55
|
+
*/
|
|
56
|
+
private doesFileExistSync;
|
|
57
|
+
/**
|
|
58
|
+
* Fallback approach: dynamically import the "lido-player/loader" module,
|
|
59
|
+
* then call defineCustomElements(window) to register the <lido-home> component.
|
|
60
|
+
* This is asynchronous by nature.
|
|
61
|
+
*/
|
|
62
|
+
private fallbackNpmImport;
|
|
63
|
+
private fetchXmlData;
|
|
64
|
+
render(): any;
|
|
65
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* This is an autogenerated file created by the Stencil compiler.
|
|
5
|
+
* It contains typing information for all components that exist in this project.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
export namespace Components {
|
|
9
|
+
/**
|
|
10
|
+
* <lido-standalone> usage example:
|
|
11
|
+
* <lido-standalone
|
|
12
|
+
* base-url="https://example.com/path/to/folder/lido-game"
|
|
13
|
+
* xml-path="https://example.com/path/to/folder/lido-game/assets/xmlData.xml"
|
|
14
|
+
* initial-index="2"
|
|
15
|
+
* canplay="true"
|
|
16
|
+
* height="75vh"
|
|
17
|
+
* ></lido-standalone>
|
|
18
|
+
* This attempts to load the external Lido scripts at runtime (from `baseUrl`).
|
|
19
|
+
* If they aren't found, it falls back to loading the Lido npm package
|
|
20
|
+
* and calls defineCustomElements(...) to register <lido-home>.
|
|
21
|
+
*/
|
|
22
|
+
interface LidoStandalone {
|
|
23
|
+
/**
|
|
24
|
+
* The public URL where the unzipped Lido code is hosted, e.g. "https://example.com/path/to/lido-game". Inside that folder, we expect: - code/lido-player.esm.js - code/lido-player.js - assets/ (optional)
|
|
25
|
+
*/
|
|
26
|
+
"baseUrl": string;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the <lido-home> can play. Defaults to false.
|
|
29
|
+
*/
|
|
30
|
+
"canplay": boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The height prop to pass to <lido-home>. Defaults to "75vh".
|
|
33
|
+
*/
|
|
34
|
+
"height": string;
|
|
35
|
+
/**
|
|
36
|
+
* The initial index to pass down to <lido-home>. Defaults to 0.
|
|
37
|
+
*/
|
|
38
|
+
"initialIndex": number;
|
|
39
|
+
/**
|
|
40
|
+
* Optional prop for directly providing XML data instead of fetching.
|
|
41
|
+
*/
|
|
42
|
+
"xmlData"?: string;
|
|
43
|
+
/**
|
|
44
|
+
* If provided, we'll fetch this XML path once and pass the loaded string to <lido-home>'s `xml-data` attribute.
|
|
45
|
+
*/
|
|
46
|
+
"xmlPath"?: string;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
declare global {
|
|
50
|
+
/**
|
|
51
|
+
* <lido-standalone> usage example:
|
|
52
|
+
* <lido-standalone
|
|
53
|
+
* base-url="https://example.com/path/to/folder/lido-game"
|
|
54
|
+
* xml-path="https://example.com/path/to/folder/lido-game/assets/xmlData.xml"
|
|
55
|
+
* initial-index="2"
|
|
56
|
+
* canplay="true"
|
|
57
|
+
* height="75vh"
|
|
58
|
+
* ></lido-standalone>
|
|
59
|
+
* This attempts to load the external Lido scripts at runtime (from `baseUrl`).
|
|
60
|
+
* If they aren't found, it falls back to loading the Lido npm package
|
|
61
|
+
* and calls defineCustomElements(...) to register <lido-home>.
|
|
62
|
+
*/
|
|
63
|
+
interface HTMLLidoStandaloneElement extends Components.LidoStandalone, HTMLStencilElement {
|
|
64
|
+
}
|
|
65
|
+
var HTMLLidoStandaloneElement: {
|
|
66
|
+
prototype: HTMLLidoStandaloneElement;
|
|
67
|
+
new (): HTMLLidoStandaloneElement;
|
|
68
|
+
};
|
|
69
|
+
interface HTMLElementTagNameMap {
|
|
70
|
+
"lido-standalone": HTMLLidoStandaloneElement;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
declare namespace LocalJSX {
|
|
74
|
+
/**
|
|
75
|
+
* <lido-standalone> usage example:
|
|
76
|
+
* <lido-standalone
|
|
77
|
+
* base-url="https://example.com/path/to/folder/lido-game"
|
|
78
|
+
* xml-path="https://example.com/path/to/folder/lido-game/assets/xmlData.xml"
|
|
79
|
+
* initial-index="2"
|
|
80
|
+
* canplay="true"
|
|
81
|
+
* height="75vh"
|
|
82
|
+
* ></lido-standalone>
|
|
83
|
+
* This attempts to load the external Lido scripts at runtime (from `baseUrl`).
|
|
84
|
+
* If they aren't found, it falls back to loading the Lido npm package
|
|
85
|
+
* and calls defineCustomElements(...) to register <lido-home>.
|
|
86
|
+
*/
|
|
87
|
+
interface LidoStandalone {
|
|
88
|
+
/**
|
|
89
|
+
* The public URL where the unzipped Lido code is hosted, e.g. "https://example.com/path/to/lido-game". Inside that folder, we expect: - code/lido-player.esm.js - code/lido-player.js - assets/ (optional)
|
|
90
|
+
*/
|
|
91
|
+
"baseUrl"?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Whether the <lido-home> can play. Defaults to false.
|
|
94
|
+
*/
|
|
95
|
+
"canplay"?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* The height prop to pass to <lido-home>. Defaults to "75vh".
|
|
98
|
+
*/
|
|
99
|
+
"height"?: string;
|
|
100
|
+
/**
|
|
101
|
+
* The initial index to pass down to <lido-home>. Defaults to 0.
|
|
102
|
+
*/
|
|
103
|
+
"initialIndex"?: number;
|
|
104
|
+
/**
|
|
105
|
+
* Optional prop for directly providing XML data instead of fetching.
|
|
106
|
+
*/
|
|
107
|
+
"xmlData"?: string;
|
|
108
|
+
/**
|
|
109
|
+
* If provided, we'll fetch this XML path once and pass the loaded string to <lido-home>'s `xml-data` attribute.
|
|
110
|
+
*/
|
|
111
|
+
"xmlPath"?: string;
|
|
112
|
+
}
|
|
113
|
+
interface IntrinsicElements {
|
|
114
|
+
"lido-standalone": LidoStandalone;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
export { LocalJSX as JSX };
|
|
118
|
+
declare module "@stencil/core" {
|
|
119
|
+
export namespace JSX {
|
|
120
|
+
interface IntrinsicElements {
|
|
121
|
+
/**
|
|
122
|
+
* <lido-standalone> usage example:
|
|
123
|
+
* <lido-standalone
|
|
124
|
+
* base-url="https://example.com/path/to/folder/lido-game"
|
|
125
|
+
* xml-path="https://example.com/path/to/folder/lido-game/assets/xmlData.xml"
|
|
126
|
+
* initial-index="2"
|
|
127
|
+
* canplay="true"
|
|
128
|
+
* height="75vh"
|
|
129
|
+
* ></lido-standalone>
|
|
130
|
+
* This attempts to load the external Lido scripts at runtime (from `baseUrl`).
|
|
131
|
+
* If they aren't found, it falls back to loading the Lido npm package
|
|
132
|
+
* and calls defineCustomElements(...) to register <lido-home>.
|
|
133
|
+
*/
|
|
134
|
+
"lido-standalone": LocalJSX.LidoStandalone & JSXBase.HTMLAttributes<HTMLLidoStandaloneElement>;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|