@e280/shiny 0.1.0-15 → 0.1.0-17
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 +34 -80
- package/package.json +18 -25
- package/s/_archive/demo/utils/lipsum.ts +19 -0
- package/s/_archive/demo/views/showcase/style.css.ts +53 -0
- package/s/_archive/demo/views/showcase/view.ts +54 -0
- package/s/_archive/index.html.ts +34 -0
- package/s/_archive/index.ts +19 -0
- package/s/_archive/utils/states.ts +15 -0
- package/s/demo/main.bundle.ts +16 -0
- package/s/demo/main.css +71 -0
- package/s/demo/parts/exhibit.ts +15 -0
- package/s/demo/utils/lipsum.ts +1 -1
- package/s/demo/views/codebox/style.css.ts +43 -0
- package/s/demo/views/codebox/use-prism-styles.ts +13 -0
- package/s/demo/views/codebox/view.ts +39 -0
- package/s/demo/views/showcase/style.css.ts +42 -11
- package/s/demo/views/showcase/view.ts +41 -45
- package/s/demo/views/stylebox/view.ts +21 -0
- package/s/index.html.ts +42 -29
- package/s/index.ts +1 -17
- package/s/test.ts +5 -0
- package/s/theme/parts/core.ts +34 -0
- package/s/theme/parts/reset.ts +20 -0
- package/s/theme/parts/vars.ts +41 -0
- package/s/theme/theme-string.ts +15 -0
- package/s/theme/theme.css.ts +7 -0
- package/s/views/button/showcase.ts +43 -0
- package/s/views/button/style.css.ts +110 -0
- package/s/views/button/view.ts +30 -0
- package/s/views/copy/parts/copy-status.ts +3 -0
- package/s/views/copy/parts/determine-base-status.ts +7 -0
- package/s/views/copy/parts/use-copier.ts +20 -0
- package/s/views/copy/showcase.ts +54 -0
- package/s/views/copy/style.css.ts +46 -0
- package/s/views/copy/view.ts +58 -0
- package/s/views/drawer/control.ts +31 -0
- package/s/views/drawer/showcase.ts +83 -0
- package/s/views/drawer/style.css.ts +128 -0
- package/s/views/drawer/view.ts +76 -0
- package/s/views/tabs/control.ts +31 -0
- package/s/views/tabs/showcase.ts +89 -0
- package/s/views/tabs/style.css.ts +46 -0
- package/s/views/tabs/view.ts +66 -0
- package/x/demo/main.bundle.js +13 -0
- package/x/demo/main.bundle.js.map +1 -0
- package/x/demo/main.bundle.min.js +794 -0
- package/x/demo/main.bundle.min.js.map +7 -0
- package/x/demo/main.css +71 -0
- package/x/demo/parts/exhibit.d.ts +11 -0
- package/x/demo/parts/exhibit.js +2 -0
- package/x/demo/parts/exhibit.js.map +1 -0
- package/x/demo/utils/lipsum.d.ts +1 -1
- package/x/demo/utils/lipsum.js +1 -1
- package/x/demo/utils/lipsum.js.map +1 -1
- package/x/demo/views/codebox/style.css.js +42 -0
- package/x/demo/views/codebox/style.css.js.map +1 -0
- package/x/demo/views/codebox/use-prism-styles.d.ts +1 -0
- package/x/demo/views/codebox/use-prism-styles.js +12 -0
- package/x/demo/views/codebox/use-prism-styles.js.map +1 -0
- package/x/demo/views/codebox/view.d.ts +2 -0
- package/x/demo/views/codebox/view.js +29 -0
- package/x/demo/views/codebox/view.js.map +1 -0
- package/x/demo/views/showcase/style.css.js +42 -11
- package/x/demo/views/showcase/style.css.js.map +1 -1
- package/x/demo/views/showcase/view.d.ts +2 -7
- package/x/demo/views/showcase/view.js +39 -35
- package/x/demo/views/showcase/view.js.map +1 -1
- package/x/demo/views/stylebox/view.d.ts +3 -0
- package/x/demo/views/stylebox/view.js +13 -0
- package/x/demo/views/stylebox/view.js.map +1 -0
- package/x/index.d.ts +1 -11
- package/x/index.html +212 -62
- package/x/index.html.js +40 -26
- package/x/index.html.js.map +1 -1
- package/x/index.js +1 -11
- package/x/index.js.map +1 -1
- package/x/test.js +3 -0
- package/x/test.js.map +1 -0
- package/x/theme/parts/core.d.ts +1 -0
- package/x/theme/parts/core.js +33 -0
- package/x/theme/parts/core.js.map +1 -0
- package/x/theme/parts/reset.d.ts +1 -0
- package/x/theme/parts/reset.js +19 -0
- package/x/theme/parts/reset.js.map +1 -0
- package/x/theme/parts/vars.d.ts +1 -0
- package/x/theme/parts/vars.js +34 -0
- package/x/theme/parts/vars.js.map +1 -0
- package/x/theme/theme-string.d.ts +1 -0
- package/x/theme/theme-string.js +14 -0
- package/x/theme/theme-string.js.map +1 -0
- package/x/theme/theme.css.d.ts +1 -0
- package/x/theme/theme.css.js +4 -0
- package/x/theme/theme.css.js.map +1 -0
- package/x/views/button/showcase.d.ts +1 -0
- package/x/views/button/showcase.js +41 -0
- package/x/views/button/showcase.js.map +1 -0
- package/x/views/button/style.css.js +109 -0
- package/x/views/button/style.css.js.map +1 -0
- package/x/views/button/view.d.ts +4 -0
- package/x/views/button/view.js +22 -0
- package/x/views/button/view.js.map +1 -0
- package/x/views/copy/parts/copy-status.d.ts +1 -0
- package/x/views/copy/parts/copy-status.js +2 -0
- package/x/views/copy/parts/copy-status.js.map +1 -0
- package/x/views/copy/parts/determine-base-status.d.ts +1 -0
- package/x/views/copy/parts/determine-base-status.js +6 -0
- package/x/views/copy/parts/determine-base-status.js.map +1 -0
- package/x/views/copy/parts/use-copier.d.ts +6 -0
- package/x/views/copy/parts/use-copier.js +13 -0
- package/x/views/copy/parts/use-copier.js.map +1 -0
- package/x/views/copy/showcase.d.ts +1 -0
- package/x/views/copy/showcase.js +51 -0
- package/x/views/copy/showcase.js.map +1 -0
- package/x/views/copy/style.css.js.map +1 -0
- package/x/views/copy/view.d.ts +4 -0
- package/x/views/copy/view.js +47 -0
- package/x/views/copy/view.js.map +1 -0
- package/x/{components → views}/drawer/control.d.ts +1 -1
- package/x/views/drawer/control.js.map +1 -0
- package/x/views/drawer/showcase.d.ts +1 -0
- package/x/views/drawer/showcase.js +75 -0
- package/x/views/drawer/showcase.js.map +1 -0
- package/x/{components → views}/drawer/style.css.js +1 -0
- package/x/views/drawer/style.css.js.map +1 -0
- package/x/views/drawer/view.d.ts +6 -0
- package/x/views/drawer/view.js +60 -0
- package/x/views/drawer/view.js.map +1 -0
- package/x/{components → views}/tabs/control.d.ts +2 -2
- package/x/{components → views}/tabs/control.js +3 -3
- package/x/views/tabs/control.js.map +1 -0
- package/x/views/tabs/showcase.d.ts +1 -0
- package/x/views/tabs/showcase.js +86 -0
- package/x/views/tabs/showcase.js.map +1 -0
- package/x/{components → views}/tabs/style.css.js +5 -5
- package/x/views/tabs/style.css.js.map +1 -0
- package/x/views/tabs/view.d.ts +5 -0
- package/x/views/tabs/view.js +52 -0
- package/x/views/tabs/view.js.map +1 -0
- package/x/components/button/component.d.ts +0 -6
- package/x/components/button/component.js +0 -25
- package/x/components/button/component.js.map +0 -1
- package/x/components/button/showcase.d.ts +0 -1
- package/x/components/button/showcase.js +0 -116
- package/x/components/button/showcase.js.map +0 -1
- package/x/components/button/style.css.js +0 -62
- package/x/components/button/style.css.js.map +0 -1
- package/x/components/copy/component.d.ts +0 -376
- package/x/components/copy/component.js +0 -63
- package/x/components/copy/component.js.map +0 -1
- package/x/components/copy/showcase.d.ts +0 -1
- package/x/components/copy/showcase.js +0 -48
- package/x/components/copy/showcase.js.map +0 -1
- package/x/components/copy/style.css.js.map +0 -1
- package/x/components/drawer/component.d.ts +0 -387
- package/x/components/drawer/component.js +0 -73
- package/x/components/drawer/component.js.map +0 -1
- package/x/components/drawer/control.js.map +0 -1
- package/x/components/drawer/showcase.d.ts +0 -1
- package/x/components/drawer/showcase.js +0 -105
- package/x/components/drawer/showcase.js.map +0 -1
- package/x/components/drawer/style.css.js.map +0 -1
- package/x/components/example/component.d.ts +0 -371
- package/x/components/example/component.js +0 -22
- package/x/components/example/component.js.map +0 -1
- package/x/components/example/showcase.d.ts +0 -1
- package/x/components/example/showcase.js +0 -30
- package/x/components/example/showcase.js.map +0 -1
- package/x/components/example/style.css.js +0 -10
- package/x/components/example/style.css.js.map +0 -1
- package/x/components/foundation.css.d.ts +0 -1
- package/x/components/foundation.css.js +0 -14
- package/x/components/foundation.css.js.map +0 -1
- package/x/components/framework.d.ts +0 -8
- package/x/components/framework.js +0 -5
- package/x/components/framework.js.map +0 -1
- package/x/components/raw-components.d.ts +0 -12
- package/x/components/raw-components.js +0 -13
- package/x/components/raw-components.js.map +0 -1
- package/x/components/tabs/component.d.ts +0 -374
- package/x/components/tabs/component.js +0 -60
- package/x/components/tabs/component.js.map +0 -1
- package/x/components/tabs/control.js.map +0 -1
- package/x/components/tabs/showcase.d.ts +0 -1
- package/x/components/tabs/showcase.js +0 -167
- package/x/components/tabs/showcase.js.map +0 -1
- package/x/components/tabs/style.css.js.map +0 -1
- package/x/demo/demo.bundle.js +0 -42
- package/x/demo/demo.bundle.js.map +0 -1
- package/x/demo/demo.bundle.min.js +0 -893
- package/x/demo/demo.bundle.min.js.map +0 -7
- package/x/demo/lipsum.d.ts +0 -2
- package/x/demo/lipsum.js +0 -4
- package/x/demo/lipsum.js.map +0 -1
- package/x/demo/views/exhibit/style.css.d.ts +0 -2
- package/x/demo/views/exhibit/style.css.js +0 -84
- package/x/demo/views/exhibit/style.css.js.map +0 -1
- package/x/demo/views/exhibit/view.d.ts +0 -29
- package/x/demo/views/exhibit/view.js +0 -40
- package/x/demo/views/exhibit/view.js.map +0 -1
- package/x/demo/viewsets.d.ts +0 -17
- package/x/demo/viewsets.js +0 -9
- package/x/demo/viewsets.js.map +0 -1
- package/x/install/aura.bundle.js +0 -5
- package/x/install/aura.bundle.js.map +0 -1
- package/x/install/aura.bundle.min.js +0 -471
- package/x/install/aura.bundle.min.js.map +0 -7
- package/x/install/plain.bundle.d.ts +0 -1
- package/x/install/plain.bundle.js +0 -5
- package/x/install/plain.bundle.js.map +0 -1
- package/x/install/plain.bundle.min.js +0 -398
- package/x/install/plain.bundle.min.js.map +0 -7
- package/x/shiny.d.ts +0 -47
- package/x/shiny.js +0 -8
- package/x/shiny.js.map +0 -1
- package/x/tests.test.d.ts +0 -1
- package/x/tests.test.js +0 -3
- package/x/tests.test.js.map +0 -1
- package/x/themes/aura.css.d.ts +0 -1
- package/x/themes/aura.css.js +0 -85
- package/x/themes/aura.css.js.map +0 -1
- package/x/themes/index.barrel.d.ts +0 -2
- package/x/themes/index.barrel.js +0 -3
- package/x/themes/index.barrel.js.map +0 -1
- package/x/themes/index.d.ts +0 -2
- package/x/themes/index.js +0 -2
- package/x/themes/index.js.map +0 -1
- package/x/themes/infra/css-vars.d.ts +0 -15
- package/x/themes/infra/css-vars.js +0 -22
- package/x/themes/infra/css-vars.js.map +0 -1
- package/x/themes/plain.css.d.ts +0 -1
- package/x/themes/plain.css.js +0 -10
- package/x/themes/plain.css.js.map +0 -1
- /package/s/{components → _archive/components}/button/component.ts +0 -0
- /package/s/{components → _archive/components}/button/showcase.ts +0 -0
- /package/s/{components → _archive/components}/button/style.css.ts +0 -0
- /package/s/{components → _archive/components}/copy/component.ts +0 -0
- /package/s/{components → _archive/components}/copy/showcase.ts +0 -0
- /package/s/{components → _archive/components}/copy/style.css.ts +0 -0
- /package/s/{components → _archive/components}/drawer/component.ts +0 -0
- /package/s/{components → _archive/components}/drawer/control.ts +0 -0
- /package/s/{components → _archive/components}/drawer/showcase.ts +0 -0
- /package/s/{components → _archive/components}/drawer/style.css.ts +0 -0
- /package/s/{components → _archive/components}/example/component.ts +0 -0
- /package/s/{components → _archive/components}/example/showcase.ts +0 -0
- /package/s/{components → _archive/components}/example/style.css.ts +0 -0
- /package/s/{components → _archive/components}/foundation.css.ts +0 -0
- /package/s/{components → _archive/components}/framework.ts +0 -0
- /package/s/{components → _archive/components}/raw-components.ts +0 -0
- /package/s/{components → _archive/components}/tabs/component.ts +0 -0
- /package/s/{components → _archive/components}/tabs/control.ts +0 -0
- /package/s/{components → _archive/components}/tabs/showcase.ts +0 -0
- /package/s/{components → _archive/components}/tabs/style.css.ts +0 -0
- /package/s/{demo → _archive/demo}/demo.bundle.ts +0 -0
- /package/s/{demo → _archive/demo}/demo.css +0 -0
- /package/s/{demo → _archive/demo}/lipsum.ts +0 -0
- /package/s/{demo → _archive/demo}/views/exhibit/style.css.ts +0 -0
- /package/s/{demo → _archive/demo}/views/exhibit/view.ts +0 -0
- /package/s/{demo → _archive/demo}/viewsets.ts +0 -0
- /package/s/{install → _archive/install}/aura.bundle.ts +0 -0
- /package/s/{install → _archive/install}/plain.bundle.ts +0 -0
- /package/s/{shiny.ts → _archive/shiny.ts} +0 -0
- /package/s/{tests.test.ts → _archive/tests.test.ts} +0 -0
- /package/s/{themes → _archive/themes}/aura.css.ts +0 -0
- /package/s/{themes → _archive/themes}/index.barrel.ts +0 -0
- /package/s/{themes → _archive/themes}/index.ts +0 -0
- /package/s/{themes → _archive/themes}/infra/css-vars.ts +0 -0
- /package/s/{themes → _archive/themes}/plain.css.ts +0 -0
- /package/x/{demo → _archive/demo}/demo.css +0 -0
- /package/x/demo/{demo.bundle.d.ts → main.bundle.d.ts} +0 -0
- /package/x/{components/button → demo/views/codebox}/style.css.d.ts +0 -0
- /package/x/{install/aura.bundle.d.ts → test.d.ts} +0 -0
- /package/x/{components/copy → views/button}/style.css.d.ts +0 -0
- /package/x/{components/drawer → views/copy}/style.css.d.ts +0 -0
- /package/x/{components → views}/copy/style.css.js +0 -0
- /package/x/{components → views}/drawer/control.js +0 -0
- /package/x/{components/example → views/drawer}/style.css.d.ts +0 -0
- /package/x/{components → views}/tabs/style.css.d.ts +0 -0
package/x/demo/main.css
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
|
|
2
|
+
@layer view {
|
|
3
|
+
:root {
|
|
4
|
+
height: 100%;
|
|
5
|
+
font-size: 16px;
|
|
6
|
+
font-family: sans-serif;
|
|
7
|
+
|
|
8
|
+
color-scheme: dark;
|
|
9
|
+
scrollbar-gutter: stable;
|
|
10
|
+
|
|
11
|
+
color: var(--alpha);
|
|
12
|
+
background: var(--bg);
|
|
13
|
+
|
|
14
|
+
--tint: #070429aa;
|
|
15
|
+
background:
|
|
16
|
+
linear-gradient(0deg, var(--tint), var(--tint)),
|
|
17
|
+
#141519 url("/assets/bg.webp") center 80% / cover no-repeat;
|
|
18
|
+
|
|
19
|
+
background-attachment: fixed, fixed;
|
|
20
|
+
|
|
21
|
+
text-shadow: 0.1em 0.1em 0.2em #0008;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
body {
|
|
25
|
+
width: 100%;
|
|
26
|
+
min-height: 100%;
|
|
27
|
+
max-width: 60em;
|
|
28
|
+
margin: auto;
|
|
29
|
+
padding: 1em;
|
|
30
|
+
padding-bottom: 6em;
|
|
31
|
+
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
gap: 1em;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
h1 {
|
|
38
|
+
font-size: 1.5em;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
text-align: center;
|
|
42
|
+
|
|
43
|
+
strong {
|
|
44
|
+
font-size: 1.5em;
|
|
45
|
+
color: var(--prime);
|
|
46
|
+
color: color-mix(in oklab, white, var(--prime) 20%);
|
|
47
|
+
text-shadow: 0 0 0.8em color-mix(in oklab, white, var(--prime) 50%);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
small {
|
|
51
|
+
opacity: 0.6;
|
|
52
|
+
font-size: 0.7em;
|
|
53
|
+
font-weight: normal;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
body > section {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
margin-bottom: calc(var(--padding) * 2);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.gallery {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
gap: calc(var(--padding) * 2);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Content } from "@e280/sly";
|
|
2
|
+
import { CSSResult } from "lit";
|
|
3
|
+
export type Exhibit = {
|
|
4
|
+
name: string;
|
|
5
|
+
explain: Content;
|
|
6
|
+
render: () => Content;
|
|
7
|
+
js: string;
|
|
8
|
+
css?: CSSResult;
|
|
9
|
+
styleboxCss: CSSResult;
|
|
10
|
+
};
|
|
11
|
+
export declare const exhibit: (e: Exhibit) => Exhibit;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exhibit.js","sourceRoot":"","sources":["../../../s/demo/parts/exhibit.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAU,EAAE,EAAE,CAAC,CAAC,CAAA"}
|
package/x/demo/utils/lipsum.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Dispenser } from "@e280/stz";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const lipsum: Dispenser<string>;
|
package/x/demo/utils/lipsum.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispenser } from "@e280/stz";
|
|
2
|
-
export const
|
|
2
|
+
export const lipsum = new Dispenser(() => [
|
|
3
3
|
`lorem kettlebell dolor sit amet, mountain squats consectetur trail-running. adipiscing deadlift elit, sed do 45lb turkish get-up eiusmod tempor incididunt ut hike magna aliqua. ut enim ad minim clean & press, quis nostrud exercitation lunges ullamco kettlebell snatch trailhead nisi ut aliquip ex dolore summit irure dolor.`,
|
|
4
4
|
`lorem protein dolor sit amet, creatine scoop elit shaker bottle tempor. grilled steak magna keto-fasting culpa, carb-loading perspiciatis cheat day. whey isolate dolor sit macros elit, intermittent fasting tempor electrolyte magna; barefoot shoes culpa, liver perspiciatis ancestral squat rack gospel. lorem bulking dolor sit cut elit, tdee tracker tempor calorie deficit magna; chicken breast culpa gatorade perspiciatis meal prep.`,
|
|
5
5
|
`lorem caffeine dolor sit amet, double espresso elit cold brew tempor jitter. adderall magna focus culpa, lion’s mane perspiciatis nootropic. nicotine gum dolor sit vape elit, dopamine hit tempor buzz magna; lsd microdosing culpa, productivity perspiciatis agile sprint. lorem latte dolor sit drip elit, french press tempor aeropress magna; insomnia culpa, circadian rhythm perspiciatis blue light filter.`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lipsum.js","sourceRoot":"","sources":["../../../s/demo/utils/lipsum.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,WAAW,CAAA;AAEnC,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"lipsum.js","sourceRoot":"","sources":["../../../s/demo/utils/lipsum.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,WAAW,CAAA;AAEnC,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,GAAG,EAAE,CAAC;IACzC,qUAAqU;IAErU,kbAAkb;IAElb,sZAAsZ;IAEtZ,yNAAyN;IAEzN,6TAA6T;IAE7T,ycAAyc;IAEzc,8bAA8b;CAC9b,CAAC,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export default css `@layer view {
|
|
3
|
+
|
|
4
|
+
:host {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.box {
|
|
10
|
+
flex: 1 1 auto;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
background: #0003;
|
|
14
|
+
border-radius: var(--rounded);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
header {
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
padding: calc(var(--padding) / 4) var(--padding);
|
|
21
|
+
|
|
22
|
+
.title {
|
|
23
|
+
opacity: 0.4;
|
|
24
|
+
font-size: 1em;
|
|
25
|
+
font-weight: normal;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.buttons {
|
|
29
|
+
display: flex;
|
|
30
|
+
font-size: 1.2em;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
code {
|
|
35
|
+
padding: calc(var(--padding) / 4) var(--padding);
|
|
36
|
+
color: var(--code);
|
|
37
|
+
white-space: pre-wrap;
|
|
38
|
+
tab-size: 2;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
}`;
|
|
42
|
+
//# sourceMappingURL=style.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../../s/demo/views/codebox/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuChB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePrismStyles(): CSSStyleSheet;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useOnce } from "@e280/sly";
|
|
2
|
+
export function usePrismStyles() {
|
|
3
|
+
return useOnce(() => {
|
|
4
|
+
const tag = document.head.querySelector("[data-prism]");
|
|
5
|
+
if (!tag)
|
|
6
|
+
throw new Error("failed to find [data-prism] stylesheet");
|
|
7
|
+
const style = new CSSStyleSheet();
|
|
8
|
+
style.replaceSync(tag.textContent);
|
|
9
|
+
return style;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=use-prism-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-prism-styles.js","sourceRoot":"","sources":["../../../../s/demo/views/codebox/use-prism-styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAEjC,MAAM,UAAU,cAAc;IAC7B,OAAO,OAAO,CAAC,GAAG,EAAE;QACnB,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,CAAA;QACvD,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAA;QACnE,MAAM,KAAK,GAAG,IAAI,aAAa,EAAE,CAAA;QACjC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;QAClC,OAAO,KAAK,CAAA;IACb,CAAC,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import Prism from "prismjs";
|
|
2
|
+
import "prismjs/components/prism-js-templates";
|
|
3
|
+
import { html } from "lit";
|
|
4
|
+
import { untab } from "@e280/stz";
|
|
5
|
+
import { shadow, useCss } from "@e280/sly";
|
|
6
|
+
import styleCss from "./style.css.js";
|
|
7
|
+
import { usePrismStyles } from "./use-prism-styles.js";
|
|
8
|
+
import { themeCss } from "../../../theme/theme.css.js";
|
|
9
|
+
import { ShinyCopy } from "../../../views/copy/view.js";
|
|
10
|
+
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
11
|
+
export const Codebox = shadow((title, lang, code) => {
|
|
12
|
+
const prismStyles = usePrismStyles();
|
|
13
|
+
useCss(themeCss, prismStyles, styleCss);
|
|
14
|
+
code = untab(code).trim();
|
|
15
|
+
const higlighted = Prism.highlight(code, lang === "js"
|
|
16
|
+
? Prism.languages.javascript
|
|
17
|
+
: Prism.languages.css, lang);
|
|
18
|
+
return html `
|
|
19
|
+
<div class=box>
|
|
20
|
+
<header>
|
|
21
|
+
<h3 class=title>${title}</h3>
|
|
22
|
+
<div class=buttons>${ShinyCopy(code)}</div>
|
|
23
|
+
</header>
|
|
24
|
+
|
|
25
|
+
<code>${unsafeHTML(higlighted)}</code>
|
|
26
|
+
</div>
|
|
27
|
+
`;
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../s/demo/views/codebox/view.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,uCAAuC,CAAA;AAE9C,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAA;AAC/B,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,WAAW,CAAA;AAExC,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAA;AACpD,OAAO,EAAC,SAAS,EAAC,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAC,UAAU,EAAC,MAAM,+BAA+B,CAAA;AAExD,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,KAAa,EAAE,IAAkB,EAAE,IAAY,EAAE,EAAE;IACjF,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IACpC,MAAM,CAAC,QAAQ,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAA;IAEvC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;IACzB,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CACjC,IAAI,EACJ,IAAI,KAAK,IAAI;QACZ,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU;QAC5B,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,EACtB,IAAI,CACJ,CAAA;IAED,OAAO,IAAI,CAAA;;;sBAGU,KAAK;yBACF,SAAS,CAAC,IAAI,CAAC;;;WAG7B,UAAU,CAAC,UAAU,CAAC;;EAE/B,CAAA;AACF,CAAC,CAAC,CAAA"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
2
|
export default css `@layer view {
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
section.showcase {
|
|
5
5
|
position: relative;
|
|
6
6
|
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
|
|
10
10
|
padding: 1em;
|
|
11
|
-
border-radius:
|
|
12
|
-
gap:
|
|
11
|
+
border-radius: var(--rounded);
|
|
12
|
+
gap: var(--padding);
|
|
13
13
|
|
|
14
14
|
background: linear-gradient(to right top, #252dd985, #aa6affbd);
|
|
15
15
|
backdrop-filter: blur(0.5em);
|
|
@@ -18,29 +18,29 @@ export default css `@layer view {
|
|
|
18
18
|
border-top: 2px solid #fff4;
|
|
19
19
|
|
|
20
20
|
&::before {
|
|
21
|
+
z-index: 0;
|
|
21
22
|
content: "";
|
|
22
23
|
display: block;
|
|
23
24
|
position: absolute;
|
|
24
25
|
inset: 0;
|
|
25
|
-
border-radius:
|
|
26
|
-
background: #
|
|
27
|
-
width: calc(100% -
|
|
28
|
-
height: calc(100% -
|
|
26
|
+
border-radius: var(--rounded);
|
|
27
|
+
background: #0006;
|
|
28
|
+
width: calc(100% - var(--padding));
|
|
29
|
+
height: calc(100% - var(--padding));
|
|
29
30
|
margin: auto;
|
|
30
|
-
z-index: 0;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
> * {
|
|
34
|
-
position: relative;
|
|
35
34
|
z-index: 1;
|
|
35
|
+
position: relative;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
header {
|
|
40
40
|
display: flex;
|
|
41
41
|
flex-wrap: wrap;
|
|
42
|
-
place-content: center
|
|
43
|
-
gap:
|
|
42
|
+
place-content: center;
|
|
43
|
+
gap: var(--padding);
|
|
44
44
|
|
|
45
45
|
h2 {
|
|
46
46
|
flex: 1 1 auto;
|
|
@@ -48,5 +48,36 @@ header {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
.sides {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-wrap: wrap;
|
|
54
|
+
gap: var(--padding);
|
|
55
|
+
|
|
56
|
+
> * {
|
|
57
|
+
flex: 1 1 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.codezone {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
gap: var(--padding);
|
|
66
|
+
|
|
67
|
+
> * {
|
|
68
|
+
flex: 1 1 auto;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.stage {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
justify-content: start;
|
|
76
|
+
align-items: center;
|
|
77
|
+
padding: calc(var(--padding) * 2) var(--padding);
|
|
78
|
+
border: 1px dashed color-mix(in oklch, transparent, currentColor 50%);
|
|
79
|
+
border-radius: var(--rounded);
|
|
80
|
+
}
|
|
81
|
+
|
|
51
82
|
}`;
|
|
52
83
|
//# sourceMappingURL=style.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../../s/demo/views/showcase/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../../s/demo/views/showcase/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgFhB,CAAA"}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare const Showcase: import("@e280/sly").View<[options: {
|
|
4
|
-
name: string;
|
|
5
|
-
style: CSSResultGroup;
|
|
6
|
-
exhibits: ExhibitParams[];
|
|
7
|
-
}]>;
|
|
1
|
+
import { Exhibit } from "../../parts/exhibit.js";
|
|
2
|
+
export declare const Showcase: import("@e280/sly").ShadowView<[title: string, exhibits: Exhibit[]]>;
|
|
@@ -1,40 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
const exhibit =
|
|
1
|
+
import { css, html } from "lit";
|
|
2
|
+
import { shadow, useCss, useName, useOnce } from "@e280/sly";
|
|
3
|
+
import showcaseCss from "./style.css.js";
|
|
4
|
+
import { Codebox } from "../codebox/view.js";
|
|
5
|
+
import { Stylebox } from "../stylebox/view.js";
|
|
6
|
+
import { themeCss } from "../../../theme/theme.css.js";
|
|
7
|
+
import { ShinyTabs } from "../../../views/tabs/view.js";
|
|
8
|
+
import { ShinyButton } from "../../../views/button/view.js";
|
|
9
|
+
import { TabsControl } from "../../../views/tabs/control.js";
|
|
10
|
+
export const Showcase = shadow((title, exhibits) => {
|
|
11
|
+
useName("showcase");
|
|
12
|
+
useCss(themeCss, showcaseCss);
|
|
13
|
+
const control = useOnce(() => new TabsControl());
|
|
14
|
+
const exhibit = exhibits.at(control.index);
|
|
15
15
|
return html `
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.render()}
|
|
27
|
-
${auraViews.ShinyTabs
|
|
28
|
-
.props(themeTabControl)
|
|
29
|
-
.attr("snug")
|
|
30
|
-
.children(viewsets.map(([theme]) => auraViews.ShinyButton
|
|
31
|
-
.props()
|
|
32
|
-
.children(theme)
|
|
33
|
-
.render()))
|
|
34
|
-
.render()}
|
|
35
|
-
</header>
|
|
16
|
+
<section class=showcase>
|
|
17
|
+
<header>
|
|
18
|
+
<h2>✨${title}✨</h2>
|
|
19
|
+
<nav>
|
|
20
|
+
${ShinyTabs.with({
|
|
21
|
+
props: [{ control, snug: true }],
|
|
22
|
+
children: exhibits.map(exhibit => ShinyButton(exhibit.name)),
|
|
23
|
+
})}
|
|
24
|
+
</nav>
|
|
25
|
+
</header>
|
|
36
26
|
|
|
37
|
-
|
|
27
|
+
${exhibit && html `
|
|
28
|
+
<div class=explain>${exhibit.explain}</div>
|
|
29
|
+
|
|
30
|
+
<div class=sides>
|
|
31
|
+
<div class=codezone>
|
|
32
|
+
${Codebox("lit-html", "js", exhibit.js)}
|
|
33
|
+
${exhibit.css && Codebox("css", "css", exhibit.css.toString())}
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div class=stage>
|
|
37
|
+
${Stylebox(exhibit.styleboxCss, exhibit.css ?? css ``, exhibit.render())}
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
`}
|
|
41
|
+
</section>
|
|
38
42
|
`;
|
|
39
43
|
});
|
|
40
44
|
//# sourceMappingURL=view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../s/demo/views/showcase/view.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../s/demo/views/showcase/view.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAA;AAC7B,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAC,MAAM,WAAW,CAAA;AAE1D,OAAO,WAAW,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAC,OAAO,EAAC,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAA;AAE5C,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAA;AACpD,OAAO,EAAC,SAAS,EAAC,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAC,WAAW,EAAC,MAAM,+BAA+B,CAAA;AACzD,OAAO,EAAC,WAAW,EAAC,MAAM,gCAAgC,CAAA;AAE1D,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,KAAa,EAAE,QAAmB,EAAE,EAAE;IACrE,OAAO,CAAC,UAAU,CAAC,CAAA;IACnB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAA;IAE7B,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,WAAW,EAAE,CAAC,CAAA;IAChD,MAAM,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAE1C,OAAO,IAAI,CAAA;;;WAGD,KAAK;;OAET,SAAS,CAAC,IAAI,CAAC;QAChB,KAAK,EAAE,CAAC,EAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC;QAC9B,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KAC5D,CAAC;;;;KAIF,OAAO,IAAI,IAAI,CAAA;yBACK,OAAO,CAAC,OAAO;;;;QAIhC,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC;QACrC,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;;;;QAI5D,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,CAAA,EAAE,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;;;IAGzE;;EAEF,CAAA;AACF,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { html, unsafeCSS } from "lit";
|
|
2
|
+
import { shadow, useCss, useName } from "@e280/sly";
|
|
3
|
+
import { themeCss } from "../../../theme/theme.css.js";
|
|
4
|
+
export const Stylebox = shadow((styleboxCss, styles, content) => {
|
|
5
|
+
useName("stylebox");
|
|
6
|
+
useCss(themeCss, styleboxCss, styles);
|
|
7
|
+
return html `
|
|
8
|
+
<style>${unsafeCSS(styleboxCss)}</style>
|
|
9
|
+
<style>${unsafeCSS(styles)}</style>
|
|
10
|
+
${content}
|
|
11
|
+
`;
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../s/demo/views/stylebox/view.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,IAAI,EAAE,SAAS,EAAC,MAAM,KAAK,CAAA;AAC9C,OAAO,EAAU,MAAM,EAAE,MAAM,EAAE,OAAO,EAAC,MAAM,WAAW,CAAA;AAC1D,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAA;AAEpD,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,CAC7B,WAAsB,EACtB,MAAiB,EACjB,OAAgB,EACf,EAAE;IAEJ,OAAO,CAAC,UAAU,CAAC,CAAA;IACnB,MAAM,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC,CAAA;IAErC,OAAO,IAAI,CAAA;WACD,SAAS,CAAC,WAAW,CAAC;WACtB,SAAS,CAAC,MAAM,CAAC;IACxB,OAAO;EACT,CAAA;AACF,CAAC,CAAC,CAAA"}
|
package/x/index.d.ts
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./components/copy/component.js";
|
|
3
|
-
export * from "./components/drawer/component.js";
|
|
4
|
-
export * from "./components/drawer/control.js";
|
|
5
|
-
export * from "./components/example/component.js";
|
|
6
|
-
export * from "./components/tabs/component.js";
|
|
7
|
-
export * from "./components/tabs/control.js";
|
|
8
|
-
export * from "./components/foundation.css.js";
|
|
9
|
-
export * from "./components/framework.js";
|
|
10
|
-
export * from "./components/raw-components.js";
|
|
11
|
-
export * from "./shiny.js";
|
|
1
|
+
export * from "./views/copy/view.js";
|