@e280/shiny 0.1.0-1 → 0.1.0-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -3
- package/package.json +3 -3
- package/s/demo/demo.bundle.ts +7 -7
- package/s/demo/demo.css +3 -1
- package/s/demo/views/demonstration/view.ts +4 -4
- package/s/index.html.ts +1 -1
- package/s/index.ts +4 -2
- package/s/install.bundle.ts +9 -0
- package/s/shiny.ts +15 -0
- package/s/ui/copy/component.ts +5 -5
- package/s/ui/example/component.ts +5 -5
- package/s/ui/framework.ts +4 -1
- package/s/ui/{components.ts → raw-components.ts} +1 -1
- package/x/demo/demo.bundle.js +7 -7
- package/x/demo/demo.bundle.js.map +1 -1
- package/x/demo/demo.bundle.min.js +31 -31
- package/x/demo/demo.bundle.min.js.map +4 -4
- package/x/demo/demo.css +3 -1
- package/x/demo/views/demonstration/view.d.ts +2 -2
- package/x/demo/views/demonstration/view.js +2 -2
- package/x/demo/views/demonstration/view.js.map +1 -1
- package/x/index.d.ts +2 -2
- package/x/index.html +6 -4
- package/x/index.html.js +1 -1
- package/x/index.js +2 -2
- package/x/index.js.map +1 -1
- package/x/install.bundle.d.ts +1 -0
- package/x/install.bundle.js +5 -0
- package/x/install.bundle.js.map +1 -0
- package/x/install.bundle.min.js +135 -0
- package/x/install.bundle.min.js.map +7 -0
- package/x/shiny.d.ts +14 -0
- package/x/shiny.js +8 -0
- package/x/shiny.js.map +1 -0
- package/x/ui/copy/component.d.ts +3 -3
- package/x/ui/copy/component.js +3 -3
- package/x/ui/copy/component.js.map +1 -1
- package/x/ui/example/component.d.ts +3 -3
- package/x/ui/example/component.js +3 -3
- package/x/ui/example/component.js.map +1 -1
- package/x/ui/framework.d.ts +5 -1
- package/x/ui/framework.js +1 -1
- package/x/ui/framework.js.map +1 -1
- package/x/ui/{components.d.ts → raw-components.d.ts} +1 -1
- package/x/ui/{components.js → raw-components.js} +2 -2
- package/x/ui/raw-components.js.map +1 -0
- package/s/tools/untab.ts +0 -30
- package/s/ui/themers.ts +0 -28
- 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.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/shiny.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ShinyContext } from "./ui/framework.js";
|
|
2
|
+
export declare function shiny(context: ShinyContext): {
|
|
3
|
+
components: {
|
|
4
|
+
ShinyCopy: import("@e280/sly").ComponentClass<typeof import("./index.js").ShinyCopy, [text: string | undefined, ms?: any]>;
|
|
5
|
+
ShinyExample: import("@e280/sly").ComponentClass<typeof import("./index.js").ShinyExample, [start: number]>;
|
|
6
|
+
};
|
|
7
|
+
views: {
|
|
8
|
+
ShinyCopy: import("@e280/sly").View<[text: string | undefined, ms?: any]>;
|
|
9
|
+
ShinyExample: import("@e280/sly").View<[start: number]>;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type Shiny = ReturnType<typeof shiny>;
|
|
13
|
+
export type ShinyViews = Shiny["views"];
|
|
14
|
+
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 "./ui/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,wBAAwB,CAAA;AAEpD,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"}
|
package/x/ui/copy/component.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShinyContext } from "../framework.js";
|
|
2
2
|
declare const ShinyCopy_base: import("@e280/sly").ComponentClass<{
|
|
3
3
|
new (): {
|
|
4
4
|
attrs: import("@e280/sly").AttrTypes<{
|
|
5
5
|
text: StringConstructor;
|
|
6
6
|
ms: NumberConstructor;
|
|
7
7
|
}>;
|
|
8
|
-
|
|
8
|
+
context: ShinyContext;
|
|
9
9
|
#private: any;
|
|
10
10
|
readonly shadow: ShadowRoot;
|
|
11
11
|
createShadow(): ShadowRoot;
|
|
@@ -366,7 +366,7 @@ declare const ShinyCopy_base: import("@e280/sly").ComponentClass<{
|
|
|
366
366
|
focus(options?: FocusOptions): void;
|
|
367
367
|
};
|
|
368
368
|
styles: import("lit").CSSResultGroup | undefined;
|
|
369
|
-
}, [
|
|
369
|
+
}, [context: ShinyContext, text: string | undefined, ms?: any]>;
|
|
370
370
|
export declare class ShinyCopy extends ShinyCopy_base {
|
|
371
371
|
}
|
|
372
372
|
export {};
|
package/x/ui/copy/component.js
CHANGED
|
@@ -6,9 +6,9 @@ import { ShinyElement } from "../framework.js";
|
|
|
6
6
|
import clipboardSvg from "../../icons/tabler/clipboard.svg.js";
|
|
7
7
|
import clipboardXFilledSvg from "../../icons/tabler/clipboard-x-filled.svg.js";
|
|
8
8
|
import clipboardCheckFilledSvg from "../../icons/tabler/clipboard-check-filled.svg.js";
|
|
9
|
-
export class ShinyCopy extends (view(use => (
|
|
9
|
+
export class ShinyCopy extends (view(use => (context, text, ms = 1000) => {
|
|
10
10
|
use.name("shiny-copy");
|
|
11
|
-
use.styles(theme, styleCss);
|
|
11
|
+
use.styles(context.theme, styleCss);
|
|
12
12
|
const baseStatus = () => (text === undefined
|
|
13
13
|
? "invalid"
|
|
14
14
|
: "neutral");
|
|
@@ -51,6 +51,6 @@ export class ShinyCopy extends (view(use => (theme, text, ms = 1000) => {
|
|
|
51
51
|
ms: Number,
|
|
52
52
|
});
|
|
53
53
|
})
|
|
54
|
-
.props(el => [el.
|
|
54
|
+
.props(el => [el.context, el.attrs.text, el.attrs.ms])) {
|
|
55
55
|
}
|
|
56
56
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../s/ui/copy/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAA;AAClC,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AAEnC,OAAO,
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../s/ui/copy/component.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShinyContext } from "../framework.js";
|
|
2
2
|
declare const ShinyExample_base: import("@e280/sly").ComponentClass<{
|
|
3
3
|
new (): {
|
|
4
4
|
attrs: import("@e280/sly").AttrTypes<{
|
|
5
5
|
start: NumberConstructor;
|
|
6
6
|
}>;
|
|
7
|
-
|
|
7
|
+
context: ShinyContext;
|
|
8
8
|
#private: any;
|
|
9
9
|
readonly shadow: ShadowRoot;
|
|
10
10
|
createShadow(): ShadowRoot;
|
|
@@ -365,7 +365,7 @@ declare const ShinyExample_base: import("@e280/sly").ComponentClass<{
|
|
|
365
365
|
focus(options?: FocusOptions): void;
|
|
366
366
|
};
|
|
367
367
|
styles: import("lit").CSSResultGroup | undefined;
|
|
368
|
-
}, [
|
|
368
|
+
}, [context: ShinyContext, start: number]>;
|
|
369
369
|
export declare class ShinyExample extends ShinyExample_base {
|
|
370
370
|
}
|
|
371
371
|
export {};
|
|
@@ -2,8 +2,8 @@ import { dom, view } from "@e280/sly";
|
|
|
2
2
|
import { html } from "lit";
|
|
3
3
|
import styleCss from "./style.css.js";
|
|
4
4
|
import { ShinyElement } from "../framework.js";
|
|
5
|
-
export class ShinyExample extends (view(use => (
|
|
6
|
-
use.styles(theme, styleCss);
|
|
5
|
+
export class ShinyExample extends (view(use => (context, start) => {
|
|
6
|
+
use.styles(context.theme, styleCss);
|
|
7
7
|
const $count = use.signal(start);
|
|
8
8
|
const increment = () => { $count.value++; };
|
|
9
9
|
return html `
|
|
@@ -15,6 +15,6 @@ export class ShinyExample extends (view(use => (theme, start) => {
|
|
|
15
15
|
.component(class extends ShinyElement {
|
|
16
16
|
attrs = dom.attrs(this).spec({ start: Number });
|
|
17
17
|
})
|
|
18
|
-
.props(el => [el.
|
|
18
|
+
.props(el => [el.context, el.attrs.start ?? 1])) {
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,EAAC,IAAI,EAAC,MAAM,KAAK,CAAA;AACxB,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAe,YAAY,EAAC,MAAM,iBAAiB,CAAA;AAE1D,MAAM,OAAO,YAAa,SAAQ,CACjC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAqB,EAAE,KAAa,EAAE,EAAE;IACpD,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IAEnC,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,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAU,CAAC,CACxD;CAAG"}
|
package/x/ui/framework.d.ts
CHANGED
package/x/ui/framework.js
CHANGED
package/x/ui/framework.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework.js","sourceRoot":"","sources":["../../s/ui/framework.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"framework.js","sourceRoot":"","sources":["../../s/ui/framework.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AACrC,OAAO,EAAC,KAAK,EAAC,MAAM,wBAAwB,CAAA;AAI5C,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC5C,OAAO,GAAiB,EAAC,KAAK,EAAE,KAAK,EAAC,CAAA;CACtC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ShinyCopy } from "./copy/component.js";
|
|
2
2
|
import { ShinyExample } from "./example/component.js";
|
|
3
|
-
export const
|
|
3
|
+
export const rawComponents = {
|
|
4
4
|
ShinyCopy,
|
|
5
5
|
ShinyExample,
|
|
6
6
|
};
|
|
7
|
-
//# sourceMappingURL=components.js.map
|
|
7
|
+
//# sourceMappingURL=raw-components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raw-components.js","sourceRoot":"","sources":["../../s/ui/raw-components.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAA;AAEnD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B,SAAS;IACT,YAAY;CACZ,CAAA"}
|
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/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/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.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"}
|
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"}
|