kempo 2.9.1 → 2.9.4
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/components/Accordion.js +1 -1
- package/dist/components/Dialog.js +1 -1
- package/dist/components/DirectoryViewer.js +1 -1
- package/dist/components/FocusCapture.js +1 -1
- package/dist/components/Table.js +1 -1
- package/dist/components/Timestamp.js +1 -1
- package/dist/components/Toggle.js +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/formatTimestamp.js +1 -1
- package/docs/components/_template.html +9 -0
- package/docs/components/accordion.html +52 -12
- package/docs/components/card.html +68 -8
- package/docs/components/component.html +6 -0
- package/docs/components/content-slider.html +8 -0
- package/docs/components/dialog.html +145 -5
- package/docs/components/directory-viewer.html +51 -40
- package/docs/components/focus-capture.html +68 -0
- package/docs/components/icon.html +76 -5
- package/docs/components/import.html +47 -0
- package/docs/components/lazy-component.html +45 -15
- package/docs/components/reactive-component.html +69 -0
- package/docs/components/reactive-lazy-component.html +69 -0
- package/docs/components/resize.html +52 -3
- package/docs/components/search.html +102 -0
- package/docs/components/show-more.html +54 -5
- package/docs/components/{sidemenu.html → side-menu.html} +56 -3
- package/docs/components/split.html +57 -16
- package/docs/components/table.html +13 -5
- package/docs/components/tabs.html +72 -4
- package/docs/components/tags.html +94 -0
- package/docs/components/theme-switcher.html +74 -0
- package/docs/components/timestamp.html +86 -0
- package/docs/components/toggle.html +37 -34
- package/docs/index.html +5 -0
- package/docs/kempo/components/Accordion.js +1 -1
- package/docs/kempo/components/Dialog.js +1 -1
- package/docs/kempo/components/DirectoryViewer.js +1 -1
- package/docs/kempo/components/FocusCapture.js +1 -1
- package/docs/kempo/components/Table.js +1 -1
- package/docs/kempo/components/Timestamp.js +1 -1
- package/docs/kempo/components/Toggle.js +1 -1
- package/docs/kempo/index.js +1 -1
- package/docs/kempo/utils/formatTimestamp.js +1 -1
- package/docs/nav-1.inc.html +16 -2
- package/docs/nav.inc.html +10 -2
- package/docs/search.json +281 -23
- package/docs/styles/_template.html +6 -0
- package/docs/styles/borders-spacing.html +6 -0
- package/docs/styles/buttons.html +6 -0
- package/docs/styles/colors.html +6 -0
- package/docs/styles/displays-layouts.html +6 -0
- package/docs/styles/embed-1.html +6 -0
- package/docs/styles/inputs.html +6 -0
- package/docs/styles/tables.html +6 -0
- package/docs/styles/typography.html +6 -0
- package/docs/{components/stacks.html → utils/_template.html} +11 -30
- package/docs/utils/cli.html +84 -0
- package/docs/utils/cookie.html +87 -0
- package/docs/utils/debounce.html +61 -0
- package/docs/utils/drag.html +85 -0
- package/docs/utils/element.html +124 -0
- package/docs/utils/format-timestamp.html +64 -0
- package/docs/utils/fuzzy-match.html +60 -0
- package/package.json +1 -1
- package/src/components/Accordion.js +0 -1
- package/src/components/Dialog.js +3 -2
- package/src/components/DirectoryViewer.js +21 -92
- package/src/components/FocusCapture.js +2 -1
- package/src/components/Search.js +4 -1
- package/src/components/Table.js +15 -8
- package/src/components/Timestamp.js +7 -4
- package/src/components/Toggle.js +3 -0
- package/src/utils/formatTimestamp.js +26 -10
- package/docs/table.html +0 -0
- package/src/components/Stacks.js +0 -79
- package/src/utils/files.js +0 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import LazyComponent from './LazyComponent.js';
|
|
2
2
|
import Component from './Component.js';
|
|
3
|
-
import './Icon.js';
|
|
3
|
+
// import './Icon.js';
|
|
4
4
|
import {
|
|
5
5
|
onEvent,
|
|
6
6
|
offEvent,
|
|
@@ -10,7 +10,8 @@ import watchDirectoryHandle from '../utils/watchDirectoryHandle.js';
|
|
|
10
10
|
|
|
11
11
|
const handle = Symbol(),
|
|
12
12
|
loadDirectoryClickHandler = Symbol(),
|
|
13
|
-
|
|
13
|
+
openToggleClickHandler = Symbol(),
|
|
14
|
+
fileSelectedHandler = Symbol(),
|
|
14
15
|
watchId = Symbol(),
|
|
15
16
|
changeCallback = Symbol(),
|
|
16
17
|
filters = Symbol();
|
|
@@ -36,13 +37,13 @@ export default class DirectoryViewer extends LazyComponent {
|
|
|
36
37
|
this[changeCallback] = () => {
|
|
37
38
|
this.updateContents();
|
|
38
39
|
}
|
|
39
|
-
this[selectedHandler] = (e) => {
|
|
40
|
-
|
|
41
|
-
}
|
|
42
40
|
|
|
43
41
|
/* Init */
|
|
42
|
+
this.slot = 'content';
|
|
44
43
|
this.registerAttributes({
|
|
44
|
+
root: !_handle,
|
|
45
45
|
hasHandle: !!_handle,
|
|
46
|
+
opened: !_handle,
|
|
46
47
|
selected: false
|
|
47
48
|
});
|
|
48
49
|
}
|
|
@@ -50,8 +51,9 @@ export default class DirectoryViewer extends LazyComponent {
|
|
|
50
51
|
/* Lifecycle Callbacks */
|
|
51
52
|
async render(force){
|
|
52
53
|
if(await super.render(force)){
|
|
53
|
-
onEvent(this.shadowRoot, '
|
|
54
|
+
onEvent(this.shadowRoot, 'fileselected', this[fileSelectedHandler]);
|
|
54
55
|
onEvent(this.shadowRoot.getElementById('loadDirectory'), 'click', this[loadDirectoryClickHandler]);
|
|
56
|
+
onEvent(this.shadowRoot.getElementById('openToggle'), 'click', this[openToggleClickHandler]);
|
|
55
57
|
this.renderDirectory();
|
|
56
58
|
return true;
|
|
57
59
|
}
|
|
@@ -131,6 +133,15 @@ export default class DirectoryViewer extends LazyComponent {
|
|
|
131
133
|
}
|
|
132
134
|
}
|
|
133
135
|
}
|
|
136
|
+
open(){
|
|
137
|
+
this.opened = true;
|
|
138
|
+
}
|
|
139
|
+
close(){
|
|
140
|
+
if(!this.root) this.opened = false;
|
|
141
|
+
}
|
|
142
|
+
toggleOpen(){
|
|
143
|
+
if(!this.root) this.opened = !this.opened;
|
|
144
|
+
}
|
|
134
145
|
clearDirectoryHandle(){
|
|
135
146
|
this[handle] = false;
|
|
136
147
|
this.hasHandle = false;
|
|
@@ -172,11 +183,11 @@ export default class DirectoryViewer extends LazyComponent {
|
|
|
172
183
|
}
|
|
173
184
|
}
|
|
174
185
|
select(){
|
|
175
|
-
const $currentSelection = this.querySelector('k-directory[selected], k-file[selected]');
|
|
186
|
+
const $currentSelection = this.closest('k-directory-viewer[root]').querySelector('k-directory-viewer[selected], k-directory-viewer-file[selected]');
|
|
176
187
|
if($currentSelection === this) return;
|
|
177
188
|
if($currentSelection) $currentSelection.selected = false;
|
|
178
189
|
this.selected = true;
|
|
179
|
-
this.dispatchEvent(new CustomEvent('
|
|
190
|
+
this.dispatchEvent(new CustomEvent('dirselected', {
|
|
180
191
|
detail: {
|
|
181
192
|
dirHandle: this[handle],
|
|
182
193
|
dirComponent: this
|
|
@@ -258,83 +269,6 @@ export default class DirectoryViewer extends LazyComponent {
|
|
|
258
269
|
}
|
|
259
270
|
window.customElements.define('k-directory-viewer', DirectoryViewer);
|
|
260
271
|
|
|
261
|
-
export class Directory extends Component {
|
|
262
|
-
constructor(_handle = false){
|
|
263
|
-
super();
|
|
264
|
-
|
|
265
|
-
/* Private Members */
|
|
266
|
-
this[handle] = _handle;
|
|
267
|
-
|
|
268
|
-
/* Private Methods */
|
|
269
|
-
this[selectDirectoryClickHandler] = () => this.select();
|
|
270
|
-
|
|
271
|
-
/* Init */
|
|
272
|
-
this.slot = 'content';
|
|
273
|
-
this.registerAttribute('selected', false);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/* Lifecycle Callbacks */
|
|
277
|
-
async render(force){
|
|
278
|
-
if(await super.render(force)){
|
|
279
|
-
if(this[handle]){
|
|
280
|
-
this.innerHTML = this[handle].name;
|
|
281
|
-
onEvent(this.shadowRoot.getElementById('selectDirectory'), 'click', this[selectDirectoryClickHandler]);
|
|
282
|
-
}
|
|
283
|
-
return true;
|
|
284
|
-
}
|
|
285
|
-
return false;
|
|
286
|
-
}
|
|
287
|
-
disconnectedCallback(){
|
|
288
|
-
super.disconnectedCallback();
|
|
289
|
-
offEvent(this.shadowRoot.getElementById('selectDirectory'), 'click', this[selectDirectoryClickHandler]);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/* Protected Members */
|
|
293
|
-
get rootDir(){
|
|
294
|
-
return this.closest('k-directory-viewer')
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/* Public Methods */
|
|
298
|
-
select(){
|
|
299
|
-
const $currentSelection = this.rootDir.querySelector('k-directory[selected], k-file[selected]');
|
|
300
|
-
if($currentSelection === this) return;
|
|
301
|
-
if($currentSelection) $currentSelection.selected = false;
|
|
302
|
-
this.selected = true;
|
|
303
|
-
this.dispatchEvent(new CustomEvent('directorySelected', {
|
|
304
|
-
detail: {
|
|
305
|
-
fileHandle: this[handle],
|
|
306
|
-
fileComponent: this
|
|
307
|
-
},
|
|
308
|
-
bubbles: true,
|
|
309
|
-
composed: true
|
|
310
|
-
}));
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/* Shadow DOM */
|
|
314
|
-
get shadowTemplate(){
|
|
315
|
-
return /*html*/`
|
|
316
|
-
<button
|
|
317
|
-
id="selectDirectory"
|
|
318
|
-
>
|
|
319
|
-
<slot name="selectButton">
|
|
320
|
-
<k-icon id="extIcon" name="file"></k-icon> ${this[handle].name}
|
|
321
|
-
</slot>
|
|
322
|
-
</button>
|
|
323
|
-
${super.shadowTemplate}
|
|
324
|
-
`;
|
|
325
|
-
}
|
|
326
|
-
get shadowStyles(){
|
|
327
|
-
return /*css*/`
|
|
328
|
-
${super.shadowStyles}
|
|
329
|
-
:host([selected]) #selectFile {
|
|
330
|
-
background-color: var(--c_primary);
|
|
331
|
-
color: var(--tc_on_primary);
|
|
332
|
-
border-radius: var(--raidus);
|
|
333
|
-
}
|
|
334
|
-
`;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
272
|
const selectFileClickHandler = Symbol();
|
|
339
273
|
export class File extends Component {
|
|
340
274
|
constructor(_handle = false){
|
|
@@ -376,18 +310,13 @@ export class File extends Component {
|
|
|
376
310
|
offEvent(this.shadowRoot.getElementById('selectFile'), 'click', this[selectFileClickHandler]);
|
|
377
311
|
}
|
|
378
312
|
|
|
379
|
-
/* Protected Members */
|
|
380
|
-
get rootDir(){
|
|
381
|
-
return this.closest('k-directory-viewer')
|
|
382
|
-
}
|
|
383
|
-
|
|
384
313
|
/* Public Methods */
|
|
385
314
|
select(){
|
|
386
|
-
const $currentSelection = this.
|
|
315
|
+
const $currentSelection = this.closest('k-directory-viewer[root]').querySelector('k-directory-viewer[selected], k-directory-viewer-file[selected]');
|
|
387
316
|
if($currentSelection === this) return;
|
|
388
317
|
if($currentSelection) $currentSelection.selected = false;
|
|
389
318
|
this.selected = true;
|
|
390
|
-
this.dispatchEvent(new CustomEvent('
|
|
319
|
+
this.dispatchEvent(new CustomEvent('fileselected', {
|
|
391
320
|
detail: {
|
|
392
321
|
fileHandle: this[handle],
|
|
393
322
|
fileComponent: this
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import LazyComponent from './LazyComponent.js';
|
|
2
|
+
import { onEvent } from '../utils/element.js';
|
|
2
3
|
|
|
3
4
|
export default class FocusCapture extends LazyComponent {
|
|
4
5
|
constructor(){
|
|
@@ -8,7 +9,7 @@ export default class FocusCapture extends LazyComponent {
|
|
|
8
9
|
}
|
|
9
10
|
render(){
|
|
10
11
|
super.render();
|
|
11
|
-
this.shadowRoot.getElementById('after')
|
|
12
|
+
onEvent(this.shadowRoot.getElementById('after'), 'focus', () => {
|
|
12
13
|
this.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])').focus();
|
|
13
14
|
});
|
|
14
15
|
}
|
package/src/components/Search.js
CHANGED
|
@@ -4,7 +4,10 @@ import debounce from '../utils/debounce.js';
|
|
|
4
4
|
const inputHandler = Symbol('inputHandler'),
|
|
5
5
|
focusHandler = Symbol('focusHandler'),
|
|
6
6
|
blurHandler = Symbol('blurHandler');
|
|
7
|
+
|
|
7
8
|
export default class Search extends Component {
|
|
9
|
+
static searchDataUrl = '/search.json';
|
|
10
|
+
|
|
8
11
|
constructor(){
|
|
9
12
|
super();
|
|
10
13
|
|
|
@@ -25,7 +28,7 @@ export default class Search extends Component {
|
|
|
25
28
|
}
|
|
26
29
|
async render(force){
|
|
27
30
|
if(await super.render(force)){
|
|
28
|
-
this.pages = await (await fetch(
|
|
31
|
+
this.pages = await (await fetch(Search.searchDataUrl)).json();
|
|
29
32
|
const $input = this.shadowRoot.getElementById('input')
|
|
30
33
|
$input.addEventListener('input', this[inputHandler]);
|
|
31
34
|
$input.addEventListener('focus', this[focusHandler]);
|
package/src/components/Table.js
CHANGED
|
@@ -127,6 +127,7 @@ export default class Table extends Component {
|
|
|
127
127
|
const start = (this.currentPage - 1) * this.pageSize;
|
|
128
128
|
const end = start + this.pageSize;
|
|
129
129
|
const paginatedRecords = this.records.slice(start, end);
|
|
130
|
+
let fetchRecords = false;
|
|
130
131
|
paginatedRecords.forEach((record, index) => {
|
|
131
132
|
const $tr = document.createElement('tr');
|
|
132
133
|
if (this.enableSelection) {
|
|
@@ -149,12 +150,15 @@ export default class Table extends Component {
|
|
|
149
150
|
if(this.controls?.before?.length){
|
|
150
151
|
$tr.appendChild(this.renderRowControls(this.controls.before, record, start + index));
|
|
151
152
|
}
|
|
152
|
-
|
|
153
|
+
if(record === null){
|
|
153
154
|
const $td = document.createElement('td');
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
$td.colSpan = this.fields.length;
|
|
156
|
+
$td.innerHTML = '<i>Loading...</i>';
|
|
157
|
+
fetchRecords = true;
|
|
158
|
+
$tr.appendChild($td);
|
|
159
|
+
} else {
|
|
160
|
+
this.fields.forEach(({name, formatter, calculator}, index) => {
|
|
161
|
+
const $td = document.createElement('td');
|
|
158
162
|
let value;
|
|
159
163
|
if(calculator){
|
|
160
164
|
value = calculator(record, this);
|
|
@@ -173,14 +177,17 @@ export default class Table extends Component {
|
|
|
173
177
|
}
|
|
174
178
|
}
|
|
175
179
|
$td.innerHTML = value;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
180
|
+
$tr.appendChild($td);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
179
183
|
if(this.controls?.after?.length){
|
|
180
184
|
$tr.appendChild(this.renderRowControls(this.controls.after, record, start + index));
|
|
181
185
|
}
|
|
182
186
|
$records.appendChild($tr);
|
|
183
187
|
});
|
|
188
|
+
if(fetchRecords){
|
|
189
|
+
dispatchEvent(this, 'fetchRecords', { start, end });
|
|
190
|
+
}
|
|
184
191
|
}
|
|
185
192
|
|
|
186
193
|
renderRowControls(controls = [], record, index) {
|
|
@@ -2,17 +2,20 @@ import Component from './Component.js'
|
|
|
2
2
|
import formatTimestamp from '../utils/formatTimestamp.js';
|
|
3
3
|
|
|
4
4
|
export default class Timestamp extends Component {
|
|
5
|
-
constructor(timestamp){
|
|
5
|
+
constructor(timestamp = 0, format = '', locale = ''){
|
|
6
6
|
super();
|
|
7
|
-
this.
|
|
8
|
-
|
|
7
|
+
this.registerAttributes({
|
|
8
|
+
timestamp,
|
|
9
|
+
locale,
|
|
10
|
+
format
|
|
11
|
+
});
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
/* Lifecycle Callbacks */
|
|
12
15
|
attributeChangedCallback(n, oV, nV){
|
|
13
16
|
if(n == 'timestamp'){
|
|
14
17
|
if(nV){
|
|
15
|
-
this.innerHTML = formatTimestamp(nV,
|
|
18
|
+
this.innerHTML = formatTimestamp(nV, this.format, this.locale || navigator.language);
|
|
16
19
|
} else {
|
|
17
20
|
this.innerHTML = '';
|
|
18
21
|
}
|
package/src/components/Toggle.js
CHANGED
|
@@ -45,15 +45,18 @@ export default class Toggle extends Component {
|
|
|
45
45
|
on(){
|
|
46
46
|
this.value = true;
|
|
47
47
|
dispatchEvent(this, 'on', { value: true });
|
|
48
|
+
return this;
|
|
48
49
|
}
|
|
49
50
|
off(){
|
|
50
51
|
this.value = false;
|
|
51
52
|
dispatchEvent(this, 'on', { value: false });
|
|
53
|
+
return this;
|
|
52
54
|
}
|
|
53
55
|
toggle(){
|
|
54
56
|
if(this.value) this.off();
|
|
55
57
|
else this.on();
|
|
56
58
|
dispatchEvent(this, 'toggle', { value: this.value });
|
|
59
|
+
return this;
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
get shadowTemplate(){
|
|
@@ -1,11 +1,27 @@
|
|
|
1
|
-
export default (timestamp, forceLocale) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
export default (timestamp, format, forceLocale) => {
|
|
2
|
+
const date = new Date(parseInt(timestamp));
|
|
3
|
+
if (format) {
|
|
4
|
+
const pad = (num, size) => ('000' + num).slice(size * -1);
|
|
5
|
+
const tokens = {
|
|
6
|
+
YYYY: date.getFullYear(),
|
|
7
|
+
YY: String(date.getFullYear()).slice(-2),
|
|
8
|
+
MM: pad(date.getMonth() + 1, 2),
|
|
9
|
+
M: date.getMonth() + 1,
|
|
10
|
+
DD: pad(date.getDate(), 2),
|
|
11
|
+
D: date.getDate(),
|
|
12
|
+
hh: pad(date.getHours(), 2),
|
|
13
|
+
h: date.getHours(),
|
|
14
|
+
mm: pad(date.getMinutes(), 2),
|
|
15
|
+
m: date.getMinutes(),
|
|
16
|
+
ss: pad(date.getSeconds(), 2),
|
|
17
|
+
s: date.getSeconds(),
|
|
18
|
+
iiii: pad(date.getMilliseconds(), 3),
|
|
19
|
+
iii: pad(date.getMilliseconds(), 3),
|
|
20
|
+
ii: pad(date.getMilliseconds(), 2),
|
|
21
|
+
i: date.getMilliseconds()
|
|
22
|
+
};
|
|
23
|
+
return format.replace(/YYYY|YY|MM|M|DD|D|hh|h|mm|m|ss|s|iiii|iii|ii|i/g, (matched) => tokens[matched]);
|
|
24
|
+
} else {
|
|
25
|
+
return date.toLocaleString(forceLocale || navigator.language);
|
|
26
|
+
}
|
|
11
27
|
}
|
package/docs/table.html
DELETED
|
File without changes
|
package/src/components/Stacks.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import Component from './Component.js';
|
|
2
|
-
|
|
3
|
-
export default class Stacks extends Component {
|
|
4
|
-
|
|
5
|
-
/* Public Members */
|
|
6
|
-
get panels(){
|
|
7
|
-
return [...this.querySelectorAll('k-stack-panel')];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/* Public Methods */
|
|
11
|
-
reorderPanels(){
|
|
12
|
-
const panels = this.panels;
|
|
13
|
-
panels.reverse().forEach((panel, index) => panel.style.setProperty('--order', index));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* Shadow DOM */
|
|
17
|
-
get shadowStyles(){
|
|
18
|
-
return /*css*/`
|
|
19
|
-
:host {
|
|
20
|
-
--stack_width: 16rem;
|
|
21
|
-
display: block;
|
|
22
|
-
height: 100%;
|
|
23
|
-
position: relative;
|
|
24
|
-
}
|
|
25
|
-
`;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
window.customElements.define('k-stacks', Stacks);
|
|
29
|
-
|
|
30
|
-
export class StackPanel extends Component {
|
|
31
|
-
constructor(){
|
|
32
|
-
super();
|
|
33
|
-
|
|
34
|
-
this.registerAttribute('stack', 0);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/* Lifecycle Callbacks */
|
|
38
|
-
connectedCallback(){
|
|
39
|
-
super.connectedCallback();
|
|
40
|
-
const stacks = this.stacks;
|
|
41
|
-
if(stacks) stacks.reorderPanels();
|
|
42
|
-
}
|
|
43
|
-
attributeChangedCallback(n, oV, nV){
|
|
44
|
-
super.attributeChangedCallback(n, oV, nV);
|
|
45
|
-
if(n ==='stack' && oV !== nV){
|
|
46
|
-
this.style.setProperty('--stack', nV);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/* Protected Members */
|
|
51
|
-
get stacks(){
|
|
52
|
-
return this.closest('k-stacks');
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/* Shadow DOM */
|
|
57
|
-
get shadowStyles(){
|
|
58
|
-
return /*css*/`
|
|
59
|
-
:host {
|
|
60
|
-
--stack: 0;
|
|
61
|
-
display: block;
|
|
62
|
-
height: 100%;
|
|
63
|
-
width: var(--stack_width);
|
|
64
|
-
position: absolute;
|
|
65
|
-
top: 0;
|
|
66
|
-
left: calc(var(--stack) * var(--stack_width));
|
|
67
|
-
transition: left var(--animation_ms) ease-in-out;
|
|
68
|
-
z-index: var(--order);
|
|
69
|
-
}
|
|
70
|
-
`;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* Static Members */
|
|
74
|
-
static observedAttributes = [
|
|
75
|
-
...super.observedAttributes,
|
|
76
|
-
'stack'
|
|
77
|
-
];
|
|
78
|
-
}
|
|
79
|
-
window.customElements.define('k-stack-panel', StackPanel);
|
package/src/utils/files.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export const getDir = async () => {
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
let id,
|
|
5
|
-
interval = 1000;
|
|
6
|
-
const watchers = new Map();
|
|
7
|
-
const poll = () => {
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
export const watchDir = async (dirHandle, callback, interval = 1000) => {
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
export const unwatchDir = async (dirHandle, callback) => {
|
|
14
|
-
|
|
15
|
-
}
|