proto-daisy-db 0.0.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/LICENSE +21 -0
- package/README.md +6 -0
- package/dist/cjs/index-69b24cc8.js +1141 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/proto-daisy-db.cjs.js +19 -0
- package/dist/cjs/proto-daisy-db_4.cjs.entry.js +137 -0
- package/dist/collection/collection-manifest.json +15 -0
- package/dist/collection/components/proto-daisy-db/proto-daisy-db.css +0 -0
- package/dist/collection/components/proto-daisy-db/proto-daisy-db.js +60 -0
- package/dist/collection/components/proto-faux-keys/proto-faux-keys.css +0 -0
- package/dist/collection/components/proto-faux-keys/proto-faux-keys.js +35 -0
- package/dist/collection/components/proto-faux-stamp/proto-faux-stamp.css +0 -0
- package/dist/collection/components/proto-faux-stamp/proto-faux-stamp.js +36 -0
- package/dist/collection/components/proto-faux-trigger/proto-faux-trigger.css +189 -0
- package/dist/collection/components/proto-faux-trigger/proto-faux-trigger.js +84 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/bag.js +25 -0
- package/dist/collection/utils/index.js +2 -0
- package/dist/collection/utils/tw-version.js +4 -0
- package/dist/components/index.d.ts +25 -0
- package/dist/components/index.js +5 -0
- package/dist/components/proto-daisy-db.d.ts +11 -0
- package/dist/components/proto-daisy-db.js +82 -0
- package/dist/components/proto-faux-keys.d.ts +11 -0
- package/dist/components/proto-faux-keys.js +6 -0
- package/dist/components/proto-faux-keys2.js +33 -0
- package/dist/components/proto-faux-stamp.d.ts +11 -0
- package/dist/components/proto-faux-stamp.js +6 -0
- package/dist/components/proto-faux-stamp2.js +33 -0
- package/dist/components/proto-faux-trigger.d.ts +11 -0
- package/dist/components/proto-faux-trigger.js +75 -0
- package/dist/esm/index-1d7e6324.js +1116 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/proto-daisy-db.js +17 -0
- package/dist/esm/proto-daisy-db_4.entry.js +130 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/proto-daisy-db/index.esm.js +0 -0
- package/dist/proto-daisy-db/p-05fdda3d.entry.js +1 -0
- package/dist/proto-daisy-db/p-39bf50a0.js +2 -0
- package/dist/proto-daisy-db/proto-daisy-db.esm.js +1 -0
- package/dist/types/components/proto-daisy-db/proto-daisy-db.d.ts +5 -0
- package/dist/types/components/proto-faux-keys/proto-faux-keys.d.ts +4 -0
- package/dist/types/components/proto-faux-stamp/proto-faux-stamp.d.ts +4 -0
- package/dist/types/components/proto-faux-trigger/proto-faux-trigger.d.ts +8 -0
- package/dist/types/components.d.ts +86 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/utils/bag.d.ts +6 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/tw-version.d.ts +3 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +50 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-69b24cc8.js');
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
Stencil Client Patch Esm v2.17.1 | MIT Licensed | https://stenciljs.com
|
|
9
|
+
*/
|
|
10
|
+
const patchEsm = () => {
|
|
11
|
+
return index.promiseResolve();
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const defineCustomElements = (win, options) => {
|
|
15
|
+
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
|
+
return patchEsm().then(() => {
|
|
17
|
+
return index.bootstrapLazy([["proto-daisy-db_4.cjs",[[0,"proto-faux-trigger",{"emitter":[1],"data":[1040]}],[1,"proto-daisy-db",{"emitter":[1]}],[0,"proto-faux-keys",{"data":[16]}],[0,"proto-faux-stamp",{"data":[16]}]]]], options);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-69b24cc8.js');
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
Stencil Client Patch Browser v2.17.1 | MIT Licensed | https://stenciljs.com
|
|
7
|
+
*/
|
|
8
|
+
const patchBrowser = () => {
|
|
9
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('proto-daisy-db.cjs.js', document.baseURI).href));
|
|
10
|
+
const opts = {};
|
|
11
|
+
if (importMeta !== '') {
|
|
12
|
+
opts.resourcesUrl = new URL('.', importMeta).href;
|
|
13
|
+
}
|
|
14
|
+
return index.promiseResolve(opts);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
patchBrowser().then(options => {
|
|
18
|
+
return index.bootstrapLazy([["proto-daisy-db_4.cjs",[[0,"proto-faux-trigger",{"emitter":[1],"data":[1040]}],[1,"proto-daisy-db",{"emitter":[1]}],[0,"proto-faux-keys",{"data":[16]}],[0,"proto-faux-stamp",{"data":[16]}]]]], options);
|
|
19
|
+
});
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-69b24cc8.js');
|
|
6
|
+
|
|
7
|
+
const KEY = 'proto-daisy-db:app-data';
|
|
8
|
+
const promisedParseJSON = (json) => {
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
try {
|
|
11
|
+
resolve(JSON.parse(json));
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
// localStorage implementation... [ generic storage ]
|
|
19
|
+
const bag = {
|
|
20
|
+
get: () => {
|
|
21
|
+
const json = localStorage.getItem(KEY);
|
|
22
|
+
return promisedParseJSON(json);
|
|
23
|
+
},
|
|
24
|
+
store: (data) => {
|
|
25
|
+
// NOTE: this assumes you're passing REAL data, not a proxy...
|
|
26
|
+
const json = JSON.stringify(data);
|
|
27
|
+
localStorage.setItem(KEY, json);
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const protoDaisyDbCss = "";
|
|
32
|
+
|
|
33
|
+
const ProtoDaisyDB = class {
|
|
34
|
+
constructor(hostRef) {
|
|
35
|
+
index.registerInstance(this, hostRef);
|
|
36
|
+
this.emitter = undefined;
|
|
37
|
+
}
|
|
38
|
+
componentDidLoad() {
|
|
39
|
+
if (this.emitter && window[this.emitter]) {
|
|
40
|
+
const emitter = window[this.emitter];
|
|
41
|
+
emitter.on('app-data:get', _e => {
|
|
42
|
+
console.log('app-data:get');
|
|
43
|
+
bag
|
|
44
|
+
.get()
|
|
45
|
+
.then(value => {
|
|
46
|
+
emitter.emit('app-data:value', value);
|
|
47
|
+
})
|
|
48
|
+
.catch(reason => {
|
|
49
|
+
console.log(reason);
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
emitter.on('app-data:store', e => {
|
|
53
|
+
console.log('app-data:store', e);
|
|
54
|
+
bag.store(e);
|
|
55
|
+
});
|
|
56
|
+
const data = { ready: true };
|
|
57
|
+
emitter.emit('proto-daisy-db', data);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
return index.h("div", null);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
ProtoDaisyDB.style = protoDaisyDbCss;
|
|
65
|
+
|
|
66
|
+
const protoFauxKeysCss = "";
|
|
67
|
+
|
|
68
|
+
const ProtoFauxKeys = class {
|
|
69
|
+
constructor(hostRef) {
|
|
70
|
+
index.registerInstance(this, hostRef);
|
|
71
|
+
this.data = undefined;
|
|
72
|
+
}
|
|
73
|
+
render() {
|
|
74
|
+
const keys = this.data ? Object.keys(this.data) : [];
|
|
75
|
+
return (index.h("div", { class: "flex flex-col" }, keys.map(key => (index.h("span", null, key)))));
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
ProtoFauxKeys.style = protoFauxKeysCss;
|
|
79
|
+
|
|
80
|
+
const protoFauxStampCss = "";
|
|
81
|
+
|
|
82
|
+
const ProtoFauxStamp = class {
|
|
83
|
+
constructor(hostRef) {
|
|
84
|
+
index.registerInstance(this, hostRef);
|
|
85
|
+
this.data = undefined;
|
|
86
|
+
}
|
|
87
|
+
render() {
|
|
88
|
+
const stamp = this.data ? this.data['stamp'] : '';
|
|
89
|
+
return (index.h("div", { class: "flex" }, index.h("span", null, stamp)));
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
ProtoFauxStamp.style = protoFauxStampCss;
|
|
93
|
+
|
|
94
|
+
const protoFauxTriggerCss = "*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mt-4{margin-top:1rem}.mt-2{margin-top:0.5rem}.flex{display:flex}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.content-center{align-content:center}.gap-2{gap:0.5rem}.font-sans{font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,\n 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'}.text-xs{font-size:0.75rem;line-height:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),\n 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}";
|
|
95
|
+
|
|
96
|
+
const ProtoFauxTrigger = class {
|
|
97
|
+
constructor(hostRef) {
|
|
98
|
+
index.registerInstance(this, hostRef);
|
|
99
|
+
this.emitter = undefined;
|
|
100
|
+
this.data = undefined;
|
|
101
|
+
}
|
|
102
|
+
componentDidLoad() {
|
|
103
|
+
if (this.emitter && window[this.emitter]) {
|
|
104
|
+
const emitter = window[this.emitter];
|
|
105
|
+
emitter.on('app-data:value', e => {
|
|
106
|
+
this.data = e;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
emitData() {
|
|
111
|
+
if (this.emitter && window[this.emitter]) {
|
|
112
|
+
const emitter = window[this.emitter];
|
|
113
|
+
const login = true;
|
|
114
|
+
const stamp = Date.now();
|
|
115
|
+
const theme = 'dark';
|
|
116
|
+
const dealers = [];
|
|
117
|
+
const data = { login, stamp, theme, dealers };
|
|
118
|
+
this.data = undefined;
|
|
119
|
+
emitter.emit('app-data:store', data);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
fetchData() {
|
|
123
|
+
if (this.emitter && window[this.emitter]) {
|
|
124
|
+
const emitter = window[this.emitter];
|
|
125
|
+
emitter.emit('app-data:get', 42);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
render() {
|
|
129
|
+
return (index.h("div", { class: "flex flex-col font-sans" }, index.h("div", { class: "flex flex-row content-center gap-2" }, index.h("button", { onClick: () => this.emitData() }, "Save"), index.h("button", { onClick: () => this.fetchData() }, "Fetch")), index.h("proto-faux-stamp", { class: "mt-4 text-xs", data: this.data }), index.h("proto-faux-keys", { class: "mt-2", data: this.data })));
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
ProtoFauxTrigger.style = protoFauxTriggerCss;
|
|
133
|
+
|
|
134
|
+
exports.proto_daisy_db = ProtoDaisyDB;
|
|
135
|
+
exports.proto_faux_keys = ProtoFauxKeys;
|
|
136
|
+
exports.proto_faux_stamp = ProtoFauxStamp;
|
|
137
|
+
exports.proto_faux_trigger = ProtoFauxTrigger;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
"./components/proto-daisy-db/proto-daisy-db.js",
|
|
4
|
+
"./components/proto-faux-keys/proto-faux-keys.js",
|
|
5
|
+
"./components/proto-faux-stamp/proto-faux-stamp.js",
|
|
6
|
+
"./components/proto-faux-trigger/proto-faux-trigger.js"
|
|
7
|
+
],
|
|
8
|
+
"compiler": {
|
|
9
|
+
"name": "@stencil/core",
|
|
10
|
+
"version": "2.17.1",
|
|
11
|
+
"typescriptVersion": "4.5.4"
|
|
12
|
+
},
|
|
13
|
+
"collections": [],
|
|
14
|
+
"bundles": []
|
|
15
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Component, Prop, h } from '@stencil/core';
|
|
2
|
+
import { bag } from '../../utils';
|
|
3
|
+
export class ProtoDaisyDB {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.emitter = undefined;
|
|
6
|
+
}
|
|
7
|
+
componentDidLoad() {
|
|
8
|
+
if (this.emitter && window[this.emitter]) {
|
|
9
|
+
const emitter = window[this.emitter];
|
|
10
|
+
emitter.on('app-data:get', _e => {
|
|
11
|
+
console.log('app-data:get');
|
|
12
|
+
bag
|
|
13
|
+
.get()
|
|
14
|
+
.then(value => {
|
|
15
|
+
emitter.emit('app-data:value', value);
|
|
16
|
+
})
|
|
17
|
+
.catch(reason => {
|
|
18
|
+
console.log(reason);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
emitter.on('app-data:store', e => {
|
|
22
|
+
console.log('app-data:store', e);
|
|
23
|
+
bag.store(e);
|
|
24
|
+
});
|
|
25
|
+
const data = { ready: true };
|
|
26
|
+
emitter.emit('proto-daisy-db', data);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return h("div", null);
|
|
31
|
+
}
|
|
32
|
+
static get is() { return "proto-daisy-db"; }
|
|
33
|
+
static get encapsulation() { return "shadow"; }
|
|
34
|
+
static get originalStyleUrls() { return {
|
|
35
|
+
"$": ["proto-daisy-db.css"]
|
|
36
|
+
}; }
|
|
37
|
+
static get styleUrls() { return {
|
|
38
|
+
"$": ["proto-daisy-db.css"]
|
|
39
|
+
}; }
|
|
40
|
+
static get properties() { return {
|
|
41
|
+
"emitter": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"mutable": false,
|
|
44
|
+
"complexType": {
|
|
45
|
+
"original": "string",
|
|
46
|
+
"resolved": "string",
|
|
47
|
+
"references": {}
|
|
48
|
+
},
|
|
49
|
+
"required": false,
|
|
50
|
+
"optional": false,
|
|
51
|
+
"docs": {
|
|
52
|
+
"tags": [],
|
|
53
|
+
"text": ""
|
|
54
|
+
},
|
|
55
|
+
"attribute": "emitter",
|
|
56
|
+
"reflect": false,
|
|
57
|
+
"defaultValue": "undefined"
|
|
58
|
+
}
|
|
59
|
+
}; }
|
|
60
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Component, h, Prop } from '@stencil/core';
|
|
2
|
+
export class ProtoFauxKeys {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.data = undefined;
|
|
5
|
+
}
|
|
6
|
+
render() {
|
|
7
|
+
const keys = this.data ? Object.keys(this.data) : [];
|
|
8
|
+
return (h("div", { class: "flex flex-col" }, keys.map(key => (h("span", null, key)))));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "proto-faux-keys"; }
|
|
11
|
+
static get originalStyleUrls() { return {
|
|
12
|
+
"$": ["proto-faux-keys.css"]
|
|
13
|
+
}; }
|
|
14
|
+
static get styleUrls() { return {
|
|
15
|
+
"$": ["proto-faux-keys.css"]
|
|
16
|
+
}; }
|
|
17
|
+
static get properties() { return {
|
|
18
|
+
"data": {
|
|
19
|
+
"type": "unknown",
|
|
20
|
+
"mutable": false,
|
|
21
|
+
"complexType": {
|
|
22
|
+
"original": "object",
|
|
23
|
+
"resolved": "object",
|
|
24
|
+
"references": {}
|
|
25
|
+
},
|
|
26
|
+
"required": false,
|
|
27
|
+
"optional": false,
|
|
28
|
+
"docs": {
|
|
29
|
+
"tags": [],
|
|
30
|
+
"text": ""
|
|
31
|
+
},
|
|
32
|
+
"defaultValue": "undefined"
|
|
33
|
+
}
|
|
34
|
+
}; }
|
|
35
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Component, h, Prop } from '@stencil/core';
|
|
2
|
+
export class ProtoFauxStamp {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.data = undefined;
|
|
5
|
+
}
|
|
6
|
+
render() {
|
|
7
|
+
const stamp = this.data ? this.data['stamp'] : '';
|
|
8
|
+
return (h("div", { class: "flex" },
|
|
9
|
+
h("span", null, stamp)));
|
|
10
|
+
}
|
|
11
|
+
static get is() { return "proto-faux-stamp"; }
|
|
12
|
+
static get originalStyleUrls() { return {
|
|
13
|
+
"$": ["proto-faux-stamp.css"]
|
|
14
|
+
}; }
|
|
15
|
+
static get styleUrls() { return {
|
|
16
|
+
"$": ["proto-faux-stamp.css"]
|
|
17
|
+
}; }
|
|
18
|
+
static get properties() { return {
|
|
19
|
+
"data": {
|
|
20
|
+
"type": "unknown",
|
|
21
|
+
"mutable": false,
|
|
22
|
+
"complexType": {
|
|
23
|
+
"original": "object",
|
|
24
|
+
"resolved": "object",
|
|
25
|
+
"references": {}
|
|
26
|
+
},
|
|
27
|
+
"required": false,
|
|
28
|
+
"optional": false,
|
|
29
|
+
"docs": {
|
|
30
|
+
"tags": [],
|
|
31
|
+
"text": ""
|
|
32
|
+
},
|
|
33
|
+
"defaultValue": "undefined"
|
|
34
|
+
}
|
|
35
|
+
}; }
|
|
36
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
*,
|
|
2
|
+
::before,
|
|
3
|
+
::after {
|
|
4
|
+
--tw-border-spacing-x: 0;
|
|
5
|
+
--tw-border-spacing-y: 0;
|
|
6
|
+
--tw-translate-x: 0;
|
|
7
|
+
--tw-translate-y: 0;
|
|
8
|
+
--tw-rotate: 0;
|
|
9
|
+
--tw-skew-x: 0;
|
|
10
|
+
--tw-skew-y: 0;
|
|
11
|
+
--tw-scale-x: 1;
|
|
12
|
+
--tw-scale-y: 1;
|
|
13
|
+
--tw-pan-x: ;
|
|
14
|
+
--tw-pan-y: ;
|
|
15
|
+
--tw-pinch-zoom: ;
|
|
16
|
+
--tw-scroll-snap-strictness: proximity;
|
|
17
|
+
--tw-ordinal: ;
|
|
18
|
+
--tw-slashed-zero: ;
|
|
19
|
+
--tw-numeric-figure: ;
|
|
20
|
+
--tw-numeric-spacing: ;
|
|
21
|
+
--tw-numeric-fraction: ;
|
|
22
|
+
--tw-ring-inset: ;
|
|
23
|
+
--tw-ring-offset-width: 0px;
|
|
24
|
+
--tw-ring-offset-color: #fff;
|
|
25
|
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
26
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
27
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
28
|
+
--tw-shadow: 0 0 #0000;
|
|
29
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
30
|
+
--tw-blur: ;
|
|
31
|
+
--tw-brightness: ;
|
|
32
|
+
--tw-contrast: ;
|
|
33
|
+
--tw-grayscale: ;
|
|
34
|
+
--tw-hue-rotate: ;
|
|
35
|
+
--tw-invert: ;
|
|
36
|
+
--tw-saturate: ;
|
|
37
|
+
--tw-sepia: ;
|
|
38
|
+
--tw-drop-shadow: ;
|
|
39
|
+
--tw-backdrop-blur: ;
|
|
40
|
+
--tw-backdrop-brightness: ;
|
|
41
|
+
--tw-backdrop-contrast: ;
|
|
42
|
+
--tw-backdrop-grayscale: ;
|
|
43
|
+
--tw-backdrop-hue-rotate: ;
|
|
44
|
+
--tw-backdrop-invert: ;
|
|
45
|
+
--tw-backdrop-opacity: ;
|
|
46
|
+
--tw-backdrop-saturate: ;
|
|
47
|
+
--tw-backdrop-sepia: ;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
::-webkit-backdrop {
|
|
51
|
+
--tw-border-spacing-x: 0;
|
|
52
|
+
--tw-border-spacing-y: 0;
|
|
53
|
+
--tw-translate-x: 0;
|
|
54
|
+
--tw-translate-y: 0;
|
|
55
|
+
--tw-rotate: 0;
|
|
56
|
+
--tw-skew-x: 0;
|
|
57
|
+
--tw-skew-y: 0;
|
|
58
|
+
--tw-scale-x: 1;
|
|
59
|
+
--tw-scale-y: 1;
|
|
60
|
+
--tw-pan-x: ;
|
|
61
|
+
--tw-pan-y: ;
|
|
62
|
+
--tw-pinch-zoom: ;
|
|
63
|
+
--tw-scroll-snap-strictness: proximity;
|
|
64
|
+
--tw-ordinal: ;
|
|
65
|
+
--tw-slashed-zero: ;
|
|
66
|
+
--tw-numeric-figure: ;
|
|
67
|
+
--tw-numeric-spacing: ;
|
|
68
|
+
--tw-numeric-fraction: ;
|
|
69
|
+
--tw-ring-inset: ;
|
|
70
|
+
--tw-ring-offset-width: 0px;
|
|
71
|
+
--tw-ring-offset-color: #fff;
|
|
72
|
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
73
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
74
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
75
|
+
--tw-shadow: 0 0 #0000;
|
|
76
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
77
|
+
--tw-blur: ;
|
|
78
|
+
--tw-brightness: ;
|
|
79
|
+
--tw-contrast: ;
|
|
80
|
+
--tw-grayscale: ;
|
|
81
|
+
--tw-hue-rotate: ;
|
|
82
|
+
--tw-invert: ;
|
|
83
|
+
--tw-saturate: ;
|
|
84
|
+
--tw-sepia: ;
|
|
85
|
+
--tw-drop-shadow: ;
|
|
86
|
+
--tw-backdrop-blur: ;
|
|
87
|
+
--tw-backdrop-brightness: ;
|
|
88
|
+
--tw-backdrop-contrast: ;
|
|
89
|
+
--tw-backdrop-grayscale: ;
|
|
90
|
+
--tw-backdrop-hue-rotate: ;
|
|
91
|
+
--tw-backdrop-invert: ;
|
|
92
|
+
--tw-backdrop-opacity: ;
|
|
93
|
+
--tw-backdrop-saturate: ;
|
|
94
|
+
--tw-backdrop-sepia: ;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
::backdrop {
|
|
98
|
+
--tw-border-spacing-x: 0;
|
|
99
|
+
--tw-border-spacing-y: 0;
|
|
100
|
+
--tw-translate-x: 0;
|
|
101
|
+
--tw-translate-y: 0;
|
|
102
|
+
--tw-rotate: 0;
|
|
103
|
+
--tw-skew-x: 0;
|
|
104
|
+
--tw-skew-y: 0;
|
|
105
|
+
--tw-scale-x: 1;
|
|
106
|
+
--tw-scale-y: 1;
|
|
107
|
+
--tw-pan-x: ;
|
|
108
|
+
--tw-pan-y: ;
|
|
109
|
+
--tw-pinch-zoom: ;
|
|
110
|
+
--tw-scroll-snap-strictness: proximity;
|
|
111
|
+
--tw-ordinal: ;
|
|
112
|
+
--tw-slashed-zero: ;
|
|
113
|
+
--tw-numeric-figure: ;
|
|
114
|
+
--tw-numeric-spacing: ;
|
|
115
|
+
--tw-numeric-fraction: ;
|
|
116
|
+
--tw-ring-inset: ;
|
|
117
|
+
--tw-ring-offset-width: 0px;
|
|
118
|
+
--tw-ring-offset-color: #fff;
|
|
119
|
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
120
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
121
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
122
|
+
--tw-shadow: 0 0 #0000;
|
|
123
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
124
|
+
--tw-blur: ;
|
|
125
|
+
--tw-brightness: ;
|
|
126
|
+
--tw-contrast: ;
|
|
127
|
+
--tw-grayscale: ;
|
|
128
|
+
--tw-hue-rotate: ;
|
|
129
|
+
--tw-invert: ;
|
|
130
|
+
--tw-saturate: ;
|
|
131
|
+
--tw-sepia: ;
|
|
132
|
+
--tw-drop-shadow: ;
|
|
133
|
+
--tw-backdrop-blur: ;
|
|
134
|
+
--tw-backdrop-brightness: ;
|
|
135
|
+
--tw-backdrop-contrast: ;
|
|
136
|
+
--tw-backdrop-grayscale: ;
|
|
137
|
+
--tw-backdrop-hue-rotate: ;
|
|
138
|
+
--tw-backdrop-invert: ;
|
|
139
|
+
--tw-backdrop-opacity: ;
|
|
140
|
+
--tw-backdrop-saturate: ;
|
|
141
|
+
--tw-backdrop-sepia: ;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.mt-4 {
|
|
145
|
+
margin-top: 1rem;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.mt-2 {
|
|
149
|
+
margin-top: 0.5rem;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.flex {
|
|
153
|
+
display: flex;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.flex-row {
|
|
157
|
+
flex-direction: row;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.flex-col {
|
|
161
|
+
flex-direction: column;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.content-center {
|
|
165
|
+
align-content: center;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.gap-2 {
|
|
169
|
+
gap: 0.5rem;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.font-sans {
|
|
173
|
+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
174
|
+
'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
|
|
175
|
+
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.text-xs {
|
|
179
|
+
font-size: 0.75rem;
|
|
180
|
+
line-height: 1rem;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.shadow {
|
|
184
|
+
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
185
|
+
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color),
|
|
186
|
+
0 1px 2px -1px var(--tw-shadow-color);
|
|
187
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
|
|
188
|
+
var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
189
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Component, h, Prop } from '@stencil/core';
|
|
2
|
+
export class ProtoFauxTrigger {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.emitter = undefined;
|
|
5
|
+
this.data = undefined;
|
|
6
|
+
}
|
|
7
|
+
componentDidLoad() {
|
|
8
|
+
if (this.emitter && window[this.emitter]) {
|
|
9
|
+
const emitter = window[this.emitter];
|
|
10
|
+
emitter.on('app-data:value', e => {
|
|
11
|
+
this.data = e;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
emitData() {
|
|
16
|
+
if (this.emitter && window[this.emitter]) {
|
|
17
|
+
const emitter = window[this.emitter];
|
|
18
|
+
const login = true;
|
|
19
|
+
const stamp = Date.now();
|
|
20
|
+
const theme = 'dark';
|
|
21
|
+
const dealers = [];
|
|
22
|
+
const data = { login, stamp, theme, dealers };
|
|
23
|
+
this.data = undefined;
|
|
24
|
+
emitter.emit('app-data:store', data);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
fetchData() {
|
|
28
|
+
if (this.emitter && window[this.emitter]) {
|
|
29
|
+
const emitter = window[this.emitter];
|
|
30
|
+
emitter.emit('app-data:get', 42);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
return (h("div", { class: "flex flex-col font-sans" },
|
|
35
|
+
h("div", { class: "flex flex-row content-center gap-2" },
|
|
36
|
+
h("button", { onClick: () => this.emitData() }, "Save"),
|
|
37
|
+
h("button", { onClick: () => this.fetchData() }, "Fetch")),
|
|
38
|
+
h("proto-faux-stamp", { class: "mt-4 text-xs", data: this.data }),
|
|
39
|
+
h("proto-faux-keys", { class: "mt-2", data: this.data })));
|
|
40
|
+
}
|
|
41
|
+
static get is() { return "proto-faux-trigger"; }
|
|
42
|
+
static get originalStyleUrls() { return {
|
|
43
|
+
"$": ["proto-faux-trigger.css"]
|
|
44
|
+
}; }
|
|
45
|
+
static get styleUrls() { return {
|
|
46
|
+
"$": ["proto-faux-trigger.css"]
|
|
47
|
+
}; }
|
|
48
|
+
static get properties() { return {
|
|
49
|
+
"emitter": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"mutable": false,
|
|
52
|
+
"complexType": {
|
|
53
|
+
"original": "string",
|
|
54
|
+
"resolved": "string",
|
|
55
|
+
"references": {}
|
|
56
|
+
},
|
|
57
|
+
"required": false,
|
|
58
|
+
"optional": false,
|
|
59
|
+
"docs": {
|
|
60
|
+
"tags": [],
|
|
61
|
+
"text": ""
|
|
62
|
+
},
|
|
63
|
+
"attribute": "emitter",
|
|
64
|
+
"reflect": false,
|
|
65
|
+
"defaultValue": "undefined"
|
|
66
|
+
},
|
|
67
|
+
"data": {
|
|
68
|
+
"type": "unknown",
|
|
69
|
+
"mutable": true,
|
|
70
|
+
"complexType": {
|
|
71
|
+
"original": "object",
|
|
72
|
+
"resolved": "object",
|
|
73
|
+
"references": {}
|
|
74
|
+
},
|
|
75
|
+
"required": false,
|
|
76
|
+
"optional": false,
|
|
77
|
+
"docs": {
|
|
78
|
+
"tags": [],
|
|
79
|
+
"text": ""
|
|
80
|
+
},
|
|
81
|
+
"defaultValue": "undefined"
|
|
82
|
+
}
|
|
83
|
+
}; }
|
|
84
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const KEY = 'proto-daisy-db:app-data';
|
|
2
|
+
const promisedParseJSON = (json) => {
|
|
3
|
+
return new Promise((resolve, reject) => {
|
|
4
|
+
try {
|
|
5
|
+
resolve(JSON.parse(json));
|
|
6
|
+
}
|
|
7
|
+
catch (e) {
|
|
8
|
+
reject(e);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
// localStorage implementation... [ generic storage ]
|
|
13
|
+
const bag = {
|
|
14
|
+
get: () => {
|
|
15
|
+
const json = localStorage.getItem(KEY);
|
|
16
|
+
return promisedParseJSON(json);
|
|
17
|
+
},
|
|
18
|
+
store: (data) => {
|
|
19
|
+
// NOTE: this assumes you're passing REAL data, not a proxy...
|
|
20
|
+
const json = JSON.stringify(data);
|
|
21
|
+
localStorage.setItem(KEY, json);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
export { bag };
|
|
25
|
+
export default bag;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* ProtoDaisyDb custom elements */
|
|
2
|
+
export { ProtoDaisyDB as ProtoDaisyDb } from '../types/components/proto-daisy-db/proto-daisy-db';
|
|
3
|
+
export { ProtoFauxKeys as ProtoFauxKeys } from '../types/components/proto-faux-keys/proto-faux-keys';
|
|
4
|
+
export { ProtoFauxStamp as ProtoFauxStamp } from '../types/components/proto-faux-stamp/proto-faux-stamp';
|
|
5
|
+
export { ProtoFauxTrigger as ProtoFauxTrigger } from '../types/components/proto-faux-trigger/proto-faux-trigger';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Used to manually set the base path where assets can be found.
|
|
9
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
10
|
+
* such as "setAssetPath(import.meta.url)". Other options include
|
|
11
|
+
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
12
|
+
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
13
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
14
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
15
|
+
* will have to ensure the static assets are copied to its build directory.
|
|
16
|
+
*/
|
|
17
|
+
export declare const setAssetPath: (path: string) => void;
|
|
18
|
+
|
|
19
|
+
export interface SetPlatformOptions {
|
|
20
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
21
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
22
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
25
|
+
export * from '../types';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
|
+
export { ProtoDaisyDb, defineCustomElement as defineCustomElementProtoDaisyDb } from './proto-daisy-db.js';
|
|
3
|
+
export { ProtoFauxKeys, defineCustomElement as defineCustomElementProtoFauxKeys } from './proto-faux-keys.js';
|
|
4
|
+
export { ProtoFauxStamp, defineCustomElement as defineCustomElementProtoFauxStamp } from './proto-faux-stamp.js';
|
|
5
|
+
export { ProtoFauxTrigger, defineCustomElement as defineCustomElementProtoFauxTrigger } from './proto-faux-trigger.js';
|