@e280/shiny 0.1.0-1 → 0.1.0-11
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/README.md +113 -3
- package/package.json +3 -3
- package/s/components/button/component.ts +30 -0
- package/s/components/button/style.css.ts +64 -0
- package/s/{ui → components}/copy/component.ts +11 -6
- package/s/{ui → components}/copy/style.css.ts +6 -6
- package/s/components/drawer/component.ts +92 -0
- package/s/components/drawer/control.ts +31 -0
- package/s/components/drawer/style.css.ts +120 -0
- package/s/{ui → components}/example/component.ts +7 -5
- package/s/{ui → components}/example/style.css.ts +2 -2
- package/s/components/foundation.css.ts +15 -0
- package/s/components/framework.ts +10 -0
- package/s/components/raw-components.ts +15 -0
- package/s/components/tabs/component.ts +70 -0
- package/s/components/tabs/control.ts +31 -0
- package/s/components/tabs/style.css.ts +43 -0
- package/s/demo/aura-views.ts +6 -0
- package/s/demo/demo.bundle.ts +287 -14
- package/s/demo/demo.css +3 -1
- package/s/demo/utils/lipsum.ts +19 -0
- package/s/demo/views/demonstration/style.css.ts +18 -2
- package/s/demo/views/demonstration/view.ts +24 -16
- package/s/icons/tabler/menu-2.svg.ts +4 -0
- package/s/icons/tabler/x.svg.ts +4 -0
- package/s/index.html.ts +2 -2
- package/s/index.ts +16 -4
- package/s/install/aura.bundle.ts +9 -0
- package/s/install/plain.bundle.ts +9 -0
- package/s/shiny.ts +15 -0
- package/s/themes/aura.css.ts +86 -0
- package/s/themes/index.barrel.ts +2 -1
- package/s/themes/index.ts +1 -0
- package/s/themes/infra/css-vars.ts +41 -0
- package/s/themes/plain.css.ts +11 -0
- package/s/utils/states.ts +15 -0
- package/x/components/button/component.d.ts +5 -0
- package/x/components/button/component.js +25 -0
- package/x/components/button/component.js.map +1 -0
- package/x/components/button/style.css.js +63 -0
- package/x/components/button/style.css.js.map +1 -0
- package/x/{ui → components}/copy/component.d.ts +8 -4
- package/x/{ui → components}/copy/component.js +10 -5
- package/x/components/copy/component.js.map +1 -0
- package/x/{ui → components}/copy/style.css.js +6 -6
- package/x/components/copy/style.css.js.map +1 -0
- package/x/components/drawer/component.d.ts +387 -0
- package/x/components/drawer/component.js +76 -0
- package/x/components/drawer/component.js.map +1 -0
- package/x/components/drawer/control.d.ts +9 -0
- package/x/components/drawer/control.js +24 -0
- package/x/components/drawer/control.js.map +1 -0
- package/x/components/drawer/style.css.d.ts +2 -0
- package/x/components/drawer/style.css.js +119 -0
- package/x/components/drawer/style.css.js.map +1 -0
- package/x/{ui → components}/example/component.d.ts +3 -3
- package/x/{ui → components}/example/component.js +6 -4
- package/x/components/example/component.js.map +1 -0
- package/x/components/example/style.css.d.ts +2 -0
- package/x/components/example/style.css.js +10 -0
- package/x/components/example/style.css.js.map +1 -0
- package/x/components/foundation.css.d.ts +1 -0
- package/x/components/foundation.css.js +14 -0
- package/x/components/foundation.css.js.map +1 -0
- package/x/components/framework.d.ts +8 -0
- package/x/components/framework.js +5 -0
- package/x/components/framework.js.map +1 -0
- package/x/components/raw-components.d.ts +12 -0
- package/x/components/raw-components.js +13 -0
- package/x/components/raw-components.js.map +1 -0
- package/x/components/tabs/component.d.ts +374 -0
- package/x/components/tabs/component.js +60 -0
- package/x/components/tabs/component.js.map +1 -0
- package/x/components/tabs/control.d.ts +9 -0
- package/x/components/tabs/control.js +24 -0
- package/x/components/tabs/control.js.map +1 -0
- package/x/components/tabs/style.css.d.ts +2 -0
- package/x/components/tabs/style.css.js +42 -0
- package/x/components/tabs/style.css.js.map +1 -0
- package/x/demo/aura-views.d.ts +15 -0
- package/x/demo/aura-views.js +4 -0
- package/x/demo/aura-views.js.map +1 -0
- package/x/demo/demo.bundle.js +280 -14
- package/x/demo/demo.bundle.js.map +1 -1
- package/x/demo/demo.bundle.min.js +561 -45
- package/x/demo/demo.bundle.min.js.map +4 -4
- package/x/demo/demo.css +3 -1
- package/x/demo/utils/lipsum.d.ts +2 -0
- package/x/demo/utils/lipsum.js +11 -0
- package/x/demo/utils/lipsum.js.map +1 -0
- package/x/demo/views/demonstration/style.css.js +18 -2
- package/x/demo/views/demonstration/style.css.js.map +1 -1
- package/x/demo/views/demonstration/view.d.ts +6 -4
- package/x/demo/views/demonstration/view.js +20 -12
- package/x/demo/views/demonstration/view.js.map +1 -1
- package/x/icons/tabler/menu-2.svg.d.ts +2 -0
- package/x/icons/tabler/menu-2.svg.js +3 -0
- package/x/icons/tabler/menu-2.svg.js.map +1 -0
- package/x/icons/tabler/x.svg.d.ts +2 -0
- package/x/icons/tabler/x.svg.js +3 -0
- package/x/icons/tabler/x.svg.js.map +1 -0
- package/x/index.d.ts +10 -4
- package/x/index.html +7 -5
- package/x/index.html.js +2 -2
- package/x/index.js +10 -4
- package/x/index.js.map +1 -1
- package/x/install/aura.bundle.d.ts +1 -0
- package/x/install/aura.bundle.js +5 -0
- package/x/install/aura.bundle.js.map +1 -0
- package/x/install/aura.bundle.min.js +463 -0
- package/x/install/aura.bundle.min.js.map +7 -0
- package/x/install/plain.bundle.d.ts +1 -0
- package/x/install/plain.bundle.js +5 -0
- package/x/install/plain.bundle.js.map +1 -0
- package/x/install/plain.bundle.min.js +390 -0
- package/x/install/plain.bundle.min.js.map +7 -0
- package/x/shiny.d.ts +47 -0
- package/x/shiny.js +8 -0
- package/x/shiny.js.map +1 -0
- package/x/themes/aura.css.d.ts +1 -0
- package/x/themes/aura.css.js +85 -0
- package/x/themes/aura.css.js.map +1 -0
- package/x/themes/index.barrel.d.ts +2 -1
- package/x/themes/index.barrel.js +2 -1
- package/x/themes/index.barrel.js.map +1 -1
- package/x/themes/index.d.ts +1 -0
- package/x/themes/infra/css-vars.d.ts +14 -0
- package/x/themes/infra/css-vars.js +21 -0
- package/x/themes/infra/css-vars.js.map +1 -0
- package/x/themes/plain.css.d.ts +1 -0
- package/x/themes/plain.css.js +10 -0
- package/x/themes/plain.css.js.map +1 -0
- package/x/utils/states.d.ts +5 -0
- package/x/utils/states.js +13 -0
- package/x/utils/states.js.map +1 -0
- package/s/themes/basic.css.ts +0 -18
- package/s/tools/untab.ts +0 -30
- package/s/ui/components.ts +0 -9
- package/s/ui/framework.ts +0 -8
- package/s/ui/themers.ts +0 -28
- package/x/themes/basic.css.d.ts +0 -1
- package/x/themes/basic.css.js +0 -17
- package/x/themes/basic.css.js.map +0 -1
- package/x/tools/untab.d.ts +0 -1
- package/x/tools/untab.js +0 -26
- package/x/tools/untab.js.map +0 -1
- package/x/ui/components.d.ts +0 -6
- package/x/ui/components.js +0 -7
- package/x/ui/components.js.map +0 -1
- package/x/ui/copy/component.js.map +0 -1
- package/x/ui/copy/style.css.js.map +0 -1
- package/x/ui/example/component.js.map +0 -1
- package/x/ui/example/style.css.js +0 -10
- package/x/ui/example/style.css.js.map +0 -1
- package/x/ui/framework.d.ts +0 -4
- package/x/ui/framework.js +0 -6
- package/x/ui/framework.js.map +0 -1
- package/x/ui/themers.d.ts +0 -8
- package/x/ui/themers.js +0 -12
- package/x/ui/themers.js.map +0 -1
- /package/x/{ui/copy → components/button}/style.css.d.ts +0 -0
- /package/x/{ui/example → components/copy}/style.css.d.ts +0 -0
package/x/shiny.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ShinyContext } from "./components/framework.js";
|
|
2
|
+
export declare function shiny(context: ShinyContext): {
|
|
3
|
+
components: {
|
|
4
|
+
ShinyButton: {
|
|
5
|
+
new (): import("./components/button/component.js").ShinyButton;
|
|
6
|
+
view: import("@e280/sly").View<[]>;
|
|
7
|
+
} & typeof import("./components/button/component.js").ShinyButton;
|
|
8
|
+
ShinyCopy: {
|
|
9
|
+
new (): import("./index.js").ShinyCopy;
|
|
10
|
+
view: import("@e280/sly").View<[text: string | undefined, ms?: any]>;
|
|
11
|
+
} & typeof import("./index.js").ShinyCopy;
|
|
12
|
+
ShinyDrawer: {
|
|
13
|
+
new (): import("./index.js").ShinyDrawer;
|
|
14
|
+
view: import("@e280/sly").View<[options: {
|
|
15
|
+
button: boolean;
|
|
16
|
+
side?: "left" | "right";
|
|
17
|
+
control?: import("./index.js").DrawerControl;
|
|
18
|
+
}]>;
|
|
19
|
+
} & typeof import("./index.js").ShinyDrawer;
|
|
20
|
+
ShinyExample: {
|
|
21
|
+
new (): import("./index.js").ShinyExample;
|
|
22
|
+
view: import("@e280/sly").View<[start: number]>;
|
|
23
|
+
} & typeof import("./index.js").ShinyExample;
|
|
24
|
+
ShinyTabs: {
|
|
25
|
+
new (): import("./index.js").ShinyTabs;
|
|
26
|
+
view: import("@e280/sly").View<[controlOption?: import("./index.js").TabControl | undefined]>;
|
|
27
|
+
} & typeof import("./index.js").ShinyTabs;
|
|
28
|
+
};
|
|
29
|
+
views: {
|
|
30
|
+
ShinyButton: import("@e280/sly").View<[]> & import("@e280/sly").View<[context: ShinyContext]>;
|
|
31
|
+
ShinyCopy: import("@e280/sly").View<[text: string | undefined, ms?: any]> & import("@e280/sly").View<[context: ShinyContext, text: string | undefined, ms?: any]>;
|
|
32
|
+
ShinyDrawer: import("@e280/sly").View<[options: {
|
|
33
|
+
button: boolean;
|
|
34
|
+
side?: "left" | "right";
|
|
35
|
+
control?: import("./index.js").DrawerControl;
|
|
36
|
+
}]> & import("@e280/sly").View<[context: ShinyContext, options: {
|
|
37
|
+
button: boolean;
|
|
38
|
+
side?: "left" | "right";
|
|
39
|
+
control?: import("./index.js").DrawerControl;
|
|
40
|
+
}]>;
|
|
41
|
+
ShinyExample: import("@e280/sly").View<[start: number]> & import("@e280/sly").View<[context: ShinyContext, start: number]>;
|
|
42
|
+
ShinyTabs: import("@e280/sly").View<[controlOption?: import("./index.js").TabControl | undefined]> & import("@e280/sly").View<[context: ShinyContext, controlOption?: import("./index.js").TabControl | undefined]>;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export type Shiny = ReturnType<typeof shiny>;
|
|
46
|
+
export type ShinyViews = Shiny["views"];
|
|
47
|
+
export type ShinyComponents = Shiny["components"];
|
package/x/shiny.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { contextualizeComponents, getViews } from "@e280/sly";
|
|
2
|
+
import { rawComponents } from "./components/raw-components.js";
|
|
3
|
+
export function shiny(context) {
|
|
4
|
+
const components = contextualizeComponents(context, rawComponents);
|
|
5
|
+
const views = getViews(components);
|
|
6
|
+
return { components, views };
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=shiny.js.map
|
package/x/shiny.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shiny.js","sourceRoot":"","sources":["../s/shiny.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,uBAAuB,EAAE,QAAQ,EAAC,MAAM,WAAW,CAAA;AAE3D,OAAO,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAA;AAE5D,MAAM,UAAU,KAAK,CAAC,OAAqB;IAC1C,MAAM,UAAU,GAAG,uBAAuB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAA;IAClE,MAAM,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAA;IAClC,OAAO,EAAC,UAAU,EAAE,KAAK,EAAC,CAAA;AAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const aura: import("lit").CSSResult;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { defaultCssVars, renderCssVars } from "./infra/css-vars.js";
|
|
3
|
+
export const aura = css `@layer overlay {
|
|
4
|
+
|
|
5
|
+
:host {
|
|
6
|
+
${renderCssVars({
|
|
7
|
+
...defaultCssVars(),
|
|
8
|
+
})}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host([view="shiny-button"]:not([plain])) {
|
|
12
|
+
position: relative;
|
|
13
|
+
|
|
14
|
+
--buttoncolor: var(--calm);
|
|
15
|
+
--padding: 0.3em 0.7em;
|
|
16
|
+
|
|
17
|
+
color: white;
|
|
18
|
+
border-radius: 2em;
|
|
19
|
+
background: var(--buttoncolor);
|
|
20
|
+
border: none;
|
|
21
|
+
|
|
22
|
+
font-weight: medium;
|
|
23
|
+
text-shadow: 0.1em 0.1em 0.1em #0004;
|
|
24
|
+
box-shadow: 0.1em 0.2em 0.3em #0002;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host([view="shiny-button"][lame]) { --buttoncolor: var(--lame); }
|
|
28
|
+
:host([view="shiny-button"][angry]) { --buttoncolor: var(--angry); }
|
|
29
|
+
:host([view="shiny-button"][zesty]) { --buttoncolor: var(--zesty); }
|
|
30
|
+
:host([view="shiny-button"][happy]) { --buttoncolor: var(--happy); }
|
|
31
|
+
:host([view="shiny-button"][calm]) { --buttoncolor: var(--calm); }
|
|
32
|
+
:host([view="shiny-button"][sad]) { --buttoncolor: var(--sad); }
|
|
33
|
+
:host([view="shiny-button"][quirky]) { --buttoncolor: var(--quirky); }
|
|
34
|
+
|
|
35
|
+
:host([view="shiny-button"][gradient]:not([plain])) {
|
|
36
|
+
border: none;
|
|
37
|
+
background: linear-gradient(
|
|
38
|
+
to bottom right,
|
|
39
|
+
color-mix(in oklab, var(--buttoncolor), white 40%),
|
|
40
|
+
color-mix(in oklab, var(--buttoncolor), black 20%)
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
&::before {
|
|
44
|
+
content: "";
|
|
45
|
+
display: block;
|
|
46
|
+
position: absolute;
|
|
47
|
+
z-index: 0;
|
|
48
|
+
inset: 0.15em;
|
|
49
|
+
border-radius: inherit;
|
|
50
|
+
background: color-mix(in oklab, var(--buttoncolor), #0004 50%);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
> * {
|
|
54
|
+
position: relative;
|
|
55
|
+
z-index: 1;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([view="shiny-drawer"]) {
|
|
60
|
+
display: block;
|
|
61
|
+
|
|
62
|
+
&::part(tray) {
|
|
63
|
+
padding: 1em;
|
|
64
|
+
background: linear-gradient(
|
|
65
|
+
to top right,
|
|
66
|
+
#00a9dd69,
|
|
67
|
+
#70ffd77a
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:host([view="shiny-drawer"]:state(left)) {
|
|
73
|
+
&::part(tray) {
|
|
74
|
+
border-bottom-right-radius: 0.5em;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host([view="shiny-drawer"]:state(right)) {
|
|
79
|
+
&::part(tray) {
|
|
80
|
+
border-bottom-left-radius: 0.5em;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
}`;
|
|
85
|
+
//# sourceMappingURL=aura.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aura.css.js","sourceRoot":"","sources":["../../s/themes/aura.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,OAAO,EAAC,cAAc,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAA;AACjE,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAA;;;GAGpB,aAAa,CAAC;IACf,GAAG,cAAc,EAAE;CACnB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4ED,CAAA"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./plain.css.js";
|
|
2
|
+
export * from "./aura.css.js";
|
package/x/themes/index.barrel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.barrel.js","sourceRoot":"","sources":["../../s/themes/index.barrel.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.barrel.js","sourceRoot":"","sources":["../../s/themes/index.barrel.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA"}
|
package/x/themes/index.d.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type CssVars = {
|
|
2
|
+
"bg": string;
|
|
3
|
+
"alpha": string;
|
|
4
|
+
"lame": string;
|
|
5
|
+
"inactive-opacity": string;
|
|
6
|
+
"angry": string;
|
|
7
|
+
"zesty": string;
|
|
8
|
+
"happy": string;
|
|
9
|
+
"calm": string;
|
|
10
|
+
"sad": string;
|
|
11
|
+
"quirky": string;
|
|
12
|
+
};
|
|
13
|
+
export declare function defaultCssVars(): CssVars;
|
|
14
|
+
export declare function renderCssVars(vars: CssVars): import("lit").CSSResult;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { unsafeCSS } from "lit";
|
|
2
|
+
export function defaultCssVars() {
|
|
3
|
+
return {
|
|
4
|
+
"bg": "#111",
|
|
5
|
+
"alpha": "#def",
|
|
6
|
+
"inactive-opacity": "0.5",
|
|
7
|
+
"lame": "#8888",
|
|
8
|
+
"angry": "#f50",
|
|
9
|
+
"zesty": "#cf0",
|
|
10
|
+
"happy": "#0fa",
|
|
11
|
+
"calm": "#0af",
|
|
12
|
+
"sad": "#74f",
|
|
13
|
+
"quirky": "#f49",
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export function renderCssVars(vars) {
|
|
17
|
+
return unsafeCSS(Object.entries(vars)
|
|
18
|
+
.map(([key, value]) => `--${key}: var(--shiny-${key}, ${value});`)
|
|
19
|
+
.join("\n"));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=css-vars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css-vars.js","sourceRoot":"","sources":["../../../s/themes/infra/css-vars.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,KAAK,CAAA;AAiB7B,MAAM,UAAU,cAAc;IAC7B,OAAO;QACN,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;QACf,kBAAkB,EAAE,KAAK;QACzB,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,MAAM;KAChB,CAAA;AACF,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAa;IAC1C,OAAO,SAAS,CACf,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;SAClB,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,GAAG,iBAAiB,GAAG,KAAK,KAAK,IAAI,CAAC;SACjE,IAAI,CAAC,IAAI,CAAC,CACZ,CAAA;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const plain: import("lit").CSSResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plain.css.js","sourceRoot":"","sources":["../../s/themes/plain.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,OAAO,EAAC,cAAc,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAA;AACjE,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;GAGrB,aAAa,CAAC,cAAc,EAAE,CAAC;;;EAGhC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export class States {
|
|
2
|
+
#states;
|
|
3
|
+
constructor(element) {
|
|
4
|
+
this.#states = element.attachInternals().states;
|
|
5
|
+
}
|
|
6
|
+
assign(...states) {
|
|
7
|
+
this.#states.forEach(s => this.#states.delete(s));
|
|
8
|
+
for (const s of states)
|
|
9
|
+
this.#states.add(s);
|
|
10
|
+
return this;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=states.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"states.js","sourceRoot":"","sources":["../../s/utils/states.ts"],"names":[],"mappings":"AACA,MAAM,OAAO,MAAM;IAClB,OAAO,CAAa;IAEpB,YAAY,OAAoB;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,MAAa,CAAA;IACvD,CAAC;IAED,MAAM,CAAC,GAAG,MAAgB;QACzB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;QACjD,KAAK,MAAM,CAAC,IAAI,MAAM;YAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QAC3C,OAAO,IAAI,CAAA;IACZ,CAAC;CACD"}
|
package/s/themes/basic.css.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {css} from "lit"
|
|
3
|
-
import {cssReset} from "@e280/sly"
|
|
4
|
-
export const basic = css`
|
|
5
|
-
|
|
6
|
-
${cssReset}
|
|
7
|
-
|
|
8
|
-
:host {
|
|
9
|
-
display: block;
|
|
10
|
-
--bg: var(--shiny-bg, #111);
|
|
11
|
-
--alpha: var(--shiny-alpha, #afa);
|
|
12
|
-
--good: var(--shiny-good, #0f4);
|
|
13
|
-
--bad: var(--shiny-bad, #f40);
|
|
14
|
-
--invalid: var(--shiny-invalid, #8888);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
`
|
|
18
|
-
|
package/s/tools/untab.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export function untab(code: string) {
|
|
3
|
-
const lines = code.split(/\r|\n/)
|
|
4
|
-
let baseTabLevel: number | undefined
|
|
5
|
-
|
|
6
|
-
for (const line of lines) {
|
|
7
|
-
const isOnlyWhitespace = /^\s+$/.test(line)
|
|
8
|
-
if (!isOnlyWhitespace) {
|
|
9
|
-
const tabMatch = line.match(/^(\t+).+/)
|
|
10
|
-
if (tabMatch) {
|
|
11
|
-
const tabCount = tabMatch[1].length
|
|
12
|
-
baseTabLevel = baseTabLevel === undefined
|
|
13
|
-
? tabCount
|
|
14
|
-
: tabCount < baseTabLevel
|
|
15
|
-
? tabCount
|
|
16
|
-
: baseTabLevel
|
|
17
|
-
if (baseTabLevel === 0)
|
|
18
|
-
break
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const rebaseTabRegex = new RegExp(`^\\t{${baseTabLevel}}`)
|
|
24
|
-
|
|
25
|
-
return lines
|
|
26
|
-
.map(line => /^\s+$/.test(line) ? "" : line)
|
|
27
|
-
.map(line => line.replace(rebaseTabRegex, ""))
|
|
28
|
-
.join("\n")
|
|
29
|
-
}
|
|
30
|
-
|
package/s/ui/components.ts
DELETED
package/s/ui/framework.ts
DELETED
package/s/ui/themers.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {CSSResult} from "lit"
|
|
3
|
-
import {DropFirst, ob} from "@e280/stz"
|
|
4
|
-
import {ComponentClass, View, ViewProps} from "@e280/sly"
|
|
5
|
-
|
|
6
|
-
import {components} from "./components.js"
|
|
7
|
-
import {ShinyElement} from "./framework.js"
|
|
8
|
-
|
|
9
|
-
export function themeComponents(theme: CSSResult) {
|
|
10
|
-
return ob(components).map(C => class extends C {
|
|
11
|
-
theme = theme
|
|
12
|
-
static view = super.view.transmute((...props: any[]) => [theme, ...props] as any) as any
|
|
13
|
-
}) as {
|
|
14
|
-
[K in keyof typeof components]: ComponentClass<
|
|
15
|
-
typeof ShinyElement,
|
|
16
|
-
DropFirst<ViewProps<(typeof components)[K]["view"]>>
|
|
17
|
-
>
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function themeViews(theme: CSSResult) {
|
|
22
|
-
return ob(themeComponents(theme)).map(C => C.view) as {
|
|
23
|
-
[K in keyof typeof components]: View<DropFirst<ViewProps<(typeof components)[K]["view"]>>>
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type ShinyViews = ReturnType<typeof themeViews>
|
|
28
|
-
|
package/x/themes/basic.css.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const basic: import("lit").CSSResult;
|
package/x/themes/basic.css.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
import { cssReset } from "@e280/sly";
|
|
3
|
-
export const basic = css `
|
|
4
|
-
|
|
5
|
-
${cssReset}
|
|
6
|
-
|
|
7
|
-
:host {
|
|
8
|
-
display: block;
|
|
9
|
-
--bg: var(--shiny-bg, #111);
|
|
10
|
-
--alpha: var(--shiny-alpha, #afa);
|
|
11
|
-
--good: var(--shiny-good, #0f4);
|
|
12
|
-
--bad: var(--shiny-bad, #f40);
|
|
13
|
-
--invalid: var(--shiny-invalid, #8888);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
`;
|
|
17
|
-
//# sourceMappingURL=basic.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basic.css.js","sourceRoot":"","sources":["../../s/themes/basic.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,OAAO,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAA;AAClC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;EAEtB,QAAQ;;;;;;;;;;;CAWT,CAAA"}
|
package/x/tools/untab.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function untab(code: string): string;
|
package/x/tools/untab.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export function untab(code) {
|
|
2
|
-
const lines = code.split(/\r|\n/);
|
|
3
|
-
let baseTabLevel;
|
|
4
|
-
for (const line of lines) {
|
|
5
|
-
const isOnlyWhitespace = /^\s+$/.test(line);
|
|
6
|
-
if (!isOnlyWhitespace) {
|
|
7
|
-
const tabMatch = line.match(/^(\t+).+/);
|
|
8
|
-
if (tabMatch) {
|
|
9
|
-
const tabCount = tabMatch[1].length;
|
|
10
|
-
baseTabLevel = baseTabLevel === undefined
|
|
11
|
-
? tabCount
|
|
12
|
-
: tabCount < baseTabLevel
|
|
13
|
-
? tabCount
|
|
14
|
-
: baseTabLevel;
|
|
15
|
-
if (baseTabLevel === 0)
|
|
16
|
-
break;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
const rebaseTabRegex = new RegExp(`^\\t{${baseTabLevel}}`);
|
|
21
|
-
return lines
|
|
22
|
-
.map(line => /^\s+$/.test(line) ? "" : line)
|
|
23
|
-
.map(line => line.replace(rebaseTabRegex, ""))
|
|
24
|
-
.join("\n");
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=untab.js.map
|
package/x/tools/untab.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"untab.js","sourceRoot":"","sources":["../../s/tools/untab.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,KAAK,CAAC,IAAY;IACjC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACjC,IAAI,YAAgC,CAAA;IAEpC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC1B,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACvB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;YACvC,IAAI,QAAQ,EAAE,CAAC;gBACd,MAAM,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;gBACnC,YAAY,GAAG,YAAY,KAAK,SAAS;oBACxC,CAAC,CAAC,QAAQ;oBACV,CAAC,CAAC,QAAQ,GAAG,YAAY;wBACxB,CAAC,CAAC,QAAQ;wBACV,CAAC,CAAC,YAAY,CAAA;gBAChB,IAAI,YAAY,KAAK,CAAC;oBACrB,MAAK;YACP,CAAC;QACF,CAAC;IACF,CAAC;IAED,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC,QAAQ,YAAY,GAAG,CAAC,CAAA;IAE1D,OAAO,KAAK;SACV,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;SAC3C,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;SAC7C,IAAI,CAAC,IAAI,CAAC,CAAA;AACb,CAAC"}
|
package/x/ui/components.d.ts
DELETED
package/x/ui/components.js
DELETED
package/x/ui/components.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../s/ui/components.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAA;AAEnD,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,SAAS;IACT,YAAY;CACZ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../s/ui/copy/component.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../s/ui/copy/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CjB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../s/ui/example/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AACnC,OAAO,EAAY,IAAI,EAAC,MAAM,KAAK,CAAA;AACnC,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAA;AAE5C,MAAM,OAAO,YAAa,SAAQ,CACjC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAgB,EAAE,KAAa,EAAE,EAAE;IAC/C,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IAE3B,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAChC,MAAM,SAAS,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA,CAAC,CAAC,CAAA;IAE1C,OAAO,IAAI,CAAA;qBACQ,SAAS;MACxB,MAAM,EAAE;;GAEX,CAAA;AACF,CAAC,CAAC;KACD,SAAS,CAAC,KAAM,SAAQ,YAAY;IACpC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,MAAM,EAAC,CAAC,CAAA;CAC7C,CAAC;KACD,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAU,CAAC,CACtD;CAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../s/ui/example/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;;;;;;CAOjB,CAAA"}
|
package/x/ui/framework.d.ts
DELETED
package/x/ui/framework.js
DELETED
package/x/ui/framework.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"framework.js","sourceRoot":"","sources":["../../s/ui/framework.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AACrC,OAAO,EAAC,KAAK,EAAC,MAAM,wBAAwB,CAAA;AAE5C,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC5C,KAAK,GAAG,KAAK,CAAA;CACb"}
|
package/x/ui/themers.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CSSResult } from "lit";
|
|
2
|
-
import { DropFirst } from "@e280/stz";
|
|
3
|
-
import { ComponentClass, View, ViewProps } from "@e280/sly";
|
|
4
|
-
import { components } from "./components.js";
|
|
5
|
-
import { ShinyElement } from "./framework.js";
|
|
6
|
-
export declare function themeComponents(theme: CSSResult): { [K in keyof typeof components]: ComponentClass<typeof ShinyElement, DropFirst<ViewProps<(typeof components)[K]["view"]>>>; };
|
|
7
|
-
export declare function themeViews(theme: CSSResult): { [K in keyof typeof components]: View<DropFirst<ViewProps<(typeof components)[K]["view"]>>>; };
|
|
8
|
-
export type ShinyViews = ReturnType<typeof themeViews>;
|
package/x/ui/themers.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ob } from "@e280/stz";
|
|
2
|
-
import { components } from "./components.js";
|
|
3
|
-
export function themeComponents(theme) {
|
|
4
|
-
return ob(components).map(C => class extends C {
|
|
5
|
-
theme = theme;
|
|
6
|
-
static view = super.view.transmute((...props) => [theme, ...props]);
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
export function themeViews(theme) {
|
|
10
|
-
return ob(themeComponents(theme)).map(C => C.view);
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=themers.js.map
|
package/x/ui/themers.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themers.js","sourceRoot":"","sources":["../../s/ui/themers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,EAAE,EAAC,MAAM,WAAW,CAAA;AAGvC,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAA;AAG1C,MAAM,UAAU,eAAe,CAAC,KAAgB;IAC/C,OAAO,EAAE,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAM,SAAQ,CAAC;QAC7C,KAAK,GAAG,KAAK,CAAA;QACb,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,KAAY,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,CAAQ,CAAQ,CAAA;KACxF,CAKA,CAAA;AACF,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAgB;IAC1C,OAAO,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAEhD,CAAA;AACF,CAAC"}
|
|
File without changes
|
|
File without changes
|