proto-tinker-wc 0.0.378 → 0.0.379
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/cjs/{index-7a0649cb.js → index-9dee56ff.js} +15 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/proto-tinker-wc.cjs.js +2 -2
- package/dist/cjs/proto-tinker.cjs.entry.js +162 -162
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/proto-tinker/chevron-double-left.js +5 -5
- package/dist/collection/components/proto-tinker/close.js +5 -5
- package/dist/collection/components/proto-tinker/color-picker.js +9 -9
- package/dist/collection/components/proto-tinker/data-source.js +7 -7
- package/dist/collection/components/proto-tinker/data-values.js +3 -3
- package/dist/collection/components/proto-tinker/eswat2-io.js +1 -1
- package/dist/collection/components/proto-tinker/fingerprint.js +5 -5
- package/dist/collection/components/proto-tinker/header.js +1 -1
- package/dist/collection/components/proto-tinker/proto-tinker.js +43 -43
- package/dist/collection/components/proto-tinker/radio.js +6 -6
- package/dist/collection/components/proto-tinker/refresh.js +5 -5
- package/dist/collection/components/proto-tinker/tw-label.js +1 -1
- package/dist/collection/utils/bag.js +8 -8
- package/dist/collection/utils/color-plugin.js +29 -29
- package/dist/collection/utils/funnel-defs.js +5 -5
- package/dist/collection/utils/named-colors.js +20 -20
- package/dist/collection/utils/store.js +29 -29
- package/dist/components/proto-tinker.d.ts +2 -2
- package/dist/components/proto-tinker.js +177 -177
- package/dist/esm/{index-5aeb2dca.js → index-4a991e74.js} +15 -4
- package/dist/esm/loader.js +2 -2
- package/dist/esm/proto-tinker-wc.js +3 -3
- package/dist/esm/proto-tinker.entry.js +162 -162
- package/dist/proto-tinker-wc/{p-0542aadd.js → p-bcb58075.js} +1 -1
- package/dist/proto-tinker-wc/{p-b595b9bc.entry.js → p-de9cb47c.entry.js} +1 -1
- package/dist/proto-tinker-wc/proto-tinker-wc.esm.js +1 -1
- package/dist/types/components/proto-tinker/proto-tinker.d.ts +3 -3
- package/dist/types/stencil-public-runtime.d.ts +8 -0
- package/dist/types/utils/bag.d.ts +2 -2
- package/dist/types/utils/color-plugin.d.ts +9 -9
- package/dist/types/utils/types.d.ts +33 -33
- package/package.json +5 -5
|
@@ -468,7 +468,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
468
468
|
elm[memberName] = newValue;
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
catch (e) {
|
|
471
|
+
catch (e) {
|
|
472
|
+
/**
|
|
473
|
+
* in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
|
|
474
|
+
*/
|
|
475
|
+
}
|
|
472
476
|
}
|
|
473
477
|
if (newValue == null || newValue === false) {
|
|
474
478
|
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
@@ -487,6 +491,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
487
491
|
}
|
|
488
492
|
};
|
|
489
493
|
const parseClassListRegex = /\s/;
|
|
494
|
+
/**
|
|
495
|
+
* Parsed a string of classnames into an array
|
|
496
|
+
* @param value className string, e.g. "foo bar baz"
|
|
497
|
+
* @returns list of classes, e.g. ["foo", "bar", "baz"]
|
|
498
|
+
*/
|
|
490
499
|
const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
|
|
491
500
|
const CAPTURE_EVENT_SUFFIX = 'Capture';
|
|
492
501
|
const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
|
|
@@ -1226,10 +1235,10 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1226
1235
|
*/
|
|
1227
1236
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1228
1237
|
var _a;
|
|
1238
|
+
const prototype = Cstr.prototype;
|
|
1229
1239
|
if (cmpMeta.$members$) {
|
|
1230
1240
|
// It's better to have a const than two Object.entries()
|
|
1231
1241
|
const members = Object.entries(cmpMeta.$members$);
|
|
1232
|
-
const prototype = Cstr.prototype;
|
|
1233
1242
|
members.map(([memberName, [memberFlags]]) => {
|
|
1234
1243
|
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1235
1244
|
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
@@ -1252,6 +1261,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1252
1261
|
const attrNameToPropName = new Map();
|
|
1253
1262
|
prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
1254
1263
|
plt.jmp(() => {
|
|
1264
|
+
var _a;
|
|
1255
1265
|
const propName = attrNameToPropName.get(attrName);
|
|
1256
1266
|
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
1257
1267
|
// in the case where an attribute was set inline.
|
|
@@ -1307,11 +1317,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1307
1317
|
// 1. The instance is ready
|
|
1308
1318
|
// 2. The watchers are ready
|
|
1309
1319
|
// 3. The value has changed
|
|
1310
|
-
if (
|
|
1320
|
+
if (flags &&
|
|
1321
|
+
!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
|
|
1311
1322
|
flags & 128 /* HOST_FLAGS.isWatchReady */ &&
|
|
1312
1323
|
newValue !== oldValue) {
|
|
1313
1324
|
const instance = hostRef.$lazyInstance$ ;
|
|
1314
|
-
const entry = cmpMeta.$watchers$[attrName];
|
|
1325
|
+
const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
|
|
1315
1326
|
entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
|
|
1316
1327
|
if (instance[callbackName] != null) {
|
|
1317
1328
|
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9dee56ff.js');
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9dee56ff.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.
|
|
8
|
+
Stencil Client Patch Browser v4.8.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchBrowser = () => {
|
|
11
11
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('proto-tinker-wc.cjs.js', document.baseURI).href));
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9dee56ff.js');
|
|
6
6
|
|
|
7
7
|
const Radio = props => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
const hex = props.hex || 'currentColor';
|
|
9
|
+
const klass = props.class;
|
|
10
|
+
const label = props.label || 'radio';
|
|
11
|
+
const selected = props.selected || false;
|
|
12
|
+
const size = props.size || 24;
|
|
13
|
+
return (index.h("svg", { class: klass, width: size, height: size, viewBox: "0 0 24 24", role: "img", "aria-label": "title" },
|
|
14
|
+
index.h("title", null, label),
|
|
15
|
+
' ',
|
|
16
|
+
index.h("g", { fill: hex }, selected ? (index.h("path", { d: "M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" })) : (index.h("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" }))),
|
|
17
|
+
index.h("path", { d: "M0 0h24v24H0z", fill: "none" })));
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
function createCommonjsModule(fn, basedir, module) {
|
|
@@ -2138,11 +2138,11 @@ function zeroArray(arr, length) {
|
|
|
2138
2138
|
}
|
|
2139
2139
|
|
|
2140
2140
|
const funnelDefs = [
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2141
|
+
{ id: 1, height: 400, width: 100, x: 10, y: 10, drop: 20 },
|
|
2142
|
+
{ id: 2, height: 356, width: 100, x: 120, y: 32, drop: 20 },
|
|
2143
|
+
{ id: 3, height: 312, width: 100, x: 230, y: 54, drop: 20 },
|
|
2144
|
+
{ id: 4, height: 268, width: 100, x: 340, y: 76, drop: 20 },
|
|
2145
|
+
{ id: 5, height: 224, width: 100, x: 450, y: 98, drop: 20 },
|
|
2146
2146
|
];
|
|
2147
2147
|
const sample = funnelDefs.map(() => 0);
|
|
2148
2148
|
|
|
@@ -2170,28 +2170,28 @@ const slate4 = '#4e5964';
|
|
|
2170
2170
|
const white = '#ffffff';
|
|
2171
2171
|
// NOTE: this is ONLY used internally...
|
|
2172
2172
|
const _namedColors = {
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2173
|
+
bada55,
|
|
2174
|
+
navy,
|
|
2175
|
+
blue,
|
|
2176
|
+
aqua,
|
|
2177
|
+
teal,
|
|
2178
|
+
olive,
|
|
2179
|
+
green,
|
|
2180
|
+
lime,
|
|
2181
|
+
yellow,
|
|
2182
|
+
orange,
|
|
2183
|
+
red,
|
|
2184
|
+
maroon,
|
|
2185
|
+
fuchsia,
|
|
2186
|
+
purple,
|
|
2187
|
+
black,
|
|
2188
|
+
gray,
|
|
2189
|
+
silver,
|
|
2190
2190
|
};
|
|
2191
2191
|
const _altColors = {
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2192
|
+
slate,
|
|
2193
|
+
slate4,
|
|
2194
|
+
white,
|
|
2195
2195
|
};
|
|
2196
2196
|
const colorFor = (key) => _namedColors[key] || _altColors[key];
|
|
2197
2197
|
const colorKeys = Object.keys(_namedColors);
|
|
@@ -2390,182 +2390,182 @@ const createStore = (defaultState, shouldUpdate) => {
|
|
|
2390
2390
|
const KEY = 'proto-tinker-wc::app-data';
|
|
2391
2391
|
// localStorage implementation... [ json ]
|
|
2392
2392
|
const bag = {
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2393
|
+
get: () => {
|
|
2394
|
+
const json = localStorage.getItem(KEY);
|
|
2395
|
+
return json ? JSON.parse(json) : undefined;
|
|
2396
|
+
},
|
|
2397
|
+
store: data => {
|
|
2398
|
+
const json = JSON.stringify(data);
|
|
2399
|
+
localStorage.setItem(KEY, json);
|
|
2400
|
+
},
|
|
2401
2401
|
};
|
|
2402
2402
|
|
|
2403
2403
|
const initStore = {
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2404
|
+
count: 0,
|
|
2405
|
+
pick: 'bada55',
|
|
2406
|
+
values: [...sample],
|
|
2407
2407
|
};
|
|
2408
2408
|
const store = createStore(initStore);
|
|
2409
2409
|
const { state, onChange } = store;
|
|
2410
2410
|
const saveState = () => {
|
|
2411
|
-
|
|
2412
|
-
|
|
2411
|
+
const { count, pick, values } = state;
|
|
2412
|
+
bag.store({ count, pick, values });
|
|
2413
2413
|
};
|
|
2414
2414
|
const actions = {
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2415
|
+
initApp: () => {
|
|
2416
|
+
const data = bag.get();
|
|
2417
|
+
if (data) {
|
|
2418
|
+
const { count, pick, values } = data;
|
|
2419
|
+
state.count = count;
|
|
2420
|
+
state.pick = pick;
|
|
2421
|
+
state.values = values;
|
|
2422
|
+
}
|
|
2423
|
+
},
|
|
2424
|
+
refresh: () => {
|
|
2425
|
+
const values = sample.map(() => Math.floor(Math.random() * 100));
|
|
2426
|
+
state.count = state.count + 1;
|
|
2427
|
+
state.values = values;
|
|
2428
|
+
saveState();
|
|
2429
|
+
},
|
|
2430
|
+
reset: () => {
|
|
2431
|
+
state.count = 0;
|
|
2432
|
+
state.values = [...sample];
|
|
2433
|
+
saveState();
|
|
2434
|
+
},
|
|
2435
|
+
updatePick: pick => {
|
|
2436
|
+
state.pick = pick;
|
|
2437
|
+
saveState();
|
|
2438
|
+
},
|
|
2439
2439
|
};
|
|
2440
2440
|
|
|
2441
2441
|
// WARNING: generated file...
|
|
2442
2442
|
const TW_VERSION = '3.3.5';
|
|
2443
2443
|
|
|
2444
2444
|
const ColorPicker = props => {
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2445
|
+
const { actions, state } = props;
|
|
2446
|
+
const { pick } = state;
|
|
2447
|
+
return (index.h("div", { id: "toolbar", class: "flex flex-wrap", role: "radiogroup" }, colorKeys.map((key) => {
|
|
2448
|
+
const hex = colorFor(key);
|
|
2449
|
+
const selected = pick === key;
|
|
2450
|
+
return (index.h("div", { "aria-label": key, "aria-checked": selected ? 'true' : 'false', role: "radio", onClick: () => {
|
|
2451
|
+
actions.updatePick(key);
|
|
2452
|
+
} },
|
|
2453
|
+
index.h(Radio, { hex: hex, selected: selected, label: key })));
|
|
2454
|
+
})));
|
|
2455
2455
|
};
|
|
2456
2456
|
|
|
2457
2457
|
const ChevronDoubleLeft = props => {
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2458
|
+
const hex = props.hex || 'currentColor';
|
|
2459
|
+
const klass = props.class;
|
|
2460
|
+
const label = props.label || 'chevron-double-left';
|
|
2461
|
+
const size = props.size || 24;
|
|
2462
|
+
return (index.h("svg", { class: klass, width: size, height: size, viewBox: "0 0 24 24", role: "img", "aria-label": "title" },
|
|
2463
|
+
index.h("title", null, label),
|
|
2464
|
+
index.h("g", { fill: hex },
|
|
2465
|
+
index.h("path", { d: "M18.41,7.41L17,6L11,12L17,18L18.41,16.59L13.83,12L18.41,7.41M12.41,7.41L11,6L5,12L11,18L12.41,16.59L7.83,12L12.41,7.41Z" })),
|
|
2466
|
+
index.h("path", { d: "M0 0h24v24H0z", fill: "none" })));
|
|
2467
2467
|
};
|
|
2468
2468
|
|
|
2469
2469
|
const Close = props => {
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2470
|
+
const hex = props.hex || 'currentColor';
|
|
2471
|
+
const klass = props.class;
|
|
2472
|
+
const label = props.label || 'close';
|
|
2473
|
+
const size = props.size || 24;
|
|
2474
|
+
return (index.h("svg", { class: klass, width: size, height: size, viewBox: "0 0 24 24", role: "img", "aria-label": "title" },
|
|
2475
|
+
index.h("title", null, label),
|
|
2476
|
+
index.h("g", { fill: hex },
|
|
2477
|
+
index.h("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })),
|
|
2478
|
+
index.h("path", { d: "M0 0h24v24H0z", fill: "none" })));
|
|
2479
2479
|
};
|
|
2480
2480
|
|
|
2481
2481
|
const Refresh = props => {
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2482
|
+
const hex = props.hex || 'currentColor';
|
|
2483
|
+
const klass = props.class;
|
|
2484
|
+
const label = props.label || 'refresh';
|
|
2485
|
+
const size = props.size || 24;
|
|
2486
|
+
return (index.h("svg", { class: klass, width: size, height: size, viewBox: "0 0 24 24", role: "img", "aria-label": "title" },
|
|
2487
|
+
index.h("title", null, label),
|
|
2488
|
+
index.h("g", { fill: hex },
|
|
2489
|
+
index.h("path", { d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99\n 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65\n 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35\n 2.35z" })),
|
|
2490
|
+
index.h("path", { d: "M0 0h24v24H0z", fill: "none" })));
|
|
2491
2491
|
};
|
|
2492
2492
|
|
|
2493
2493
|
const help = 'click a button... ';
|
|
2494
2494
|
const DataSource = props => {
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2495
|
+
const { actions, state } = props;
|
|
2496
|
+
const { count } = state;
|
|
2497
|
+
return (index.h("div", { class: "mb-10px mt-3 flex items-center" },
|
|
2498
|
+
index.h("button", { "aria-label": "Refresh", class: "ds1-button data-button bg-clrs-blue", onClick: () => {
|
|
2499
|
+
actions.refresh();
|
|
2500
|
+
} },
|
|
2501
|
+
index.h(Refresh, { label: "Refresh" })),
|
|
2502
|
+
index.h("button", { "aria-label": "Reset", class: "ds1-button data-button bg-clrs-red", onClick: () => {
|
|
2503
|
+
actions.reset();
|
|
2504
|
+
} },
|
|
2505
|
+
index.h(Close, { label: "Reset" })),
|
|
2506
|
+
index.h("span", { class: "flex items-center" },
|
|
2507
|
+
index.h(ChevronDoubleLeft, { size: 28 }),
|
|
2508
|
+
index.h("span", { class: "italic" },
|
|
2509
|
+
help,
|
|
2510
|
+
index.h("sup", null, count)))));
|
|
2511
2511
|
};
|
|
2512
2512
|
|
|
2513
2513
|
const TwLabel = _props => {
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2514
|
+
return (index.h("label", { class: "ml-auto align-top text-xs italic text-clrs-slate4" },
|
|
2515
|
+
"Tailwind ",
|
|
2516
|
+
TW_VERSION));
|
|
2517
2517
|
};
|
|
2518
2518
|
|
|
2519
2519
|
const DataValues = props => {
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2520
|
+
const { state } = props;
|
|
2521
|
+
const { values, pick, count } = state;
|
|
2522
|
+
return (index.h("div", { class: "flex" },
|
|
2523
|
+
index.h("div", { class: "flex flex-col" },
|
|
2524
|
+
index.h("div", { class: "flex" },
|
|
2525
|
+
index.h("span", { class: "mr-10px font-bold" }, "color:"),
|
|
2526
|
+
index.h("span", { class: "italic text-clrs-slate4" }, pick)),
|
|
2527
|
+
index.h("div", { class: "mt-5px flex" },
|
|
2528
|
+
index.h("span", { class: "mr-10px font-bold" }, "sample:"),
|
|
2529
|
+
index.h("span", { class: "italic text-clrs-slate4" }, `${count > 0 ? values : '...'}`))),
|
|
2530
|
+
index.h(TwLabel, null)));
|
|
2531
2531
|
};
|
|
2532
2532
|
|
|
2533
2533
|
const Fingerprint = props => {
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2534
|
+
const hex = props.hex || 'currentColor';
|
|
2535
|
+
const klass = props.class;
|
|
2536
|
+
const label = props.label || 'fingerprint';
|
|
2537
|
+
const size = props.size || 24;
|
|
2538
|
+
return (index.h("svg", { class: klass, width: size, height: size, viewBox: "0 0 24 24", role: "img", "aria-label": "title" },
|
|
2539
|
+
index.h("title", null, label),
|
|
2540
|
+
index.h("g", { fill: hex },
|
|
2541
|
+
index.h("path", { d: "M17.81,4.47C17.73,4.47 17.65,4.45 17.58,4.41C15.66,3.42 14,3\n 12,3C10.03,3 8.15,3.47 6.44,4.41C6.2,4.54 5.9,4.45 5.76,4.21C5.63,3.97\n 5.72,3.66 5.96,3.53C7.82,2.5 9.86,2 12,2C14.14,2 16,2.47\n 18.04,3.5C18.29,3.65 18.38,3.95 18.25,4.19C18.16,4.37 18,4.47\n 17.81,4.47M3.5,9.72C3.4,9.72 3.3,9.69 3.21,9.63C3,9.47 2.93,9.16\n 3.09,8.93C4.08,7.53 5.34,6.43 6.84,5.66C10,4.04 14,4.03\n 17.15,5.65C18.65,6.42 19.91,7.5 20.9,8.9C21.06,9.12 21,9.44\n 20.78,9.6C20.55,9.76 20.24,9.71 20.08,9.5C19.18,8.22 18.04,7.23\n 16.69,6.54C13.82,5.07 10.15,5.07 7.29,6.55C5.93,7.25 4.79,8.25\n 3.89,9.5C3.81,9.65 3.66,9.72 3.5,9.72M9.75,21.79C9.62,21.79 9.5,21.74\n 9.4,21.64C8.53,20.77 8.06,20.21 7.39,19C6.7,17.77 6.34,16.27\n 6.34,14.66C6.34,11.69 8.88,9.27 12,9.27C15.12,9.27 17.66,11.69\n 17.66,14.66A0.5,0.5 0 0,1 17.16,15.16A0.5,0.5 0 0,1\n 16.66,14.66C16.66,12.24 14.57,10.27 12,10.27C9.43,10.27 7.34,12.24\n 7.34,14.66C7.34,16.1 7.66,17.43 8.27,18.5C8.91,19.66 9.35,20.15\n 10.12,20.93C10.31,21.13 10.31,21.44 10.12,21.64C10,21.74 9.88,21.79\n 9.75,21.79M16.92,19.94C15.73,19.94 14.68,19.64 13.82,19.05C12.33,18.04\n 11.44,16.4 11.44,14.66A0.5,0.5 0 0,1 11.94,14.16A0.5,0.5 0 0,1\n 12.44,14.66C12.44,16.07 13.16,17.4 14.38,18.22C15.09,18.7 15.92,18.93\n 16.92,18.93C17.16,18.93 17.56,18.9 17.96,18.83C18.23,18.78 18.5,18.96\n 18.54,19.24C18.59,19.5 18.41,19.77 18.13,19.82C17.56,19.93 17.06,19.94\n 16.92,19.94M14.91,22C14.87,22 14.82,22 14.78,22C13.19,21.54 12.15,20.95\n 11.06,19.88C9.66,18.5 8.89,16.64 8.89,14.66C8.89,13.04 10.27,11.72\n 11.97,11.72C13.67,11.72 15.05,13.04 15.05,14.66C15.05,15.73 16,16.6\n 17.13,16.6C18.28,16.6 19.21,15.73 19.21,14.66C19.21,10.89 15.96,7.83\n 11.96,7.83C9.12,7.83 6.5,9.41 5.35,11.86C4.96,12.67 4.76,13.62\n 4.76,14.66C4.76,15.44 4.83,16.67 5.43,18.27C5.53,18.53 5.4,18.82\n 5.14,18.91C4.88,19 4.59,18.87 4.5,18.62C4,17.31 3.77,16\n 3.77,14.66C3.77,13.46 4,12.37 4.45,11.42C5.78,8.63 8.73,6.82\n 11.96,6.82C16.5,6.82 20.21,10.33 20.21,14.65C20.21,16.27 18.83,17.59\n 17.13,17.59C15.43,17.59 14.05,16.27 14.05,14.65C14.05,13.58 13.12,12.71\n 11.97,12.71C10.82,12.71 9.89,13.58 9.89,14.65C9.89,16.36 10.55,17.96\n 11.76,19.16C12.71,20.1 13.62,20.62 15.03,21C15.3,21.08 15.45,21.36\n 15.38,21.62C15.33,21.85 15.12,22 14.91,22Z" })),
|
|
2542
|
+
index.h("path", { d: "M0 0h24v24H0z", fill: "none" })));
|
|
2543
2543
|
};
|
|
2544
2544
|
|
|
2545
2545
|
const url = 'https://eswat2.dev';
|
|
2546
2546
|
const who = 'eswat2';
|
|
2547
2547
|
const Eswat2Io = _props => {
|
|
2548
|
-
|
|
2549
|
-
|
|
2548
|
+
return (index.h("a", { class: "absolute right-8 top-8 text-clrs-gray hover:text-clrs-navy", href: url, "aria-label": who, target: "blank", title: who },
|
|
2549
|
+
index.h(Fingerprint, { label: "eswat2" })));
|
|
2550
2550
|
};
|
|
2551
2551
|
|
|
2552
2552
|
const Header = props => {
|
|
2553
|
-
|
|
2553
|
+
return (index.h("h1", { class: "mb-11 ml-0 mr-0 mt-11 text-center text-6xl font-thin uppercase text-clrs-red" }, props.label));
|
|
2554
2554
|
};
|
|
2555
2555
|
|
|
2556
2556
|
const protoTinkerCss = "*,::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;}::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;}.ds1-main{display:flex;flex-direction:column;padding:1rem;font-family:ui-sans-serif,\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n 'Helvetica Neue',\n Arial,\n 'Noto Sans',\n sans-serif,\n 'Apple Color Emoji',\n 'Segoe UI Emoji',\n 'Segoe UI Symbol',\n 'Noto Color Emoji';color:var(--clrs-navy, #001f3f);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ds1-button{display:flex;align-items:center;border-style:solid;border-color:var(--clrs-slate, #708090);color:var(--clrs-white, #ffffff)}.ds1-button:active{background-color:var(--clrs-gray, #aaaaaa);color:var(--clrs-navy, #001f3f)}.absolute{position:absolute}.right-8{right:2rem}.top-8{top:2rem}.mb-10px{margin-bottom:10px}.mb-11{margin-bottom:2.75rem}.ml-0{margin-left:0px}.ml-auto{margin-left:auto}.mr-0{margin-right:0px}.mr-10px{margin-right:10px}.mt-11{margin-top:2.75rem}.mt-3{margin-top:0.75rem}.mt-5px{margin-top:5px}.flex{display:flex}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.bg-clrs-blue{background-color:var(--clrs-blue, #0074d9)}.bg-clrs-red{background-color:var(--clrs-red, #ff4136)}.text-center{text-align:center}.align-top{vertical-align:top}.text-6xl{font-size:3.75rem;line-height:1}.text-xs{font-size:0.75rem;line-height:1rem}.font-bold{font-weight:700}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.italic{font-style:italic}.text-clrs-gray{color:var(--clrs-gray, #aaaaaa)}.text-clrs-red{color:var(--clrs-red, #ff4136)}.text-clrs-slate4{color:var(--clrs-slate4, #4e5964)}.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)}.data-button{border-radius:5px;border-width:1px;padding:5px;margin:0px;margin-right:5px;cursor:pointer}.hover\\:text-clrs-navy:hover{color:var(--clrs-navy, #001f3f)}";
|
|
2557
2557
|
|
|
2558
2558
|
const ProtoTinker = class {
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2559
|
+
constructor(hostRef) {
|
|
2560
|
+
index.registerInstance(this, hostRef);
|
|
2561
|
+
this.tag = 'proto-tinker';
|
|
2562
|
+
}
|
|
2563
|
+
componentDidLoad() {
|
|
2564
|
+
actions.initApp();
|
|
2565
|
+
}
|
|
2566
|
+
render() {
|
|
2567
|
+
return (index.h("div", { id: "app", class: "ds1-main" }, index.h(Header, { label: "tinker wc" }), index.h(Eswat2Io, null), index.h(DataSource, { actions: actions, state: state }), index.h(ColorPicker, { actions: actions, state: state }), index.h("hr", { class: "ml-0 mr-0" }), index.h(DataValues, { state: state })));
|
|
2568
|
+
}
|
|
2569
2569
|
};
|
|
2570
2570
|
ProtoTinker.style = protoTinkerCss;
|
|
2571
2571
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
const ChevronDoubleLeft = props => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
const hex = props.hex || 'currentColor';
|
|
4
|
+
const klass = props.class;
|
|
5
|
+
const label = props.label || 'chevron-double-left';
|
|
6
|
+
const size = props.size || 24;
|
|
7
|
+
return (h("svg", { class: klass, width: size, height: size, viewBox: "0 0 24 24", role: "img", "aria-label": "title" }, h("title", null, label), h("g", { fill: hex }, h("path", { d: "M18.41,7.41L17,6L11,12L17,18L18.41,16.59L13.83,12L18.41,7.41M12.41,7.41L11,6L5,12L11,18L12.41,16.59L7.83,12L12.41,7.41Z" })), h("path", { d: "M0 0h24v24H0z", fill: "none" })));
|
|
8
8
|
};
|
|
9
9
|
export { ChevronDoubleLeft };
|
|
10
10
|
export default ChevronDoubleLeft;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
const Close = props => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
const hex = props.hex || 'currentColor';
|
|
4
|
+
const klass = props.class;
|
|
5
|
+
const label = props.label || 'close';
|
|
6
|
+
const size = props.size || 24;
|
|
7
|
+
return (h("svg", { class: klass, width: size, height: size, viewBox: "0 0 24 24", role: "img", "aria-label": "title" }, h("title", null, label), h("g", { fill: hex }, h("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })), h("path", { d: "M0 0h24v24H0z", fill: "none" })));
|
|
8
8
|
};
|
|
9
9
|
export { Close };
|
|
10
10
|
export default Close;
|
|
@@ -2,15 +2,15 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { Radio } from "./radio";
|
|
3
3
|
import { colorKeys, colorFor } from "../../utils";
|
|
4
4
|
const ColorPicker = props => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
const { actions, state } = props;
|
|
6
|
+
const { pick } = state;
|
|
7
|
+
return (h("div", { id: "toolbar", class: "flex flex-wrap", role: "radiogroup" }, colorKeys.map((key) => {
|
|
8
|
+
const hex = colorFor(key);
|
|
9
|
+
const selected = pick === key;
|
|
10
|
+
return (h("div", { "aria-label": key, "aria-checked": selected ? 'true' : 'false', role: "radio", onClick: () => {
|
|
11
|
+
actions.updatePick(key);
|
|
12
|
+
} }, h(Radio, { hex: hex, selected: selected, label: key })));
|
|
13
|
+
})));
|
|
14
14
|
};
|
|
15
15
|
export { ColorPicker };
|
|
16
16
|
export default ColorPicker;
|
|
@@ -4,13 +4,13 @@ import { Close } from "./close";
|
|
|
4
4
|
import { Refresh } from "./refresh";
|
|
5
5
|
const help = 'click a button... ';
|
|
6
6
|
const DataSource = props => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
const { actions, state } = props;
|
|
8
|
+
const { count } = state;
|
|
9
|
+
return (h("div", { class: "mb-10px mt-3 flex items-center" }, h("button", { "aria-label": "Refresh", class: "ds1-button data-button bg-clrs-blue", onClick: () => {
|
|
10
|
+
actions.refresh();
|
|
11
|
+
} }, h(Refresh, { label: "Refresh" })), h("button", { "aria-label": "Reset", class: "ds1-button data-button bg-clrs-red", onClick: () => {
|
|
12
|
+
actions.reset();
|
|
13
|
+
} }, h(Close, { label: "Reset" })), h("span", { class: "flex items-center" }, h(ChevronDoubleLeft, { size: 28 }), h("span", { class: "italic" }, help, h("sup", null, count)))));
|
|
14
14
|
};
|
|
15
15
|
export { DataSource };
|
|
16
16
|
export default DataSource;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { TwLabel } from "./tw-label";
|
|
3
3
|
const DataValues = props => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const { state } = props;
|
|
5
|
+
const { values, pick, count } = state;
|
|
6
|
+
return (h("div", { class: "flex" }, h("div", { class: "flex flex-col" }, h("div", { class: "flex" }, h("span", { class: "mr-10px font-bold" }, "color:"), h("span", { class: "italic text-clrs-slate4" }, pick)), h("div", { class: "mt-5px flex" }, h("span", { class: "mr-10px font-bold" }, "sample:"), h("span", { class: "italic text-clrs-slate4" }, `${count > 0 ? values : '...'}`))), h(TwLabel, null)));
|
|
7
7
|
};
|
|
8
8
|
export { DataValues };
|
|
9
9
|
export default DataValues;
|
|
@@ -3,7 +3,7 @@ import { Fingerprint } from "./fingerprint";
|
|
|
3
3
|
const url = 'https://eswat2.dev';
|
|
4
4
|
const who = 'eswat2';
|
|
5
5
|
const Eswat2Io = _props => {
|
|
6
|
-
|
|
6
|
+
return (h("a", { class: "absolute right-8 top-8 text-clrs-gray hover:text-clrs-navy", href: url, "aria-label": who, target: "blank", title: who }, h(Fingerprint, { label: "eswat2" })));
|
|
7
7
|
};
|
|
8
8
|
export { Eswat2Io };
|
|
9
9
|
export default Eswat2Io;
|