@e280/shiny 0.1.0-1

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.
Files changed (94) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +10 -0
  3. package/package.json +62 -0
  4. package/s/demo/demo.bundle.ts +42 -0
  5. package/s/demo/demo.css +120 -0
  6. package/s/demo/views/demonstration/style.css.ts +108 -0
  7. package/s/demo/views/demonstration/view.ts +49 -0
  8. package/s/icons/tabler/ABOUT.md +7 -0
  9. package/s/icons/tabler/LICENSE +23 -0
  10. package/s/icons/tabler/clipboard-check-filled.svg.ts +4 -0
  11. package/s/icons/tabler/clipboard-x-filled.svg.ts +4 -0
  12. package/s/icons/tabler/clipboard.svg.ts +4 -0
  13. package/s/icons/tabler/copy.svg.ts +4 -0
  14. package/s/index.html.ts +37 -0
  15. package/s/index.ts +7 -0
  16. package/s/tests.test.ts +5 -0
  17. package/s/themes/basic.css.ts +18 -0
  18. package/s/themes/index.barrel.ts +3 -0
  19. package/s/themes/index.ts +3 -0
  20. package/s/tools/untab.ts +30 -0
  21. package/s/ui/components.ts +9 -0
  22. package/s/ui/copy/component.ts +66 -0
  23. package/s/ui/copy/style.css.ts +46 -0
  24. package/s/ui/example/component.ts +25 -0
  25. package/s/ui/example/style.css.ts +11 -0
  26. package/s/ui/framework.ts +8 -0
  27. package/s/ui/themers.ts +28 -0
  28. package/x/demo/demo.bundle.d.ts +1 -0
  29. package/x/demo/demo.bundle.js +37 -0
  30. package/x/demo/demo.bundle.js.map +1 -0
  31. package/x/demo/demo.bundle.min.js +277 -0
  32. package/x/demo/demo.bundle.min.js.map +7 -0
  33. package/x/demo/demo.css +120 -0
  34. package/x/demo/views/demonstration/style.css.d.ts +2 -0
  35. package/x/demo/views/demonstration/style.css.js +107 -0
  36. package/x/demo/views/demonstration/style.css.js.map +1 -0
  37. package/x/demo/views/demonstration/view.d.ts +10 -0
  38. package/x/demo/views/demonstration/view.js +36 -0
  39. package/x/demo/views/demonstration/view.js.map +1 -0
  40. package/x/icons/tabler/clipboard-check-filled.svg.d.ts +2 -0
  41. package/x/icons/tabler/clipboard-check-filled.svg.js +3 -0
  42. package/x/icons/tabler/clipboard-check-filled.svg.js.map +1 -0
  43. package/x/icons/tabler/clipboard-x-filled.svg.d.ts +2 -0
  44. package/x/icons/tabler/clipboard-x-filled.svg.js +3 -0
  45. package/x/icons/tabler/clipboard-x-filled.svg.js.map +1 -0
  46. package/x/icons/tabler/clipboard.svg.d.ts +2 -0
  47. package/x/icons/tabler/clipboard.svg.js +3 -0
  48. package/x/icons/tabler/clipboard.svg.js.map +1 -0
  49. package/x/icons/tabler/copy.svg.d.ts +2 -0
  50. package/x/icons/tabler/copy.svg.js +3 -0
  51. package/x/icons/tabler/copy.svg.js.map +1 -0
  52. package/x/index.d.ts +5 -0
  53. package/x/index.html +157 -0
  54. package/x/index.html.d.ts +2 -0
  55. package/x/index.html.js +33 -0
  56. package/x/index.html.js.map +1 -0
  57. package/x/index.js +6 -0
  58. package/x/index.js.map +1 -0
  59. package/x/tests.test.d.ts +1 -0
  60. package/x/tests.test.js +3 -0
  61. package/x/tests.test.js.map +1 -0
  62. package/x/themes/basic.css.d.ts +1 -0
  63. package/x/themes/basic.css.js +17 -0
  64. package/x/themes/basic.css.js.map +1 -0
  65. package/x/themes/index.barrel.d.ts +1 -0
  66. package/x/themes/index.barrel.js +2 -0
  67. package/x/themes/index.barrel.js.map +1 -0
  68. package/x/themes/index.d.ts +1 -0
  69. package/x/themes/index.js +2 -0
  70. package/x/themes/index.js.map +1 -0
  71. package/x/tools/untab.d.ts +1 -0
  72. package/x/tools/untab.js +26 -0
  73. package/x/tools/untab.js.map +1 -0
  74. package/x/ui/components.d.ts +6 -0
  75. package/x/ui/components.js +7 -0
  76. package/x/ui/components.js.map +1 -0
  77. package/x/ui/copy/component.d.ts +372 -0
  78. package/x/ui/copy/component.js +56 -0
  79. package/x/ui/copy/component.js.map +1 -0
  80. package/x/ui/copy/style.css.d.ts +2 -0
  81. package/x/ui/copy/style.css.js +45 -0
  82. package/x/ui/copy/style.css.js.map +1 -0
  83. package/x/ui/example/component.d.ts +371 -0
  84. package/x/ui/example/component.js +20 -0
  85. package/x/ui/example/component.js.map +1 -0
  86. package/x/ui/example/style.css.d.ts +2 -0
  87. package/x/ui/example/style.css.js +10 -0
  88. package/x/ui/example/style.css.js.map +1 -0
  89. package/x/ui/framework.d.ts +4 -0
  90. package/x/ui/framework.js +6 -0
  91. package/x/ui/framework.js.map +1 -0
  92. package/x/ui/themers.d.ts +8 -0
  93. package/x/ui/themers.js +12 -0
  94. package/x/ui/themers.js.map +1 -0
@@ -0,0 +1,120 @@
1
+
2
+ @layer vars, core, page;
3
+
4
+ @layer vars {
5
+ :root {
6
+ --bg: #333;
7
+ --color: #fff;
8
+ --prime: #d068ff;
9
+ --link: cyan;
10
+
11
+ --selection: white;
12
+ --selection-bg: #f70;
13
+ }
14
+ }
15
+
16
+ @layer core {
17
+ * {
18
+ margin: 0;
19
+ padding: 0;
20
+ box-sizing: border-box;
21
+
22
+ scrollbar-width: thin;
23
+ scrollbar-color: #444 transparent;
24
+ }
25
+
26
+ :not(:defined) {
27
+ display: none;
28
+ }
29
+
30
+ ::selection {
31
+ color: var(--selection);
32
+ background-color: var(--selection-bg);
33
+ }
34
+
35
+ ::-webkit-scrollbar { width: 8px; }
36
+ ::-webkit-scrollbar-track { background: transparent; }
37
+ ::-webkit-scrollbar-thumb { background: #444; border-radius: 1em; }
38
+ ::-webkit-scrollbar-thumb:hover { background: #666; }
39
+
40
+ a {
41
+ color: var(--link);
42
+ text-decoration: none;
43
+
44
+ &:visited {
45
+ color: color-mix(in srgb, purple, var(--link) 70%);
46
+ }
47
+
48
+ &:hover {
49
+ color: color-mix(in srgb, white, var(--link) 90%);
50
+ text-decoration: underline;
51
+ }
52
+
53
+ &:active {
54
+ color: color-mix(in srgb, white, var(--link) 50%);
55
+ }
56
+ }
57
+ }
58
+
59
+ @layer page {
60
+ :root {
61
+ height: 100%;
62
+ font-size: 16px;
63
+ font-family: sans-serif;
64
+
65
+ color-scheme: dark;
66
+ scrollbar-gutter: stable;
67
+
68
+ color: var(--color);
69
+ background: var(--bg);
70
+
71
+ --tint: #070429aa;
72
+ background:
73
+ linear-gradient(0deg, var(--tint), var(--tint)),
74
+ #141519 url("/assets/bg.webp") center 60% / cover no-repeat;
75
+
76
+ background-attachment: fixed, fixed;
77
+
78
+ text-shadow: 0.1em 0.1em 0.2em #0008;
79
+ }
80
+
81
+ body {
82
+ width: 100%;
83
+ min-height: 100%;
84
+ max-width: 60em;
85
+ margin: auto;
86
+ padding: 1em;
87
+ padding-bottom: 6em;
88
+
89
+ display: flex;
90
+ flex-direction: column;
91
+ gap: 1em;
92
+ }
93
+
94
+ h1 {
95
+ font-size: 1.5em;
96
+ display: flex;
97
+ flex-direction: column;
98
+ text-align: center;
99
+
100
+ strong {
101
+ font-size: 1.5em;
102
+ color: var(--prime);
103
+ }
104
+
105
+ small {
106
+ opacity: 0.6;
107
+ font-size: 0.7em;
108
+ font-weight: normal;
109
+ }
110
+ }
111
+
112
+ body > section {
113
+ display: flex;
114
+ flex-direction: column;
115
+ align-items: center;
116
+ justify-content: center;
117
+ margin-bottom: 1em;
118
+ }
119
+ }
120
+
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,107 @@
1
+ import { css } from "lit";
2
+ export default css `
3
+
4
+ :host {
5
+ position: relative;
6
+
7
+ display: flex;
8
+ flex-wrap: wrap;
9
+
10
+ padding: 1em;
11
+ border-radius: 0.5em;
12
+ gap: 1em;
13
+
14
+ background: linear-gradient(to right top, #252dd985, #aa6affbd);
15
+ backdrop-filter: blur(0.5em);
16
+
17
+ box-shadow: 0 0 5em #5d1fadaa;
18
+ border-top: 2px solid #fff4;
19
+
20
+ &::before {
21
+ content: "";
22
+ display: block;
23
+ position: absolute;
24
+ inset: 0;
25
+ border-radius: 0.5em;
26
+ background: #0007;
27
+ width: calc(100% - 0.3em);
28
+ height: calc(100% - 0.3em);
29
+ margin: auto;
30
+ z-index: 0;
31
+ }
32
+
33
+ > * {
34
+ position: relative;
35
+ z-index: 1;
36
+ }
37
+ }
38
+
39
+ .meta {
40
+ flex: 1 1 10em;
41
+ display: flex;
42
+ flex-direction: column;
43
+ gap: 0.5em;
44
+
45
+ h2 {
46
+ color: var(--prime);
47
+ }
48
+
49
+ .codes {
50
+ display: flex;
51
+ flex-direction: column;
52
+ gap: 0.2em;
53
+ }
54
+
55
+ .codeblock {
56
+ display: flex;
57
+ background: #0002;
58
+ border-radius: 0.3em;
59
+ border-bottom: 1px solid #fff2;
60
+ box-shadow: inset 0.2em 0.3em 2em #0004;
61
+
62
+ .zone {
63
+ flex: 1 1 auto;
64
+ display: flex;
65
+ flex-direction: column;
66
+ padding: 0.5em;
67
+
68
+ h3 {
69
+ opacity: 0.4;
70
+ font-size: 0.7em;
71
+ font-weight: normal;
72
+ font-style: italic;
73
+ }
74
+
75
+ code {
76
+ display: block;
77
+ white-space: pre;
78
+ text-wrap: wrap;
79
+ tab-size: 2;
80
+
81
+ font-size: 0.8em;
82
+ font-family: monospace;
83
+ color: #8f8;
84
+ }
85
+ }
86
+
87
+ [view="shiny-copy"] {
88
+ flex: 0 0 0;
89
+ padding: 0.2em;
90
+ }
91
+ }
92
+ }
93
+
94
+ .content {
95
+ flex: 1 1 10rem;
96
+ display: flex;
97
+ flex-direction: column;
98
+ justify-content: center;
99
+ align-items: center;
100
+
101
+ padding: 1rem;
102
+ border-radius: 0.5rem;
103
+ border: 1px dashed #fff4;
104
+ }
105
+
106
+ `;
107
+ //# sourceMappingURL=style.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../../s/demo/views/demonstration/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwGjB,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { Content } from "@e280/sly";
2
+ import { ShinyViews } from "../../../ui/themers.js";
3
+ export declare const Demonstration: import("@e280/sly").View<[options: {
4
+ name: string;
5
+ explain: Content;
6
+ views: ShinyViews;
7
+ exampleView: string;
8
+ exampleComponent: string;
9
+ content: Content;
10
+ }]>;
@@ -0,0 +1,36 @@
1
+ import { html } from "lit";
2
+ import { view } from "@e280/sly";
3
+ import styleCss from "./style.css.js";
4
+ import { untab } from "../../../tools/untab.js";
5
+ import { basic } from "../../../themes/basic.css.js";
6
+ export const Demonstration = view(use => (options) => {
7
+ use.name(options.name);
8
+ use.styles(basic, styleCss);
9
+ function codeblock(heading, code) {
10
+ const cleanCode = untab(code).trim();
11
+ return html `
12
+ <div class=codeblock>
13
+ <div class=zone>
14
+ <h3>${heading}</h3>
15
+ <code>${cleanCode}</code>
16
+ </div>
17
+ ${options.views.ShinyCopy(cleanCode)}
18
+ </div>
19
+ `;
20
+ }
21
+ return html `
22
+ <div class=meta>
23
+ <h2>✨ ${options.name}</h2>
24
+ <div class=explain>${options.explain}</div>
25
+ <div class=codes>
26
+ ${codeblock("sly view", options.exampleView)}
27
+ ${codeblock("html web component", options.exampleComponent)}
28
+ </div>
29
+ </div>
30
+
31
+ <div class=content part=content>
32
+ ${options.content}
33
+ </div>
34
+ `;
35
+ });
36
+ //# sourceMappingURL=view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../s/demo/views/demonstration/view.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAU,IAAI,EAAC,MAAM,WAAW,CAAA;AACvC,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAA;AAE7C,OAAO,EAAC,KAAK,EAAC,MAAM,8BAA8B,CAAA;AAElD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAOxC,EAAE,EAAE;IAEL,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACtB,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IAE3B,SAAS,SAAS,CAAC,OAAe,EAAE,IAAY;QAC/C,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;QACpC,OAAO,IAAI,CAAA;;;WAGF,OAAO;aACL,SAAS;;MAEhB,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;;GAErC,CAAA;IACF,CAAC;IAED,OAAO,IAAI,CAAA;;WAED,OAAO,CAAC,IAAI;wBACC,OAAO,CAAC,OAAO;;MAEjC,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC;MAC1C,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC,gBAAgB,CAAC;;;;;KAK1D,OAAO,CAAC,OAAO;;EAElB,CAAA;AACF,CAAC,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit-html").TemplateResult<2>;
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { svg } from "lit";
2
+ export default svg `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-clipboard-check"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M17.997 4.17a3 3 0 0 1 2.003 2.83v12a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 2.003 -2.83a4 4 0 0 0 3.997 3.83h4a4 4 0 0 0 3.98 -3.597zm-3.704 7.123l-3.293 3.292l-1.293 -1.292a1 1 0 1 0 -1.414 1.414l2 2a1 1 0 0 0 1.414 0l4 -4a1 1 0 0 0 -1.414 -1.414m-.293 -9.293a2 2 0 1 1 0 4h-4a2 2 0 1 1 0 -4z" /></svg>`;
3
+ //# sourceMappingURL=clipboard-check-filled.svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard-check-filled.svg.js","sourceRoot":"","sources":["../../../s/icons/tabler/clipboard-check-filled.svg.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA,6iBAA6iB,CAAA"}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit-html").TemplateResult<2>;
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { svg } from "lit";
2
+ export default svg `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-clipboard-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M17.997 4.17a3 3 0 0 1 2.003 2.83v12a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 2.003 -2.83a4 4 0 0 0 3.997 3.83h4a4 4 0 0 0 3.98 -3.597zm-7.29 7.123a1 1 0 0 0 -1.414 0l-.083 .094a1 1 0 0 0 .083 1.32l1.292 1.293l-1.292 1.293a1 1 0 0 0 0 1.414l.094 .083a1 1 0 0 0 1.32 -.083l1.293 -1.293l1.293 1.293a1 1 0 0 0 1.414 0l.083 -.094a1 1 0 0 0 -.083 -1.32l-1.293 -1.293l1.293 -1.293a1 1 0 0 0 0 -1.414l-.094 -.083a1 1 0 0 0 -1.32 .083l-1.293 1.292zm3.293 -9.293a2 2 0 1 1 0 4h-4a2 2 0 1 1 0 -4z" /></svg>`;
3
+ //# sourceMappingURL=clipboard-x-filled.svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard-x-filled.svg.js","sourceRoot":"","sources":["../../../s/icons/tabler/clipboard-x-filled.svg.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA,wuBAAwuB,CAAA"}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit-html").TemplateResult<2>;
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { svg } from "lit";
2
+ export default svg `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-clipboard"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" /><path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" /></svg>`;
3
+ //# sourceMappingURL=clipboard.svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard.svg.js","sourceRoot":"","sources":["../../../s/icons/tabler/clipboard.svg.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA,ofAAof,CAAA"}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit-html").TemplateResult<2>;
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { svg } from "lit";
2
+ export default svg `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-copy"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" /><path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" /></svg>`;
3
+ //# sourceMappingURL=copy.svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy.svg.js","sourceRoot":"","sources":["../../../s/icons/tabler/copy.svg.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA,4kBAA4kB,CAAA"}
package/x/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export * from "./themes/index.js";
2
+ export * from "./ui/example/component.js";
3
+ export * from "./ui/copy/component.js";
4
+ export * from "./ui/themers.js";
5
+ export * from "./ui/components.js";
package/x/index.html ADDED
@@ -0,0 +1,157 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8"/>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1"/>
6
+ <meta name="darkreader-lock"/>
7
+ <title>shiny</title>
8
+ <style>
9
+ @layer vars, core, page;
10
+
11
+ @layer vars {
12
+ :root {
13
+ --bg: #333;
14
+ --color: #fff;
15
+ --prime: #d068ff;
16
+ --link: cyan;
17
+
18
+ --selection: white;
19
+ --selection-bg: #f70;
20
+ }
21
+ }
22
+
23
+ @layer core {
24
+ * {
25
+ margin: 0;
26
+ padding: 0;
27
+ box-sizing: border-box;
28
+
29
+ scrollbar-width: thin;
30
+ scrollbar-color: #444 transparent;
31
+ }
32
+
33
+ :not(:defined) {
34
+ display: none;
35
+ }
36
+
37
+ ::selection {
38
+ color: var(--selection);
39
+ background-color: var(--selection-bg);
40
+ }
41
+
42
+ ::-webkit-scrollbar { width: 8px; }
43
+ ::-webkit-scrollbar-track { background: transparent; }
44
+ ::-webkit-scrollbar-thumb { background: #444; border-radius: 1em; }
45
+ ::-webkit-scrollbar-thumb:hover { background: #666; }
46
+
47
+ a {
48
+ color: var(--link);
49
+ text-decoration: none;
50
+
51
+ &:visited {
52
+ color: color-mix(in srgb, purple, var(--link) 70%);
53
+ }
54
+
55
+ &:hover {
56
+ color: color-mix(in srgb, white, var(--link) 90%);
57
+ text-decoration: underline;
58
+ }
59
+
60
+ &:active {
61
+ color: color-mix(in srgb, white, var(--link) 50%);
62
+ }
63
+ }
64
+ }
65
+
66
+ @layer page {
67
+ :root {
68
+ height: 100%;
69
+ font-size: 16px;
70
+ font-family: sans-serif;
71
+
72
+ color-scheme: dark;
73
+ scrollbar-gutter: stable;
74
+
75
+ color: var(--color);
76
+ background: var(--bg);
77
+
78
+ --tint: #070429aa;
79
+ background:
80
+ linear-gradient(0deg, var(--tint), var(--tint)),
81
+ #141519 url("/assets/bg.webp") center 60% / cover no-repeat;
82
+
83
+ background-attachment: fixed, fixed;
84
+
85
+ text-shadow: 0.1em 0.1em 0.2em #0008;
86
+ }
87
+
88
+ body {
89
+ width: 100%;
90
+ min-height: 100%;
91
+ max-width: 60em;
92
+ margin: auto;
93
+ padding: 1em;
94
+ padding-bottom: 6em;
95
+
96
+ display: flex;
97
+ flex-direction: column;
98
+ gap: 1em;
99
+ }
100
+
101
+ h1 {
102
+ font-size: 1.5em;
103
+ display: flex;
104
+ flex-direction: column;
105
+ text-align: center;
106
+
107
+ strong {
108
+ font-size: 1.5em;
109
+ color: var(--prime);
110
+ }
111
+
112
+ small {
113
+ opacity: 0.6;
114
+ font-size: 0.7em;
115
+ font-weight: normal;
116
+ }
117
+ }
118
+
119
+ body > section {
120
+ display: flex;
121
+ flex-direction: column;
122
+ align-items: center;
123
+ justify-content: center;
124
+ margin-bottom: 1em;
125
+ }
126
+ }
127
+
128
+ </style>
129
+ <script type=module src="demo/demo.bundle.min.js?v=f73045209960"></script>
130
+ <link rel="icon" href="assets/favicon.png?v=0414eeb5fcc2"/>
131
+
132
+ <meta name="theme-color" content="#d068ff">
133
+ <meta property="og:type" content="website">
134
+ <meta property="og:site_name" content="@e280/shiny">
135
+ <meta property="og:title" content="shiny">
136
+ <meta property="og:description" content="✨ web ui components">
137
+ <meta property="og:image" content="https://shiny.e280.org/assets/favicon.png">
138
+
139
+
140
+
141
+ </head>
142
+ <body>
143
+
144
+ <h1>
145
+ <strong>✨ @e280/shiny</strong>
146
+ <small>v0.1.0-1</small>
147
+ </h1>
148
+
149
+ <section>
150
+ <p>web ui components</p>
151
+ <p><a href="https://github.com/e280/shiny#readme">readme</a></p>
152
+ </section>
153
+
154
+ <shiny-demo></shiny-demo>
155
+
156
+ </body>
157
+ </html>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@e280/scute").TemplateFn;
2
+ export default _default;
@@ -0,0 +1,33 @@
1
+ import { ssg, html } from "@e280/scute";
2
+ const title = "shiny";
3
+ const description = "✨ web ui components";
4
+ const domain = "shiny.e280.org";
5
+ const favicon = "/assets/favicon.png";
6
+ export default ssg.page(import.meta.url, async (orb) => ({
7
+ title,
8
+ js: "demo/demo.bundle.min.js",
9
+ css: "demo/demo.css",
10
+ favicon,
11
+ dark: true,
12
+ socialCard: {
13
+ themeColor: "#d068ff",
14
+ title,
15
+ description,
16
+ siteName: "@e280/shiny",
17
+ image: "https://" + domain + favicon,
18
+ },
19
+ body: html `
20
+ <h1>
21
+ <strong>✨ @e280/shiny</strong>
22
+ <small>v${orb.packageVersion()}</small>
23
+ </h1>
24
+
25
+ <section>
26
+ <p>web ui components</p>
27
+ <p><a href="https://github.com/e280/shiny#readme">readme</a></p>
28
+ </section>
29
+
30
+ <shiny-demo></shiny-demo>
31
+ `,
32
+ }));
33
+ //# sourceMappingURL=index.html.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.html.js","sourceRoot":"","sources":["../s/index.html.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,aAAa,CAAA;AAErC,MAAM,KAAK,GAAG,OAAO,CAAA;AACrB,MAAM,WAAW,GAAG,qBAAqB,CAAA;AACzC,MAAM,MAAM,GAAG,gBAAgB,CAAA;AAC/B,MAAM,OAAO,GAAG,qBAAqB,CAAA;AAErC,eAAe,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAC,GAAG,EAAC,EAAE,CAAC,CAAC;IACtD,KAAK;IACL,EAAE,EAAE,yBAAyB;IAC7B,GAAG,EAAE,eAAe;IACpB,OAAO;IACP,IAAI,EAAE,IAAI;IACV,UAAU,EAAE;QACX,UAAU,EAAE,SAAS;QACrB,KAAK;QACL,WAAW;QACX,QAAQ,EAAE,aAAa;QACvB,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO;KACpC;IAED,IAAI,EAAE,IAAI,CAAA;;;aAGE,GAAG,CAAC,cAAc,EAAE;;;;;;;;;EAS/B;CACD,CAAC,CAAC,CAAA"}
package/x/index.js ADDED
@@ -0,0 +1,6 @@
1
+ export * from "./themes/index.js";
2
+ export * from "./ui/example/component.js";
3
+ export * from "./ui/copy/component.js";
4
+ export * from "./ui/themers.js";
5
+ export * from "./ui/components.js";
6
+ //# sourceMappingURL=index.js.map
package/x/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../s/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAA;AACjC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Science } from "@e280/science";
2
+ await Science.run({});
3
+ //# sourceMappingURL=tests.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tests.test.js","sourceRoot":"","sources":["../s/tests.test.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAA;AAErC,MAAM,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export declare const basic: import("lit").CSSResult;
@@ -0,0 +1,17 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1 @@
1
+ export * from "./basic.css.js";
@@ -0,0 +1,2 @@
1
+ export * from "./basic.css.js";
2
+ //# sourceMappingURL=index.barrel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.barrel.js","sourceRoot":"","sources":["../../s/themes/index.barrel.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1 @@
1
+ export * as themes from "./index.barrel.js";
@@ -0,0 +1,2 @@
1
+ export * as themes from "./index.barrel.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../s/themes/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1 @@
1
+ export declare function untab(code: string): string;
@@ -0,0 +1,26 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,6 @@
1
+ import { ShinyCopy } from "./copy/component.js";
2
+ import { ShinyExample } from "./example/component.js";
3
+ export declare const components: {
4
+ ShinyCopy: typeof ShinyCopy;
5
+ ShinyExample: typeof ShinyExample;
6
+ };
@@ -0,0 +1,7 @@
1
+ import { ShinyCopy } from "./copy/component.js";
2
+ import { ShinyExample } from "./example/component.js";
3
+ export const components = {
4
+ ShinyCopy,
5
+ ShinyExample,
6
+ };
7
+ //# sourceMappingURL=components.js.map