godown 1.1.5 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +9 -9
- package/conf.d.ts +17 -18
- package/conf.d.ts.map +1 -1
- package/conf.js +24 -22
- package/deps.d.ts +7 -7
- package/deps.d.ts.map +1 -1
- package/deps.js +7 -7
- package/effect/index.d.ts +3 -3
- package/effect/index.js +3 -3
- package/effect/ov-effect.d.ts +23 -23
- package/effect/ov-effect.js +85 -85
- package/effect/ro-effect.d.ts +19 -19
- package/effect/ro-effect.js +76 -76
- package/effect/std.d.ts +3 -3
- package/effect/std.js +3 -3
- package/effect/tw-effect.d.ts +21 -21
- package/effect/tw-effect.js +90 -90
- package/glob.d.ts +11 -8
- package/glob.d.ts.map +1 -1
- package/glob.js +20 -9
- package/group/avatar-group.d.ts +20 -20
- package/group/avatar-group.js +88 -88
- package/group/button-group.d.ts +12 -12
- package/group/button-group.js +26 -26
- package/group/details-group.d.ts +16 -16
- package/group/details-group.js +51 -51
- package/group/index.d.ts +3 -3
- package/group/index.js +3 -3
- package/group/std.d.ts +3 -3
- package/group/std.js +3 -3
- package/index.d.ts +7 -7
- package/index.js +7 -7
- package/input-form/base-input.d.ts +33 -32
- package/input-form/base-input.d.ts.map +1 -1
- package/input-form/base-input.js +129 -129
- package/input-form/exp-input.d.ts +23 -22
- package/input-form/exp-input.d.ts.map +1 -1
- package/input-form/exp-input.js +67 -67
- package/input-form/index.d.ts +8 -8
- package/input-form/index.js +8 -8
- package/input-form/label-input.d.ts +22 -21
- package/input-form/label-input.d.ts.map +1 -1
- package/input-form/label-input.js +69 -69
- package/input-form/search-input.d.ts +37 -36
- package/input-form/search-input.d.ts.map +1 -1
- package/input-form/search-input.js +163 -163
- package/input-form/select-input.d.ts +35 -31
- package/input-form/select-input.d.ts.map +1 -1
- package/input-form/select-input.js +290 -259
- package/input-form/sign-form.d.ts +26 -25
- package/input-form/sign-form.d.ts.map +1 -1
- package/input-form/sign-form.js +147 -147
- package/input-form/split-input.d.ts +27 -26
- package/input-form/split-input.d.ts.map +1 -1
- package/input-form/split-input.js +127 -127
- package/input-form/std.d.ts +20 -19
- package/input-form/std.d.ts.map +1 -1
- package/input-form/std.js +56 -55
- package/input-form/switch-input.d.ts +23 -22
- package/input-form/switch-input.d.ts.map +1 -1
- package/input-form/switch-input.js +73 -73
- package/items/alert-item.d.ts +16 -16
- package/items/alert-item.js +69 -69
- package/items/avatar-anchor.d.ts +19 -19
- package/items/avatar-anchor.js +71 -71
- package/items/base-button.d.ts +16 -16
- package/items/base-button.js +117 -117
- package/items/dialog-item.d.ts +24 -24
- package/items/dialog-item.js +92 -92
- package/items/index.d.ts +7 -7
- package/items/index.js +7 -7
- package/items/link-a.d.ts +19 -19
- package/items/link-a.js +76 -76
- package/items/load-track.d.ts +21 -20
- package/items/load-track.d.ts.map +1 -1
- package/items/load-track.js +76 -76
- package/items/std.d.ts +3 -3
- package/items/std.js +3 -3
- package/items/super-a.d.ts +15 -15
- package/items/super-a.js +46 -46
- package/layout/div-line.d.ts +15 -15
- package/layout/div-line.js +39 -39
- package/layout/drag-box.d.ts +25 -25
- package/layout/drag-box.js +88 -88
- package/layout/flex-flow.d.ts +13 -13
- package/layout/flex-flow.js +32 -32
- package/layout/index.d.ts +5 -5
- package/layout/index.js +5 -5
- package/layout/nav-aside.d.ts +14 -13
- package/layout/nav-aside.d.ts.map +1 -1
- package/layout/nav-aside.js +38 -38
- package/layout/nav-layout.d.ts +17 -16
- package/layout/nav-layout.d.ts.map +1 -1
- package/layout/nav-layout.js +51 -51
- package/layout/std.d.ts +4 -4
- package/layout/std.js +4 -4
- package/package.json +17 -13
- package/react/effect.d.ts +9 -9
- package/react/effect.d.ts.map +1 -1
- package/react/effect.js +33 -33
- package/react/group.d.ts +4 -4
- package/react/group.d.ts.map +1 -1
- package/react/group.js +19 -19
- package/react/index.d.ts +7 -7
- package/react/index.d.ts.map +1 -1
- package/react/index.js +7 -7
- package/react/input-form.d.ts +32 -32
- package/react/input-form.d.ts.map +1 -1
- package/react/input-form.js +65 -65
- package/react/items.d.ts +8 -8
- package/react/items.d.ts.map +1 -1
- package/react/items.js +39 -39
- package/react/layout.d.ts +6 -6
- package/react/layout.d.ts.map +1 -1
- package/react/layout.js +29 -29
- package/react/view.d.ts +6 -6
- package/react/view.d.ts.map +1 -1
- package/react/view.js +29 -29
- package/view/details-expand.d.ts +19 -18
- package/view/details-expand.d.ts.map +1 -1
- package/view/details-expand.js +53 -53
- package/view/down-drop.d.ts +19 -18
- package/view/down-drop.d.ts.map +1 -1
- package/view/down-drop.js +71 -71
- package/view/index.d.ts +5 -5
- package/view/index.js +5 -5
- package/view/menu-list.d.ts +17 -16
- package/view/menu-list.d.ts.map +1 -1
- package/view/menu-list.js +48 -48
- package/view/route-view.d.ts +46 -57
- package/view/route-view.d.ts.map +1 -1
- package/view/route-view.js +256 -257
- package/view/scroll-x.d.ts +14 -14
- package/view/scroll-x.js +47 -47
- package/view/std.d.ts +4 -4
- package/view/std.js +4 -4
- package/with.d.ts +23 -27
- package/with.d.ts.map +1 -1
- package/with.js +70 -77
- package/items/no-support.d.ts +0 -7
- package/items/no-support.d.ts.map +0 -1
- package/items/no-support.js +0 -23
package/view/scroll-x.js
CHANGED
@@ -1,48 +1,48 @@
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
import { css, define, html } from "../deps.js";
|
8
|
-
import STD from "./std.js";
|
9
|
-
let ScrollX = class ScrollX extends STD {
|
10
|
-
get _section() {
|
11
|
-
return this.shadowRoot.querySelector("section");
|
12
|
-
}
|
13
|
-
render() {
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
+
};
|
7
|
+
import { css, define, html } from "../deps.js";
|
8
|
+
import STD from "./std.js";
|
9
|
+
let ScrollX = class ScrollX extends STD {
|
10
|
+
get _section() {
|
11
|
+
return this.shadowRoot.querySelector("section");
|
12
|
+
}
|
13
|
+
render() {
|
14
14
|
return html `<section>
|
15
15
|
<main>
|
16
16
|
<span><slot></slot></span>
|
17
17
|
</main>
|
18
|
-
</section>`;
|
19
|
-
}
|
20
|
-
firstUpdated() {
|
21
|
-
this._section.addEventListener("scroll", (e) => {
|
22
|
-
this.dispatchEvent(new CustomEvent("scroll", { detail: e.target.scrollTop }));
|
23
|
-
});
|
24
|
-
this.resize();
|
25
|
-
window.addEventListener("resize", () => {
|
26
|
-
this.resize();
|
27
|
-
});
|
28
|
-
}
|
29
|
-
resize() {
|
30
|
-
const child = this.firstElementChild;
|
31
|
-
if (!child)
|
32
|
-
return;
|
33
|
-
const ClientHeight = child.clientHeight || 0;
|
34
|
-
if (ClientHeight) {
|
35
|
-
this._section.style.width = ClientHeight + "px";
|
36
|
-
this._section.style.height = getComputedStyle(this).width;
|
37
|
-
}
|
38
|
-
else {
|
39
|
-
const ComputedHeight = getComputedStyle(child).height;
|
40
|
-
this.style.height = ComputedHeight;
|
41
|
-
this._section.style.width = ComputedHeight;
|
42
|
-
this._section.style.height = getComputedStyle(this).width;
|
43
|
-
}
|
44
|
-
}
|
45
|
-
};
|
18
|
+
</section>`;
|
19
|
+
}
|
20
|
+
firstUpdated() {
|
21
|
+
this._section.addEventListener("scroll", (e) => {
|
22
|
+
this.dispatchEvent(new CustomEvent("scroll", { detail: e.target.scrollTop }));
|
23
|
+
});
|
24
|
+
this.resize();
|
25
|
+
window.addEventListener("resize", () => {
|
26
|
+
this.resize();
|
27
|
+
});
|
28
|
+
}
|
29
|
+
resize() {
|
30
|
+
const child = this.firstElementChild;
|
31
|
+
if (!child)
|
32
|
+
return;
|
33
|
+
const ClientHeight = child.clientHeight || 0;
|
34
|
+
if (ClientHeight) {
|
35
|
+
this._section.style.width = ClientHeight + "px";
|
36
|
+
this._section.style.height = getComputedStyle(this).width;
|
37
|
+
}
|
38
|
+
else {
|
39
|
+
const ComputedHeight = getComputedStyle(child).height;
|
40
|
+
this.style.height = ComputedHeight;
|
41
|
+
this._section.style.width = ComputedHeight;
|
42
|
+
this._section.style.height = getComputedStyle(this).width;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
};
|
46
46
|
ScrollX.styles = css `
|
47
47
|
:host {
|
48
48
|
display: block;
|
@@ -69,9 +69,9 @@ ScrollX.styles = css `
|
|
69
69
|
transform-origin: 0 0;
|
70
70
|
transform: rotate(90deg);
|
71
71
|
}
|
72
|
-
`;
|
73
|
-
ScrollX = __decorate([
|
74
|
-
define("scroll-x")
|
75
|
-
], ScrollX);
|
76
|
-
export { ScrollX };
|
77
|
-
export default ScrollX;
|
72
|
+
`;
|
73
|
+
ScrollX = __decorate([
|
74
|
+
define("scroll-x")
|
75
|
+
], ScrollX);
|
76
|
+
export { ScrollX };
|
77
|
+
export default ScrollX;
|
package/view/std.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { GLOBSTD } from "../deps.js";
|
2
|
-
export default class ViewSTD extends GLOBSTD {
|
3
|
-
}
|
4
|
-
export declare const DLsharecss: import("lit").CSSResult;
|
1
|
+
import { GLOBSTD } from "../deps.js";
|
2
|
+
export default class ViewSTD extends GLOBSTD {
|
3
|
+
}
|
4
|
+
export declare const DLsharecss: import("lit").CSSResult;
|
5
5
|
//# sourceMappingURL=std.d.ts.map
|
package/view/std.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { GLOBSTD, css } from "../deps.js";
|
2
|
-
export default class ViewSTD extends GLOBSTD {
|
3
|
-
}
|
1
|
+
import { GLOBSTD, css } from "../deps.js";
|
2
|
+
export default class ViewSTD extends GLOBSTD {
|
3
|
+
}
|
4
4
|
export const DLsharecss = css `
|
5
5
|
:host {
|
6
6
|
display: block;
|
@@ -34,4 +34,4 @@ export const DLsharecss = css `
|
|
34
34
|
dd[open] {
|
35
35
|
grid-template-rows: 1fr;
|
36
36
|
}
|
37
|
-
`;
|
37
|
+
`;
|
package/with.d.ts
CHANGED
@@ -1,28 +1,24 @@
|
|
1
|
-
export declare const define: (name: string, options?: ElementDefinitionOptions) => (constructor: CustomElementConstructor) => void;
|
2
|
-
/**
|
3
|
-
* Create element
|
4
|
-
* @param target Appended target element or
|
5
|
-
* @param args tag:tag name, props:attribute, children:appended chindren
|
6
|
-
*/
|
7
|
-
export declare
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
/**
|
14
|
-
*
|
15
|
-
* @param
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
* Create element with args append to target
|
25
|
-
* @param map Map of key:selector, value:args
|
26
|
-
*/
|
27
|
-
export declare const retag: (map: any) => void;
|
1
|
+
export declare const define: (name: string, options?: ElementDefinitionOptions) => (constructor: CustomElementConstructor) => void;
|
2
|
+
/**
|
3
|
+
* Create element from args append to target
|
4
|
+
* @param target Appended target element, target or document.querySelector(target) or document.body
|
5
|
+
* @param args tag: tag name, props: attribute, children: appended chindren
|
6
|
+
*/
|
7
|
+
export declare function append(target: string | HTMLElement, args: string | EleArgs | HTMLElement): void;
|
8
|
+
/**
|
9
|
+
* Create element from args
|
10
|
+
* @param args tag: tag name, props: attribute, children: appended chindren
|
11
|
+
*/
|
12
|
+
export declare function create(args: string | EleArgs | HTMLElement): HTMLElement;
|
13
|
+
/**
|
14
|
+
* Replace elements
|
15
|
+
* @param matched: Element array to be replaced
|
16
|
+
* @param args: New element arguments will call create
|
17
|
+
*/
|
18
|
+
export declare function retag(matched: HTMLElement[], args: string | EleArgs | HTMLElement): void;
|
19
|
+
export type EleArgs = {
|
20
|
+
tag: string;
|
21
|
+
props?: Record<string, any>;
|
22
|
+
children?: Array<string | HTMLElement | EleArgs>;
|
23
|
+
};
|
28
24
|
//# sourceMappingURL=with.d.ts.map
|
package/with.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"with.d.ts","sourceRoot":"","sources":["../src/with.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM,SAAU,MAAM,YAAY,wBAAwB,mBAAmB,wBAAwB,SAOjH,CAAC;
|
1
|
+
{"version":3,"file":"with.d.ts","sourceRoot":"","sources":["../src/with.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM,SAAU,MAAM,YAAY,wBAAwB,mBAAmB,wBAAwB,SAOjH,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,WAA2B,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,QAKxG;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,CAuBxE;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,QAajF;AAED,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC,CAAC;CAClD,CAAC"}
|
package/with.js
CHANGED
@@ -1,77 +1,70 @@
|
|
1
|
-
import { conf } from "./conf.js";
|
2
|
-
export const define = (name, options) => (constructor) => {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
*
|
13
|
-
* @param
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
target
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
const { props, children
|
30
|
-
const
|
31
|
-
if (props) {
|
32
|
-
Object.keys(props).forEach((prop) => {
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
}
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
}
|
48
|
-
}
|
49
|
-
return
|
50
|
-
}
|
51
|
-
/**
|
52
|
-
*
|
53
|
-
* @param
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
for (
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
const
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
props,
|
72
|
-
children,
|
73
|
-
});
|
74
|
-
element.parentNode.replaceChild(newElement, element);
|
75
|
-
}
|
76
|
-
}
|
77
|
-
};
|
1
|
+
import { conf } from "./conf.js";
|
2
|
+
export const define = (name, options) => (constructor) => {
|
3
|
+
const tagname = conf.tag(name);
|
4
|
+
if (customElements.get(tagname) === undefined) {
|
5
|
+
customElements.define(tagname, constructor, options);
|
6
|
+
conf.enabled.push(name);
|
7
|
+
conf.namemap.set(name, tagname);
|
8
|
+
}
|
9
|
+
};
|
10
|
+
/**
|
11
|
+
* Create element from args append to target
|
12
|
+
* @param target Appended target element, target or document.querySelector(target) or document.body
|
13
|
+
* @param args tag: tag name, props: attribute, children: appended chindren
|
14
|
+
*/
|
15
|
+
export function append(target = document.body, args) {
|
16
|
+
if (!(target instanceof HTMLElement)) {
|
17
|
+
target = (document.querySelector(target) || document.body);
|
18
|
+
}
|
19
|
+
target.appendChild(create(args));
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* Create element from args
|
23
|
+
* @param args tag: tag name, props: attribute, children: appended chindren
|
24
|
+
*/
|
25
|
+
export function create(args) {
|
26
|
+
if (args instanceof HTMLElement) {
|
27
|
+
return args;
|
28
|
+
}
|
29
|
+
const { tag, props, children } = (typeof args === "string" ? { tag: args } : args);
|
30
|
+
const newElement = document.createElement(tag);
|
31
|
+
if (props) {
|
32
|
+
Object.keys(props).forEach((prop) => {
|
33
|
+
newElement.setAttribute(prop, props[prop] === true ? "" : props[prop]);
|
34
|
+
});
|
35
|
+
}
|
36
|
+
if (children && Array.isArray(children)) {
|
37
|
+
children.forEach((child) => {
|
38
|
+
if (typeof child === "string") {
|
39
|
+
newElement.appendChild(document.createTextNode(child));
|
40
|
+
}
|
41
|
+
else if (child instanceof HTMLElement) {
|
42
|
+
newElement.appendChild(child);
|
43
|
+
}
|
44
|
+
else {
|
45
|
+
newElement.appendChild(create(child));
|
46
|
+
}
|
47
|
+
});
|
48
|
+
}
|
49
|
+
return newElement;
|
50
|
+
}
|
51
|
+
/**
|
52
|
+
* Replace elements
|
53
|
+
* @param matched: Element array to be replaced
|
54
|
+
* @param args: New element arguments will call create
|
55
|
+
*/
|
56
|
+
export function retag(matched, args) {
|
57
|
+
var _a;
|
58
|
+
for (let i = matched.length - 1; i >= 0; i--) {
|
59
|
+
const element = matched[i];
|
60
|
+
const newElement = create(args);
|
61
|
+
for (let i = 0; i < element.attributes.length; i++) {
|
62
|
+
const attribute = element.attributes[i];
|
63
|
+
if (!newElement.hasAttribute(attribute.name)) {
|
64
|
+
newElement.setAttribute(attribute.name, attribute.value);
|
65
|
+
}
|
66
|
+
}
|
67
|
+
newElement.innerHTML = element.innerHTML;
|
68
|
+
(_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.replaceChild(newElement, element);
|
69
|
+
}
|
70
|
+
}
|
package/items/no-support.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"no-support.d.ts","sourceRoot":"","sources":["../../items/no-support.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,qBACa,SAAU,SAAQ,GAAG;IAChC,MAAM,CAAC,KAAK,0BAIV;IACF,MAAM;CAGP;AACD,eAAe,SAAS,CAAC"}
|
package/items/no-support.js
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
import { css, define, } from "../deps.js";
|
8
|
-
import STD from "./std.js";
|
9
|
-
let NoSupport = class NoSupport extends STD {
|
10
|
-
render() {
|
11
|
-
return;
|
12
|
-
}
|
13
|
-
};
|
14
|
-
NoSupport.style = css `
|
15
|
-
:host{
|
16
|
-
display:none;
|
17
|
-
}
|
18
|
-
`;
|
19
|
-
NoSupport = __decorate([
|
20
|
-
define("no-support")
|
21
|
-
], NoSupport);
|
22
|
-
export { NoSupport };
|
23
|
-
export default NoSupport;
|