webc.site 0.1.23 → 0.1.25

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 CHANGED
@@ -1,49 +1,109 @@
1
- # 人工智能驱动的界面开发流程笔记
1
+ # WebC
2
2
 
3
- ## web 组件,支持无样式
3
+ 面向 AI 辅助开发设计的 Web Components 组件库与开发规范。
4
4
 
5
- 纯 web 组件,可适配全部前端框架。
5
+ [组件库在线预览](https://webc-zh.github.io)
6
6
 
7
- 组件样式和组件逻辑完全拆分。
7
+ ## 特性
8
8
 
9
- 可只引用组件的逻辑,然后自己写样式。
9
+ - **跨框架**:基于原生 Web Components 构建,兼容 React、Vue、Svelte、Solid 等前端框架。
10
+ - **无样式**:逻辑与样式解耦,支持仅引入逻辑以自定义样式。
11
+ - **免构建与构建双模式**:
12
+ - **免构建(CDN 模式)**:在浏览器中直接通过 CDN 引用 JS 与 CSS 文件。
13
+ - **构建模式(本地命令行)**:提供本地命令行工具,按需将组件源码集成至项目。
14
+ - **在线调试**:提供组件预览与“在线调试”入口,支持直接调试免构建组件。
10
15
 
11
- 同时支持无打包直接引用的使用方式,及配合 vite 等构建器打包的构建。
16
+ ## 快速上手
12
17
 
13
- 点击组件右上角的『在线调试』可以调试无打包的组件。
18
+ ### 1. CDN 引入(免构建模式)
14
19
 
15
- 如基于 vite 构建器打包项目,
20
+ 在免构建场景下,可通过 CDN 直接在浏览器中引用 JS 与 CSS 文件。
16
21
 
17
- ## 初衷
22
+ `Scroll`(虚拟滚动条)组件为例:
18
23
 
19
- 人工智能开发前端,比较大的问题是调试。
24
+ #### 使用 jsdelivr
20
25
 
21
- 虽然[谷歌反重力](https://antigravity.google) 之类的开发工具,有打开浏览器调试能力,但因为交互流程比较深、需要登录才能访问、需要后台准备数据等等,人工智能全自动浏览器调试流程经常被阻塞,无法继续。
26
+ ```html
27
+ <link href="//cdn.jsdelivr.net/npm/webc.site@0.1.23/Scroll.css" rel="stylesheet" />
28
+ <script type="module">
29
+ import "//cdn.jsdelivr.net/npm/webc.site@0.1.23/Scroll.js";
30
+ </script>
31
+ ```
22
32
 
23
- 为了加速开发,我建议的方案是:
33
+ #### 使用 npmmirror(中国大陆镜像源)
24
34
 
25
- 不在组件中直接调用后端接口读取数据,而是用异步回调的函数的方式,暴露给上层。
35
+ ```html
36
+ <link href="//registry.npmmirror.com/webc.site/0.1.23/files/Scroll.css" rel="stylesheet" />
37
+ <script type="module">
38
+ import "//registry.npmmirror.com/webc.site/0.1.23/files/Scroll.js";
39
+ </script>
40
+ ```
26
41
 
27
- 这样,就可以在 `Demo.svelte` 用假数据来展示组件的不同状态.
42
+ > [!TIP]
43
+ > **自定义 CSS 变量(重写样式与替换背景资源)**
44
+ > 如需重写默认样式,可引用前缀为 `_` 的样式文件(该文件不包含 `var.css` 声明):
45
+ >
46
+ > ```html
47
+ > <link href="//cdn.jsdelivr.net/npm/webc.site@0.1.23/_Scroll.css" rel="stylesheet" />
48
+ > ```
28
49
 
29
- 不再对后端数据状态有依赖。不需要登录,不需要在调试的之前,去后端准备数据。
50
+ ### 2. 构建模式
30
51
 
31
- 也方便调整样式之后,查看在不同状态下,组件是否呈现有问题。
52
+ 构建模式与免构建(CDN)模式特性对比:
32
53
 
33
- 具体方案,可以参考我的演示前端库 [webc-zh](https://github.com/webc-zh/webc-zh.github.io)。
54
+ - **免构建(CDN 模式)**:适用于无需开发环境配置、直接引用的轻量化场景。
55
+ - **构建模式**:支持摇树优化与按需引入以减少构建体积,并支持静态资源优化(如 SVG 资源内联与去重)。
34
56
 
35
- 组件库在线浏览 [GitHub Page](https://webc-zh.github.io)
57
+ 在构建项目中,可运行以下命令将组件源码引入本地:
36
58
 
37
- 这里我把前端组件,都拆分为独立的组件文件夹,每个文件夹包含了所有需要的资源(比如 svg 等)。
59
+ ```bash
60
+ bunx webc.add <组件名>
61
+ ```
38
62
 
39
- 如此做的好处是,可以类似[shadcn](https://ui.shadcn.com) 一样,实现按需添加。
63
+ 例如添加 `Scroll`(虚拟滚动条)组件:
40
64
 
41
- 比如, `./comDev.sh com/scroll`,就可以对滚动条进行单独的开发,调试。
65
+ ```bash
66
+ bunx webc.add Scroll
67
+ ```
42
68
 
43
- 调试默认会打开文件下的 `Demo.svelte` 作为调试入口。
69
+ #### 命令行工作原理
44
70
 
45
- 完整的开发提示词,可以参考 [.agents/skills/com/SKILL.md](.agents/skills/com/SKILL.md)
71
+ 1. **解析依赖**:查询 npm 注册表并解析 `webc.com` 包源。
72
+ 2. **源码集成**:下载包源并提取目标组件源码,编译输出至本地项目的 `lib/<组件名>` 目录。
73
+ 3. **样式处理**:将组件关联的 Stylus 代码编译为 CSS,并集成至公共样式。
46
74
 
47
- 谷歌反重力中 `/com ` 即可使用。
75
+ ### 3. SVG 资源优化 (`vite-plugin-svg-var`)
76
+
77
+ 在 Vite 构建配置中,配合使用 [vite-plugin-svg-var](https://www.npmjs.com/package/vite-plugin-svg-var) 插件优化 SVG 资源加载:
78
+
79
+ - **内容去重**:对 `public/svg` 目录下的 SVG 进行 MD5 哈希校验。内容相同的 SVG 文件仅生成单个 CSS 变量,避免资源冗余。
80
+ - **UTF-8 编码**:将 SVG 转为 UTF-8 编码的 `data:image/svg+xml` 并写入 CSS 变量,降低编码体积,提升压缩率。
81
+ - **替换与注入**:构建或开发阶段,插件在项目入口 JS(匹配 `/page/entry/**/*.js`)中注入 CSS 变量样式,并将 CSS/Stylus/Svelte 中引用的 `url("/svg/xxx.svg")` 替换为 `var(--xxxSvg)` 形式,减少网络请求。
82
+ - **热更新**:监听 `public/svg` 目录变动,在新增、修改或删除 SVG 文件时,重新计算 CSS 变量并触发热重载。
83
+
84
+ ## AI 驱动开发规范
85
+
86
+ ### 1. 状态与逻辑解耦
87
+
88
+ AI 智能体在通过自动化浏览器(如 Antigravity)进行界面调试时,常因交互链路长、鉴权限制以及对后端数据的依赖而导致调试中断。
89
+
90
+ 为提升 AI 开发效率,本项目采用以下设计规范:
91
+
92
+ - **数据流向上管理**:组件内部不直接调用后端接口,数据交互均通过异步回调函数向外暴露。
93
+ - **数据模拟**:在 `Demo.svelte` 中传入模拟数据,以展现组件在多种状态下的交互表现,免除鉴权及后端环境依赖。
94
+
95
+ ### 2. 组件架构与本地调试
96
+
97
+ 组件采用独立目录结构,每个组件文件夹内包含其全部的逻辑、样式及静态资源(如 SVG)。
98
+
99
+ - **按需添加**:支持通过命令行独立拉取组件。
100
+ - **隔离调试**:执行以下命令,针对指定组件启动开发服务,调试入口为该组件目录下的 `Demo.svelte`:
101
+ ```bash
102
+ ./comDev.sh com/<组件名>
103
+ ```
104
+
105
+ ### 3. 智能体提示词配置
106
+
107
+ 开发提示词配置参见 [.agents/skills/com/SKILL.md](.agents/skills/com/SKILL.md)。在谷歌反重力(Antigravity)环境下,使用 `/com` 命令即可调用。
48
108
 
49
109
  ![](https://i-01.eu.org/1779351273.avif)
package/Scroll.css CHANGED
@@ -1 +1,2 @@
1
- :root{--cursorGrabSvg:url(./svg/giUzPhnYmbjOG3VzqseH5g.svg) 8 7, grabbing;--cursorScrollhSvg:url(./svg/yhI9x3s8u28j5vUN45useQ.svg) 10 10, ew-resize;--cursorScrollvSvg:url(./svg/sgoOOaKyF_KnkUoRKxWczw.svg) 10 10, ns-resize}v-scroll,h-scroll{display:block}v-scroll::part(scroll),h-scroll::part(scroll){scrollbar-width:none;width:100%;height:100%;display:flex;position:relative;overflow:auto}v-scroll::part(scroll)::-webkit-scrollbar,h-scroll::part(scroll)::-webkit-scrollbar{display:none}v-scroll::part(bar),h-scroll::part(bar){user-select:none;z-index:999;--si-anim:none;--si-bg:#7d7d7d99;transition:all .2s,opacity 1s,box-shadow 1s;display:block;position:sticky;bottom:0}v-scroll::part(bar):hover,h-scroll::part(bar):hover,v-scroll::part(drag),h-scroll::part(drag){--si-anim:v-scroll-pop .4s ease-out;--si-bg:#7d7d7dcc;background:#0000000d;box-shadow:inset 0 1px 6px #fffc,inset 0 -2px 8px #0000000a,inset 0 0 0 1px #ffffff80;opacity:1!important}v-scroll::part(si),h-scroll::part(si){animation:var(--si-anim);background:var(--si-bg);border-radius:3px;margin:auto;transition:all .2s,opacity 1s,box-shadow 1s;display:block;position:absolute}v-scroll{--sh:inset 3px 0 3px -3px #0000004d, inset -3px 0 3px -3px #0000000d;width:100%;height:100%}v-scroll::part(scroll){overflow-x:hidden}v-scroll::part(bar){width:13px;height:100%;margin-left:-13px;top:0;left:100%}v-scroll::part(bar):hover,v-scroll::part(drag){cursor:var(--cursorScrollvSvg);width:21px;margin-left:-21px}v-scroll::part(si){cursor:var(--cursorScrollvSvg);width:7px;left:0;right:0}h-scroll{--sh:inset 0 3px 3px -3px #0000004d, inset 0 -3px 3px -3px #0000000d;width:100%}h-scroll::part(scroll){width:100%;display:block;overflow-y:hidden}h-scroll::part(bar){width:100%;height:13px;margin-top:-13px;left:0;right:0}h-scroll::part(bar):hover,h-scroll::part(drag){cursor:var(--cursorScrollhSvg);height:21px;margin-top:-21px}h-scroll::part(si){cursor:var(--cursorScrollhSvg);height:7px;top:0;bottom:0}body.drag{cursor:var(--cursorGrabSvg)!important}@-webkit-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@-moz-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@-o-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}
1
+ :root{--cursorGrabSvg:url(giUzPhnYmbjOG3VzqseH5g.svg) 8 7, grabbing;--cursorScrollhSvg:url(yhI9x3s8u28j5vUN45useQ.svg) 10 10, ew-resize;--cursorScrollvSvg:url(sgoOOaKyF_KnkUoRKxWczw.svg) 10 10, ns-resize}v-scroll,h-scroll{display:block}v-scroll::part(scroll),h-scroll::part(scroll){scrollbar-width:none;width:100%;height:100%;display:flex;position:relative;overflow:auto}v-scroll::part(scroll)::-webkit-scrollbar,h-scroll::part(scroll)::-webkit-scrollbar{display:none}v-scroll::part(bar),h-scroll::part(bar){user-select:none;z-index:999;--si-anim:none;--si-bg:#7d7d7d99;transition:all .2s,opacity 1s,box-shadow 1s;display:block;position:sticky;bottom:0}v-scroll::part(bar):hover,h-scroll::part(bar):hover,v-scroll::part(drag),h-scroll::part(drag){--si-anim:v-scroll-pop .4s ease-out;--si-bg:#7d7d7dcc;background:#0000000d;box-shadow:inset 0 1px 6px #fffc,inset 0 -2px 8px #0000000a,inset 0 0 0 1px #ffffff80;opacity:1!important}v-scroll::part(si),h-scroll::part(si){animation:var(--si-anim);background:var(--si-bg);border-radius:3px;margin:auto;transition:all .2s,opacity 1s,box-shadow 1s;display:block;position:absolute}v-scroll{--sh:inset 3px 0 3px -3px #0000004d, inset -3px 0 3px -3px #0000000d;width:100%;height:100%}v-scroll::part(scroll){overflow-x:hidden}v-scroll::part(bar){width:13px;height:100%;margin-left:-13px;top:0;left:100%}v-scroll::part(bar):hover,v-scroll::part(drag){cursor:var(--cursorScrollvSvg);width:21px;margin-left:-21px}v-scroll::part(si){cursor:var(--cursorScrollvSvg);width:7px;left:0;right:0}h-scroll{--sh:inset 0 3px 3px -3px #0000004d, inset 0 -3px 3px -3px #0000000d;width:100%}h-scroll::part(scroll){width:100%;display:block;overflow-y:hidden}h-scroll::part(bar){width:100%;height:13px;margin-top:-13px;left:0;right:0}h-scroll::part(bar):hover,h-scroll::part(drag){cursor:var(--cursorScrollhSvg);height:21px;margin-top:-21px}h-scroll::part(si){cursor:var(--cursorScrollhSvg);height:7px;top:0;bottom:0}body.drag{cursor:var(--cursorGrabSvg)!important}@-webkit-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@-moz-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@-o-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}
2
+ /*# sourceMappingURL=Scroll.css.map */
package/Scroll.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":null,"mappings":"AAAA,8NAKA,gCAIA,uIASA,iGAIA,yLAWA,mRAUA,iMAUA,qGAKA,yCAGA,6EAOA,2GAMA,2EAMA,yFAIA,kEAKA,2EAOA,2GAMA,4EAMA,gDAGA","sources":["Users/z/git/webc-zh/lib/Scroll.css"],"sourcesContent":[":root {\n --cursorGrabSvg: url(\"./svg/giUzPhnYmbjOG3VzqseH5g.svg\") 8 7, grabbing;\n --cursorScrollhSvg: url(\"./svg/yhI9x3s8u28j5vUN45useQ.svg\") 10 10, ew-resize;\n --cursorScrollvSvg: url(\"./svg/sgoOOaKyF_KnkUoRKxWczw.svg\") 10 10, ns-resize;\n}\nv-scroll,\nh-scroll {\n display: block;\n}\nv-scroll::part(scroll),\nh-scroll::part(scroll) {\n display: flex;\n height: 100%;\n overflow: auto;\n position: relative;\n scrollbar-width: none;\n width: 100%;\n}\nv-scroll::part(scroll)::-webkit-scrollbar,\nh-scroll::part(scroll)::-webkit-scrollbar {\n display: none;\n}\nv-scroll::part(bar),\nh-scroll::part(bar) {\n bottom: 0;\n display: block;\n position: sticky;\n transition: all 0.2s, opacity 1s, box-shadow 1s;\n user-select: none;\n z-index: 999;\n --si-anim: none;\n --si-bg: rgba(125,125,125,0.6);\n}\nv-scroll::part(bar):hover,\nh-scroll::part(bar):hover,\nv-scroll::part(drag),\nh-scroll::part(drag) {\n background: rgba(0,0,0,0.051);\n box-shadow: inset 0 1px 6px rgba(255,255,255,0.8), inset 0 -2px 8px rgba(0,0,0,0.039), inset 0 0 0 1px rgba(255,255,255,0.502);\n opacity: 1 !important;\n --si-anim: v-scroll-pop 0.4s ease-out;\n --si-bg: rgba(125,125,125,0.8);\n}\nv-scroll::part(si),\nh-scroll::part(si) {\n animation: var(--si-anim);\n background: var(--si-bg);\n border-radius: 3px;\n display: block;\n margin: auto;\n position: absolute;\n transition: all 0.2s, opacity 1s, box-shadow 1s;\n}\nv-scroll {\n height: 100%;\n width: 100%;\n --sh: inset 3px 0 3px -3px rgba(0,0,0,0.302), inset -3px 0 3px -3px rgba(0,0,0,0.051);\n}\nv-scroll::part(scroll) {\n overflow-x: hidden;\n}\nv-scroll::part(bar) {\n height: 100%;\n left: 100%;\n margin-left: -13px;\n top: 0;\n width: 13px;\n}\nv-scroll::part(bar):hover,\nv-scroll::part(drag) {\n cursor: var(--cursorScrollvSvg);\n margin-left: -21px;\n width: 21px;\n}\nv-scroll::part(si) {\n cursor: var(--cursorScrollvSvg);\n left: 0;\n right: 0;\n width: 7px;\n}\nh-scroll {\n width: 100%;\n --sh: inset 0 3px 3px -3px rgba(0,0,0,0.302), inset 0 -3px 3px -3px rgba(0,0,0,0.051);\n}\nh-scroll::part(scroll) {\n display: block;\n overflow-y: hidden;\n width: 100%;\n}\nh-scroll::part(bar) {\n height: 13px;\n left: 0;\n margin-top: -13px;\n right: 0;\n width: 100%;\n}\nh-scroll::part(bar):hover,\nh-scroll::part(drag) {\n cursor: var(--cursorScrollhSvg);\n height: 21px;\n margin-top: -21px;\n}\nh-scroll::part(si) {\n bottom: 0;\n cursor: var(--cursorScrollhSvg);\n height: 7px;\n top: 0;\n}\nbody.drag {\n cursor: var(--cursorGrabSvg) !important;\n}\n@-moz-keyframes v-scroll-pop {\n 0% {\n transform: scale(1);\n }\n 40% {\n transform: scale(1.15);\n }\n 100% {\n transform: scale(1);\n }\n}\n@-webkit-keyframes v-scroll-pop {\n 0% {\n transform: scale(1);\n }\n 40% {\n transform: scale(1.15);\n }\n 100% {\n transform: scale(1);\n }\n}\n@-o-keyframes v-scroll-pop {\n 0% {\n transform: scale(1);\n }\n 40% {\n transform: scale(1.15);\n }\n 100% {\n transform: scale(1);\n }\n}\n@keyframes v-scroll-pop {\n 0% {\n transform: scale(1);\n }\n 40% {\n transform: scale(1.15);\n }\n 100% {\n transform: scale(1);\n }\n}\n"],"names":[]}
1
+ {"version":3,"sourceRoot":null,"mappings":"AAAA,4MACA,gCAAgC,uIAAuI,iGAAiG,yLAAyL,mRAAmR,iMAAiM,qGAAqG,yCAAyC,6EAA6E,2GAA2G,2EAA2E,yFAAyF,kEAAkE,2EAA2E,2GAA2G,4EAA4E,gDAAgD","sources":["Scroll.css"],"sourcesContent":[":root{--cursorGrabSvg:url(\"giUzPhnYmbjOG3VzqseH5g.svg\") 8 7, grabbing;--cursorScrollhSvg:url(\"yhI9x3s8u28j5vUN45useQ.svg\") 10 10, ew-resize;--cursorScrollvSvg:url(\"sgoOOaKyF_KnkUoRKxWczw.svg\") 10 10, ns-resize}\nv-scroll,h-scroll{display:block}v-scroll::part(scroll),h-scroll::part(scroll){scrollbar-width:none;width:100%;height:100%;display:flex;position:relative;overflow:auto}v-scroll::part(scroll)::-webkit-scrollbar,h-scroll::part(scroll)::-webkit-scrollbar{display:none}v-scroll::part(bar),h-scroll::part(bar){user-select:none;z-index:999;--si-anim:none;--si-bg:#7d7d7d99;transition:all .2s,opacity 1s,box-shadow 1s;display:block;position:sticky;bottom:0}v-scroll::part(bar):hover,h-scroll::part(bar):hover,v-scroll::part(drag),h-scroll::part(drag){--si-anim:v-scroll-pop .4s ease-out;--si-bg:#7d7d7dcc;background:#0000000d;box-shadow:inset 0 1px 6px #fffc,inset 0 -2px 8px #0000000a,inset 0 0 0 1px #ffffff80;opacity:1!important}v-scroll::part(si),h-scroll::part(si){animation:var(--si-anim);background:var(--si-bg);border-radius:3px;margin:auto;transition:all .2s,opacity 1s,box-shadow 1s;display:block;position:absolute}v-scroll{--sh:inset 3px 0 3px -3px #0000004d, inset -3px 0 3px -3px #0000000d;width:100%;height:100%}v-scroll::part(scroll){overflow-x:hidden}v-scroll::part(bar){width:13px;height:100%;margin-left:-13px;top:0;left:100%}v-scroll::part(bar):hover,v-scroll::part(drag){cursor:var(--cursorScrollvSvg);width:21px;margin-left:-21px}v-scroll::part(si){cursor:var(--cursorScrollvSvg);width:7px;left:0;right:0}h-scroll{--sh:inset 0 3px 3px -3px #0000004d, inset 0 -3px 3px -3px #0000000d;width:100%}h-scroll::part(scroll){width:100%;display:block;overflow-y:hidden}h-scroll::part(bar){width:100%;height:13px;margin-top:-13px;left:0;right:0}h-scroll::part(bar):hover,h-scroll::part(drag){cursor:var(--cursorScrollhSvg);height:21px;margin-top:-21px}h-scroll::part(si){cursor:var(--cursorScrollhSvg);height:7px;top:0;bottom:0}body.drag{cursor:var(--cursorGrabSvg)!important}@-webkit-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@-moz-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@-o-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}"],"names":[]}
package/Scroll.js CHANGED
@@ -1 +1,87 @@
1
- import { On as e, D as t, newEl as o } from "./x.js";(()=>{let{round:l,max:i,min:r}=Math,n="drag",s=(e,t,...l)=>{let i=o(e);return t&&i.setAttribute("part",t),i.append(...l),i};[["v","Height","Top","Y","flex-direction:column;width:100%;min-height:100%"],["h","Width","Left","X","min-width:100%;width:max-content;height:100%"]].map(([o,a,d,c,p])=>{let m,u,h,b,f,y,v=(m=a.toLowerCase(),u=d.toLowerCase(),h="client"+a,b="scroll"+a,f="scroll"+d,y="client"+c,o=>{let a,d,c,p=-1,v=o.firstElementChild,w=s("i","si"),x=s("b","bar",w),C=(e=w[h])=>{let t=o[h],l=v[b];return[l-t,i(1,t-e-6),e,t,l]},T=e=>{if(!x.parentNode)return;let[t,n]=C(e),s=i(0,r(o[f],t));-1!=p&&p!=s&&(x.style.opacity=1,clearTimeout(a),a=setTimeout(()=>x.style.opacity=0,1e3)),p=s,w.style[u]=3+l(n*s/t)+"px"},g=i=>{if(d)return;let r=t.body;r.setPointerCapture(i.pointerId),r.classList.add(n),x.part.add(n);let s=i[y],a=()=>{r.classList.remove(n),x.part.remove(n),c(),d=null},c=e(r,{pointermove:e=>{let[t,i]=C();o[f]+=l(t*(e[y]-s)/i),s=e[y]},pointerup:a,lostpointercapture:a});d=a},L=[e(x,{pointerdown:e=>{let t=x.getBoundingClientRect()[u],[n,s,a]=C();o[f]=l(n*i(r((e[y]-t-3-a/2)/s,1),0)),g(e)}}),e(w,{pointerdown:e=>{e.stopPropagation(),g(e)}}),e(o,{scroll:T.bind(null,void 0)})],E=new ResizeObserver(()=>{clearTimeout(c),c=setTimeout(()=>{let[,,,e,t]=C();if(e<t){x.parentNode!=o&&o.appendChild(x);let r=i(16,l(e*e/t));w.style[m]=r+"px",T(r)}else x.parentNode&&x.remove()},200)});return x.style.opacity=0,[o,v].forEach(e=>E.observe(e)),()=>{clearTimeout(a),clearTimeout(c),L.forEach(e=>e()),d&&d(),E.disconnect(),x.parentNode&&x.remove()}});customElements.define(o+"-scroll",class extends HTMLElement{connectedCallback(){let e=s("b","",s("slot")),t=s("b","scroll",e);e.style.cssText="display:flex;"+p,this.attachShadow({mode:"open"}).appendChild(t),this._unbind=v(t)}disconnectedCallback(){this._unbind?.()}})})})();
1
+ import { On as e, D as t, newEl as n } from "./x.js";//#region com/Scroll/Scroll.js
2
+ (() => {
3
+ let { round: r, max: i, min: a } = Math, o = "drag", s = (e, t, ...r) => {
4
+ let i = n(e);
5
+ return t && i.setAttribute("part", t), i.append(...r), i;
6
+ }, c = (n, c, l) => {
7
+ let u = n.toLowerCase(), d = c.toLowerCase(), f = "client" + n, p = "scroll" + n, m = "scroll" + c, h = "client" + l;
8
+ return (n) => {
9
+ let c, l, g, _ = -1, v = n.firstElementChild, y = s("i", "si"), b = s("b", "bar", y), x = (e = y[f]) => {
10
+ let t = n[f], r = v[p];
11
+ return [
12
+ r - t,
13
+ i(1, t - e - 6),
14
+ e,
15
+ t,
16
+ r
17
+ ];
18
+ }, S = (e) => {
19
+ if (!b.parentNode) return;
20
+ let [t, o] = x(e), s = i(0, a(n[m], t));
21
+ _ != -1 && _ != s && (b.style.opacity = 1, clearTimeout(c), c = setTimeout(() => b.style.opacity = 0, 1e3)), _ = s, y.style[d] = 3 + r(o * s / t) + "px";
22
+ }, C = (i) => {
23
+ if (l) return;
24
+ let a = t.body;
25
+ a.setPointerCapture(i.pointerId), a.classList.add(o), b.part.add(o);
26
+ let s = i[h], c = () => {
27
+ a.classList.remove(o), b.part.remove(o), u(), l = null;
28
+ }, u = e(a, {
29
+ pointermove: (e) => {
30
+ let [t, i] = x();
31
+ n[m] += r(t * (e[h] - s) / i), s = e[h];
32
+ },
33
+ pointerup: c,
34
+ lostpointercapture: c
35
+ });
36
+ l = c;
37
+ }, w = [
38
+ e(b, { pointerdown: (e) => {
39
+ let t = b.getBoundingClientRect()[d], [o, s, c] = x();
40
+ n[m] = r(o * i(a((e[h] - t - 3 - c / 2) / s, 1), 0)), C(e);
41
+ } }),
42
+ e(y, { pointerdown: (e) => {
43
+ e.stopPropagation(), C(e);
44
+ } }),
45
+ e(n, { scroll: S.bind(null, void 0) })
46
+ ], T = new ResizeObserver(() => {
47
+ clearTimeout(g), g = setTimeout(() => {
48
+ let [, , , e, t] = x();
49
+ if (e < t) {
50
+ b.parentNode != n && n.appendChild(b);
51
+ let a = i(16, r(e * e / t));
52
+ y.style[u] = a + "px", S(a);
53
+ } else b.parentNode && b.remove();
54
+ }, 200);
55
+ }), E = () => {
56
+ clearTimeout(c), clearTimeout(g), w.forEach((e) => e()), l && l(), T.disconnect(), b.parentNode && b.remove();
57
+ };
58
+ return b.style.opacity = 0, [n, v].forEach((e) => T.observe(e)), E;
59
+ };
60
+ };
61
+ [[
62
+ "v",
63
+ "Height",
64
+ "Top",
65
+ "Y",
66
+ "flex-direction:column;width:100%;min-height:100%"
67
+ ], [
68
+ "h",
69
+ "Width",
70
+ "Left",
71
+ "X",
72
+ "min-width:100%;width:max-content;height:100%"
73
+ ]].map(([e, t, n, r, i]) => {
74
+ let a = c(t, n, r);
75
+ customElements.define(e + "-scroll", class extends HTMLElement {
76
+ connectedCallback() {
77
+ let e = s("b", "", s("slot")), t = s("b", "scroll", e);
78
+ e.style.cssText = "display:flex;" + i, this.attachShadow({ mode: "open" }).appendChild(t), this._unbind = a(t);
79
+ }
80
+ disconnectedCallback() {
81
+ this._unbind?.();
82
+ }
83
+ });
84
+ });
85
+ })();
86
+ //#endregion
87
+
package/Scroll.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Scroll.js","names":[],"sources":["../com/Scroll/Scroll.js"],"sourcesContent":["import { On } from \"x/On.js\";\nimport { D, newEl } from \"x/dom.js\";\n\n(() => {\n const { round, max, min } = Math,\n PART = \"part\",\n BAR = \"bar\",\n SI = \"si\",\n DRAG = \"drag\",\n PX = \"px\",\n mk = (tag, part, ...kids) => {\n const e = newEl(tag);\n if (part) e.setAttribute(PART, part);\n e.append(...kids);\n return e;\n },\n mkScroll = (size, pos, axis) => {\n const style_size = size.toLowerCase(),\n style_pos = pos.toLowerCase(),\n client_size = \"client\" + size,\n scroll_size = \"scroll\" + size,\n scroll_pos = \"scroll\" + pos,\n client_pos = \"client\" + axis;\n return (ct) => {\n let timer_bar,\n ptr_unbind,\n timer_resize,\n pre_st = -1;\n const m = ct.firstElementChild,\n si = mk(\"i\", SI),\n bar = mk(\"b\", BAR, si),\n getGeo = (sih = si[client_size]) => {\n const ch = ct[client_size],\n sh = m[scroll_size];\n return [sh - ch, max(1, ch - sih - 6), sih, ch, sh];\n },\n updateTop = (h) => {\n if (!bar.parentNode) return;\n const [ds, db] = getGeo(h),\n st = max(0, min(ct[scroll_pos], ds));\n if (pre_st != -1 && pre_st != st) {\n bar.style.opacity = 1;\n clearTimeout(timer_bar);\n timer_bar = setTimeout(() => (bar.style.opacity = 0), 1e3);\n }\n pre_st = st;\n si.style[style_pos] = 3 + round((db * st) / ds) + PX;\n },\n onDown = (e) => {\n if (ptr_unbind) return;\n const bd = D.body;\n bd.setPointerCapture(e.pointerId);\n bd.classList.add(DRAG);\n bar.part.add(DRAG);\n let pre = e[client_pos];\n const detach = () => {\n bd.classList.remove(DRAG);\n bar.part.remove(DRAG);\n un_ptr();\n ptr_unbind = null;\n },\n un_ptr = On(bd, {\n pointermove: (e) => {\n const [ds, db] = getGeo();\n ct[scroll_pos] += round((ds * (e[client_pos] - pre)) / db);\n pre = e[client_pos];\n },\n pointerup: detach,\n lostpointercapture: detach,\n });\n ptr_unbind = detach;\n },\n onClick = (e) => {\n const rect = bar.getBoundingClientRect(),\n top = rect[style_pos],\n [ds, db, sih] = getGeo();\n ct[scroll_pos] = round(ds * max(min((e[client_pos] - top - 3 - sih / 2) / db, 1), 0));\n onDown(e);\n },\n unbind = [\n On(bar, { pointerdown: onClick }),\n On(si, {\n pointerdown: (e) => {\n e.stopPropagation();\n onDown(e);\n },\n }),\n On(ct, { scroll: updateTop.bind(null, undefined) }),\n ],\n ob = new ResizeObserver(() => {\n clearTimeout(timer_resize);\n timer_resize = setTimeout(() => {\n const [, , , ch, sh] = getGeo(),\n is_turn = ch < sh;\n if (is_turn) {\n if (bar.parentNode != ct) ct.appendChild(bar);\n const h = max(16, round((ch * ch) / sh));\n si.style[style_size] = h + PX;\n updateTop(h);\n } else if (bar.parentNode) {\n bar.remove();\n }\n }, 200);\n }),\n destroy = () => {\n clearTimeout(timer_bar);\n clearTimeout(timer_resize);\n unbind.forEach((f) => f());\n if (ptr_unbind) ptr_unbind();\n ob.disconnect();\n if (bar.parentNode) bar.remove();\n };\n bar.style.opacity = 0;\n [ct, m].forEach((i) => ob.observe(i));\n return destroy;\n };\n };\n\n [\n [\"v\", \"Height\", \"Top\", \"Y\", \"flex-direction:column;width:100%;min-height:100%\"],\n [\"h\", \"Width\", \"Left\", \"X\", \"min-width:100%;width:max-content;height:100%\"],\n ].map(([prefix, size, pos, axis, css]) => {\n const initScroll = mkScroll(size, pos, axis);\n customElements.define(\n prefix + \"-scroll\",\n class extends HTMLElement {\n connectedCallback() {\n const content = mk(\"b\", \"\", mk(\"slot\")),\n wrapper = mk(\"b\", \"scroll\", content);\n content.style.cssText = \"display:flex;\" + css;\n this.attachShadow({ mode: \"open\" }).appendChild(wrapper);\n this._unbind = initScroll(wrapper);\n }\n disconnectedCallback() {\n this._unbind?.();\n }\n },\n );\n });\n})();\n"],"mappings":";;;OAGO;CACL,MAAM,EAAE,OAAO,KAAK,QAAQ,MAC1B,OAAO,QACP,MAAM,OACN,KAAK,MACL,OAAO,QACP,KAAK,MACL,MAAM,KAAK,MAAM,GAAG,SAAS;EAC3B,MAAM,IAAI,MAAM,GAAG;EACnB,IAAI,MAAM,EAAE,aAAa,MAAM,IAAI;EACnC,EAAE,OAAO,GAAG,IAAI;EAChB,OAAO;CACT,GACA,YAAY,MAAM,KAAK,SAAS;EAC9B,MAAM,aAAa,KAAK,YAAY,GAClC,YAAY,IAAI,YAAY,GAC5B,cAAc,WAAW,MACzB,cAAc,WAAW,MACzB,aAAa,WAAW,KACxB,aAAa,WAAW;EAC1B,QAAQ,OAAO;GACb,IAAI,WACF,YACA,cACA,SAAS;GACX,MAAM,IAAI,GAAG,mBACX,KAAK,GAAG,KAAK,EAAE,GACf,MAAM,GAAG,KAAK,KAAK,EAAE,GACrB,UAAU,MAAM,GAAG,iBAAiB;IAClC,MAAM,KAAK,GAAG,cACZ,KAAK,EAAE;IACT,OAAO;KAAC,KAAK;KAAI,IAAI,GAAG,KAAK,MAAM,CAAC;KAAG;KAAK;KAAI;IAAE;GACpD,GACA,aAAa,MAAM;IACjB,IAAI,CAAC,IAAI,YAAY;IACrB,MAAM,CAAC,IAAI,MAAM,OAAO,CAAC,GACvB,KAAK,IAAI,GAAG,IAAI,GAAG,aAAa,EAAE,CAAC;IACrC,IAAI,UAAU,MAAM,UAAU,IAAI;KAChC,IAAI,MAAM,UAAU;KACpB,aAAa,SAAS;KACtB,YAAY,iBAAkB,IAAI,MAAM,UAAU,GAAI,GAAG;IAC3D;IACA,SAAS;IACT,GAAG,MAAM,aAAa,IAAI,MAAO,KAAK,KAAM,EAAE,IAAI;GACpD,GACA,UAAU,MAAM;IACd,IAAI,YAAY;IAChB,MAAM,KAAK,EAAE;IACb,GAAG,kBAAkB,EAAE,SAAS;IAChC,GAAG,UAAU,IAAI,IAAI;IACrB,IAAI,KAAK,IAAI,IAAI;IACjB,IAAI,MAAM,EAAE;IACZ,MAAM,eAAe;KACjB,GAAG,UAAU,OAAO,IAAI;KACxB,IAAI,KAAK,OAAO,IAAI;KACpB,OAAO;KACP,aAAa;IACf,GACA,SAAS,GAAG,IAAI;KACd,cAAc,MAAM;MAClB,MAAM,CAAC,IAAI,MAAM,OAAO;MACxB,GAAG,eAAe,MAAO,MAAM,EAAE,cAAc,OAAQ,EAAE;MACzD,MAAM,EAAE;KACV;KACA,WAAW;KACX,oBAAoB;IACtB,CAAC;IACH,aAAa;GACf,GACA,WAAW,MAAM;IACf,MACE,MADW,IAAI,sBACN,EAAE,YACX,CAAC,IAAI,IAAI,OAAO,OAAO;IACzB,GAAG,cAAc,MAAM,KAAK,IAAI,KAAK,EAAE,cAAc,MAAM,IAAI,MAAM,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC;IACpF,OAAO,CAAC;GACV,GACA,SAAS;IACP,GAAG,KAAK,EAAE,aAAa,QAAQ,CAAC;IAChC,GAAG,IAAI,EACL,cAAc,MAAM;KAClB,EAAE,gBAAgB;KAClB,OAAO,CAAC;IACV,EACF,CAAC;IACD,GAAG,IAAI,EAAE,QAAQ,UAAU,KAAK,MAAM,KAAA,CAAS,EAAE,CAAC;GACpD,GACA,KAAK,IAAI,qBAAqB;IAC5B,aAAa,YAAY;IACzB,eAAe,iBAAiB;KAC9B,MAAM,OAAO,IAAI,MAAM,OAAO;KAE9B,IADY,KAAK,IACJ;MACX,IAAI,IAAI,cAAc,IAAI,GAAG,YAAY,GAAG;MAC5C,MAAM,IAAI,IAAI,IAAI,MAAO,KAAK,KAAM,EAAE,CAAC;MACvC,GAAG,MAAM,cAAc,IAAI;MAC3B,UAAU,CAAC;KACb,OAAO,IAAI,IAAI,YACb,IAAI,OAAO;IAEf,GAAG,GAAG;GACR,CAAC,GACD,gBAAgB;IACd,aAAa,SAAS;IACtB,aAAa,YAAY;IACzB,OAAO,SAAS,MAAM,EAAE,CAAC;IACzB,IAAI,YAAY,WAAW;IAC3B,GAAG,WAAW;IACd,IAAI,IAAI,YAAY,IAAI,OAAO;GACjC;GACF,IAAI,MAAM,UAAU;GACpB,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,GAAG,QAAQ,CAAC,CAAC;GACpC,OAAO;EACT;CACF;CAEF,CACE;EAAC;EAAK;EAAU;EAAO;EAAK;CAAkD,GAC9E;EAAC;EAAK;EAAS;EAAQ;EAAK;CAA8C,CAC5E,EAAE,KAAK,CAAC,QAAQ,MAAM,KAAK,MAAM,SAAS;EACxC,MAAM,aAAa,SAAS,MAAM,KAAK,IAAI;EAC3C,eAAe,OACb,SAAS,WACT,cAAc,YAAY;GACxB,oBAAoB;IAClB,MAAM,UAAU,GAAG,KAAK,IAAI,GAAG,MAAM,CAAC,GACpC,UAAU,GAAG,KAAK,UAAU,OAAO;IACrC,QAAQ,MAAM,UAAU,kBAAkB;IAC1C,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC,EAAE,YAAY,OAAO;IACvD,KAAK,UAAU,WAAW,OAAO;GACnC;GACA,uBAAuB;IACrB,KAAK,UAAU;GACjB;EACF,CACF;CACF,CAAC;AACH,GAAG"}
1
+ {"version":3,"file":"Scroll.js","names":[],"sources":["../../com/Scroll/Scroll.js"],"sourcesContent":["import { On } from \"x/On.js\";\nimport { D, newEl } from \"x/dom.js\";\n\n(() => {\n const { round, max, min } = Math,\n PART = \"part\",\n BAR = \"bar\",\n SI = \"si\",\n DRAG = \"drag\",\n PX = \"px\",\n mk = (tag, part, ...kids) => {\n const e = newEl(tag);\n if (part) e.setAttribute(PART, part);\n e.append(...kids);\n return e;\n },\n mkScroll = (size, pos, axis) => {\n const style_size = size.toLowerCase(),\n style_pos = pos.toLowerCase(),\n client_size = \"client\" + size,\n scroll_size = \"scroll\" + size,\n scroll_pos = \"scroll\" + pos,\n client_pos = \"client\" + axis;\n return (ct) => {\n let timer_bar,\n ptr_unbind,\n timer_resize,\n pre_st = -1;\n const m = ct.firstElementChild,\n si = mk(\"i\", SI),\n bar = mk(\"b\", BAR, si),\n getGeo = (sih = si[client_size]) => {\n const ch = ct[client_size],\n sh = m[scroll_size];\n return [sh - ch, max(1, ch - sih - 6), sih, ch, sh];\n },\n updateTop = (h) => {\n if (!bar.parentNode) return;\n const [ds, db] = getGeo(h),\n st = max(0, min(ct[scroll_pos], ds));\n if (pre_st != -1 && pre_st != st) {\n bar.style.opacity = 1;\n clearTimeout(timer_bar);\n timer_bar = setTimeout(() => (bar.style.opacity = 0), 1e3);\n }\n pre_st = st;\n si.style[style_pos] = 3 + round((db * st) / ds) + PX;\n },\n onDown = (e) => {\n if (ptr_unbind) return;\n const bd = D.body;\n bd.setPointerCapture(e.pointerId);\n bd.classList.add(DRAG);\n bar.part.add(DRAG);\n let pre = e[client_pos];\n const detach = () => {\n bd.classList.remove(DRAG);\n bar.part.remove(DRAG);\n un_ptr();\n ptr_unbind = null;\n },\n un_ptr = On(bd, {\n pointermove: (e) => {\n const [ds, db] = getGeo();\n ct[scroll_pos] += round((ds * (e[client_pos] - pre)) / db);\n pre = e[client_pos];\n },\n pointerup: detach,\n lostpointercapture: detach,\n });\n ptr_unbind = detach;\n },\n onClick = (e) => {\n const rect = bar.getBoundingClientRect(),\n top = rect[style_pos],\n [ds, db, sih] = getGeo();\n ct[scroll_pos] = round(ds * max(min((e[client_pos] - top - 3 - sih / 2) / db, 1), 0));\n onDown(e);\n },\n unbind = [\n On(bar, { pointerdown: onClick }),\n On(si, {\n pointerdown: (e) => {\n e.stopPropagation();\n onDown(e);\n },\n }),\n On(ct, { scroll: updateTop.bind(null, undefined) }),\n ],\n ob = new ResizeObserver(() => {\n clearTimeout(timer_resize);\n timer_resize = setTimeout(() => {\n const [, , , ch, sh] = getGeo(),\n is_turn = ch < sh;\n if (is_turn) {\n if (bar.parentNode != ct) ct.appendChild(bar);\n const h = max(16, round((ch * ch) / sh));\n si.style[style_size] = h + PX;\n updateTop(h);\n } else if (bar.parentNode) {\n bar.remove();\n }\n }, 200);\n }),\n destroy = () => {\n clearTimeout(timer_bar);\n clearTimeout(timer_resize);\n unbind.forEach((f) => f());\n if (ptr_unbind) ptr_unbind();\n ob.disconnect();\n if (bar.parentNode) bar.remove();\n };\n bar.style.opacity = 0;\n [ct, m].forEach((i) => ob.observe(i));\n return destroy;\n };\n };\n\n [\n [\"v\", \"Height\", \"Top\", \"Y\", \"flex-direction:column;width:100%;min-height:100%\"],\n [\"h\", \"Width\", \"Left\", \"X\", \"min-width:100%;width:max-content;height:100%\"],\n ].map(([prefix, size, pos, axis, css]) => {\n const initScroll = mkScroll(size, pos, axis);\n customElements.define(\n prefix + \"-scroll\",\n class extends HTMLElement {\n connectedCallback() {\n const content = mk(\"b\", \"\", mk(\"slot\")),\n wrapper = mk(\"b\", \"scroll\", content);\n content.style.cssText = \"display:flex;\" + css;\n this.attachShadow({ mode: \"open\" }).appendChild(wrapper);\n this._unbind = initScroll(wrapper);\n }\n disconnectedCallback() {\n this._unbind?.();\n }\n },\n );\n });\n})();\n"],"mappings":"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"}
package/Wait.css CHANGED
@@ -1 +1,2 @@
1
- :root{--waitSvg:url(./svg/-oloHJiPWtJPJs8g_0WIaA.svg)}.wait,.ing{position:relative}.wait:before,.ing:before{background:var(--waitSvg) 50% 50%/64px no-repeat;content:"";cursor:wait;z-index:999;animation-name:fadeIn;animation-duration:1s;position:absolute;inset:0}.ing:before{background-color:#fff9}.wait{align-self:center;width:64px;height:64px;display:flex}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
1
+ :root{--waitSvg:url(-oloHJiPWtJPJs8g_0WIaA.svg)}.wait,.ing{position:relative}.wait:before,.ing:before{background:var(--waitSvg) 50% 50%/64px no-repeat;content:"";cursor:wait;z-index:999;animation-name:fadeIn;animation-duration:1s;position:absolute;inset:0}.ing:before{background-color:#fff9}.wait{align-self:center;width:64px;height:64px;display:flex}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
2
+ /*# sourceMappingURL=Wait.css.map */
package/Wait.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":null,"mappings":"AAAA,sDAGA,6BAIA,mLAcA,mCAGA,4DAMA","sources":["Users/z/git/webc-zh/lib/Wait.css"],"sourcesContent":[":root {\n --waitSvg: url(\"./svg/-oloHJiPWtJPJs8g_0WIaA.svg\");\n}\n.wait,\n.ing {\n position: relative;\n}\n.wait:before,\n.ing:before {\n animation-duration: 1s;\n animation-name: fadeIn;\n background: var(--waitSvg) 50% 50%/64px no-repeat;\n bottom: 0;\n content: '';\n cursor: wait;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 999;\n}\n.ing:before {\n background-color: rgba(255,255,255,0.6);\n}\n.wait {\n align-self: center;\n display: flex;\n height: 64px;\n width: 64px;\n}\n@-moz-keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@-webkit-keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@-o-keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n"],"names":[]}
1
+ {"version":3,"sourceRoot":null,"mappings":"AAAA,gDACA,6BAA6B,mLAAmL,mCAAmC,4DAA4D","sources":["Wait.css"],"sourcesContent":[":root{--waitSvg:url(\"-oloHJiPWtJPJs8g_0WIaA.svg\")}\n.wait,.ing{position:relative}.wait:before,.ing:before{background:var(--waitSvg) 50% 50%/64px no-repeat;content:\"\";cursor:wait;z-index:999;animation-name:fadeIn;animation-duration:1s;position:absolute;inset:0}.ing:before{background-color:#fff9}.wait{align-self:center;width:64px;height:64px;display:flex}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}"],"names":[]}
@@ -1 +1,2 @@
1
- v-scroll,h-scroll{display:block}v-scroll::part(scroll),h-scroll::part(scroll){scrollbar-width:none;width:100%;height:100%;display:flex;position:relative;overflow:auto}v-scroll::part(scroll)::-webkit-scrollbar,h-scroll::part(scroll)::-webkit-scrollbar{display:none}v-scroll::part(bar),h-scroll::part(bar){user-select:none;z-index:999;--si-anim:none;--si-bg:#7d7d7d99;transition:all .2s,opacity 1s,box-shadow 1s;display:block;position:sticky;bottom:0}v-scroll::part(bar):hover,h-scroll::part(bar):hover,v-scroll::part(drag),h-scroll::part(drag){--si-anim:v-scroll-pop .4s ease-out;--si-bg:#7d7d7dcc;background:#0000000d;box-shadow:inset 0 1px 6px #fffc,inset 0 -2px 8px #0000000a,inset 0 0 0 1px #ffffff80;opacity:1!important}v-scroll::part(si),h-scroll::part(si){animation:var(--si-anim);background:var(--si-bg);border-radius:3px;margin:auto;transition:all .2s,opacity 1s,box-shadow 1s;display:block;position:absolute}v-scroll{--sh:inset 3px 0 3px -3px #0000004d, inset -3px 0 3px -3px #0000000d;width:100%;height:100%}v-scroll::part(scroll){overflow-x:hidden}v-scroll::part(bar){width:13px;height:100%;margin-left:-13px;top:0;left:100%}v-scroll::part(bar):hover,v-scroll::part(drag){cursor:var(--cursorScrollvSvg);width:21px;margin-left:-21px}v-scroll::part(si){cursor:var(--cursorScrollvSvg);width:7px;left:0;right:0}h-scroll{--sh:inset 0 3px 3px -3px #0000004d, inset 0 -3px 3px -3px #0000000d;width:100%}h-scroll::part(scroll){width:100%;display:block;overflow-y:hidden}h-scroll::part(bar){width:100%;height:13px;margin-top:-13px;left:0;right:0}h-scroll::part(bar):hover,h-scroll::part(drag){cursor:var(--cursorScrollhSvg);height:21px;margin-top:-21px}h-scroll::part(si){cursor:var(--cursorScrollhSvg);height:7px;top:0;bottom:0}body.drag{cursor:var(--cursorGrabSvg)!important}@-webkit-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@-moz-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@-o-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}
1
+ v-scroll,h-scroll{display:block}v-scroll::part(scroll),h-scroll::part(scroll){scrollbar-width:none;width:100%;height:100%;display:flex;position:relative;overflow:auto}v-scroll::part(scroll)::-webkit-scrollbar,h-scroll::part(scroll)::-webkit-scrollbar{display:none}v-scroll::part(bar),h-scroll::part(bar){user-select:none;z-index:999;--si-anim:none;--si-bg:#7d7d7d99;transition:all .2s,opacity 1s,box-shadow 1s;display:block;position:sticky;bottom:0}v-scroll::part(bar):hover,h-scroll::part(bar):hover,v-scroll::part(drag),h-scroll::part(drag){--si-anim:v-scroll-pop .4s ease-out;--si-bg:#7d7d7dcc;background:#0000000d;box-shadow:inset 0 1px 6px #fffc,inset 0 -2px 8px #0000000a,inset 0 0 0 1px #ffffff80;opacity:1!important}v-scroll::part(si),h-scroll::part(si){animation:var(--si-anim);background:var(--si-bg);border-radius:3px;margin:auto;transition:all .2s,opacity 1s,box-shadow 1s;display:block;position:absolute}v-scroll{--sh:inset 3px 0 3px -3px #0000004d, inset -3px 0 3px -3px #0000000d;width:100%;height:100%}v-scroll::part(scroll){overflow-x:hidden}v-scroll::part(bar){width:13px;height:100%;margin-left:-13px;top:0;left:100%}v-scroll::part(bar):hover,v-scroll::part(drag){cursor:var(--cursorScrollvSvg);width:21px;margin-left:-21px}v-scroll::part(si){cursor:var(--cursorScrollvSvg);width:7px;left:0;right:0}h-scroll{--sh:inset 0 3px 3px -3px #0000004d, inset 0 -3px 3px -3px #0000000d;width:100%}h-scroll::part(scroll){width:100%;display:block;overflow-y:hidden}h-scroll::part(bar){width:100%;height:13px;margin-top:-13px;left:0;right:0}h-scroll::part(bar):hover,h-scroll::part(drag){cursor:var(--cursorScrollhSvg);height:21px;margin-top:-21px}h-scroll::part(si){cursor:var(--cursorScrollhSvg);height:7px;top:0;bottom:0}body.drag{cursor:var(--cursorGrabSvg)!important}@-webkit-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@-moz-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@-o-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}
2
+ /*# sourceMappingURL=_Scroll.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":null,"mappings":"AAAA,gCAAgC,uIAAuI,iGAAiG,yLAAyL,mRAAmR,iMAAiM,qGAAqG,yCAAyC,6EAA6E,2GAA2G,2EAA2E,yFAAyF,kEAAkE,2EAA2E,2GAA2G,4EAA4E,gDAAgD","sources":["_Scroll.css"],"sourcesContent":["v-scroll,h-scroll{display:block}v-scroll::part(scroll),h-scroll::part(scroll){scrollbar-width:none;width:100%;height:100%;display:flex;position:relative;overflow:auto}v-scroll::part(scroll)::-webkit-scrollbar,h-scroll::part(scroll)::-webkit-scrollbar{display:none}v-scroll::part(bar),h-scroll::part(bar){user-select:none;z-index:999;--si-anim:none;--si-bg:#7d7d7d99;transition:all .2s,opacity 1s,box-shadow 1s;display:block;position:sticky;bottom:0}v-scroll::part(bar):hover,h-scroll::part(bar):hover,v-scroll::part(drag),h-scroll::part(drag){--si-anim:v-scroll-pop .4s ease-out;--si-bg:#7d7d7dcc;background:#0000000d;box-shadow:inset 0 1px 6px #fffc,inset 0 -2px 8px #0000000a,inset 0 0 0 1px #ffffff80;opacity:1!important}v-scroll::part(si),h-scroll::part(si){animation:var(--si-anim);background:var(--si-bg);border-radius:3px;margin:auto;transition:all .2s,opacity 1s,box-shadow 1s;display:block;position:absolute}v-scroll{--sh:inset 3px 0 3px -3px #0000004d, inset -3px 0 3px -3px #0000000d;width:100%;height:100%}v-scroll::part(scroll){overflow-x:hidden}v-scroll::part(bar){width:13px;height:100%;margin-left:-13px;top:0;left:100%}v-scroll::part(bar):hover,v-scroll::part(drag){cursor:var(--cursorScrollvSvg);width:21px;margin-left:-21px}v-scroll::part(si){cursor:var(--cursorScrollvSvg);width:7px;left:0;right:0}h-scroll{--sh:inset 0 3px 3px -3px #0000004d, inset 0 -3px 3px -3px #0000000d;width:100%}h-scroll::part(scroll){width:100%;display:block;overflow-y:hidden}h-scroll::part(bar){width:100%;height:13px;margin-top:-13px;left:0;right:0}h-scroll::part(bar):hover,h-scroll::part(drag){cursor:var(--cursorScrollhSvg);height:21px;margin-top:-21px}h-scroll::part(si){cursor:var(--cursorScrollhSvg);height:7px;top:0;bottom:0}body.drag{cursor:var(--cursorGrabSvg)!important}@-webkit-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@-moz-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@-o-keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}@keyframes v-scroll-pop{0%{transform:scale(1)}40%{transform:scale(1.15)}to{transform:scale(1)}}"],"names":[]}
@@ -1 +1,2 @@
1
- .wait,.ing{position:relative}.wait:before,.ing:before{background:var(--waitSvg) 50% 50%/64px no-repeat;content:"";cursor:wait;z-index:999;animation-name:fadeIn;animation-duration:1s;position:absolute;inset:0}.ing:before{background-color:#fff9}.wait{align-self:center;width:64px;height:64px;display:flex}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
1
+ .wait,.ing{position:relative}.wait:before,.ing:before{background:var(--waitSvg) 50% 50%/64px no-repeat;content:"";cursor:wait;z-index:999;animation-name:fadeIn;animation-duration:1s;position:absolute;inset:0}.ing:before{background-color:#fff9}.wait{align-self:center;width:64px;height:64px;display:flex}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
2
+ /*# sourceMappingURL=_Wait.css.map */
package/_Wait.css.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":null,"mappings":"AAAA,6BAA6B,mLAAmL,mCAAmC,4DAA4D","sources":["_Wait.css"],"sourcesContent":[".wait,.ing{position:relative}.wait:before,.ing:before{background:var(--waitSvg) 50% 50%/64px no-repeat;content:\"\";cursor:wait;z-index:999;animation-name:fadeIn;animation-duration:1s;position:absolute;inset:0}.ing:before{background-color:#fff9}.wait{align-self:center;width:64px;height:64px;display:flex}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}"],"names":[]}
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"webc.site","version":"0.1.23","description":"","keywords":[],"homepage":"https://webc-zh.github.io","license":"MulanPSL-2.0","author":"i18n.site@gmail.com","repository":{"type":"git","url":"git+https://github.com/webc-zh/webc-zh.github.io.git"},"bin":{"webc-i":"./cli.js"},"files":["./*"],"type":"module","exports":{"./*":"./*"},"scripts":{},"dependencies":{"@3-/read":"^0.1.4","stylus":"^0.64.0","tar":"^7.5.15","yargs":"^18.0.0"},"devDependencies":{}}
1
+ {"name":"webc.site","version":"0.1.25","description":"","keywords":[],"homepage":"https://webc-zh.github.io","license":"MulanPSL-2.0","author":"i18n.site@gmail.com","repository":{"type":"git","url":"git+https://github.com/webc-zh/webc-zh.github.io.git"},"bin":{"webc-i":"./cli.js"},"files":["./*"],"type":"module","exports":{"./*":"./*"},"scripts":{},"dependencies":{"@3-/read":"^0.1.4","ansis":"^4.3.0","stylus":"^0.64.0","tar":"^7.5.15","yargs":"^18.0.0"},"devDependencies":{}}
package/reset.css ADDED
@@ -0,0 +1,2 @@
1
+ *,:before,:after{border-color:var(--un-default-border-color,#e5e7eb) ;box-sizing:border-box;border-style:solid;border-width:0}html,:host{font-feature-settings:normal ;font-variation-settings:normal ;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent ;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit ;margin:0}hr{color:inherit ;border-top-width:1px;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal ;font-variation-settings:normal ;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse ;border-color:inherit ;text-indent:0}button,input,optgroup,select,textarea{color:inherit ;font-feature-settings:inherit ;font-variation-settings:inherit ;font-family:inherit;font-size:100%;font-weight:inherit ;line-height:inherit ;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px ;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit ;-webkit-appearance:button}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}
2
+ /*# sourceMappingURL=reset.css.map */
package/reset.css.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":null,"mappings":"AAQA,8HAiBA,4SAeA,mCASA,gDAQA,qDAMA,wDAYA,wCAOA,4BAUA,kMAYA,oBAMA,8EAOA,kBAGA,cAQA,oEAUA,qNAkBA,kCAQA,gGAaA,6BAMA,iCAMA,iCAMA,oEAQA,gEAOA,oDAOA,qEAOA,0BAMA,4DAeA,4BAIA,iBAGA,8CAOA,iBAMA,yBAOA,iEAQA,oCAOA,yBAQA,mFAcA,qCAQA","sources":["Users/z/git/webc-zh/dist/webc.site/reset.css"],"sourcesContent":["/*\nPlease read: https://github.com/unocss/unocss/blob/main/packages-presets/reset/tailwind-compat.md\n*/\n/*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n2. [UnoCSS]: allow to override the default border color with css var `--un-default-border-color`\n*/\n*,\n::before,\n::after {\n border-color: var(--un-default-border-color, #e5e7eb) /* 2 */;\n border-style: solid /* 2 */;\n border-width: 0 /* 2 */;\n box-sizing: border-box /* 1 */;\n}\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS.\n*/\nhtml,\n:host {\n font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' /* 4 */;\n font-feature-settings: normal /* 5 */;\n font-variation-settings: normal /* 6 */;\n line-height: 1.5 /* 1 */;\n tab-size: 4 /* 3 */;\n -moz-tab-size: 4 /* 3 */;\n -webkit-tap-highlight-color: transparent /* 7 */;\n -webkit-text-size-adjust: 100% /* 2 */;\n}\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\nbody {\n line-height: inherit /* 2 */;\n margin: 0 /* 1 */;\n}\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\nhr {\n border-top-width: 1px /* 3 */;\n color: inherit /* 2 */;\n height: 0 /* 1 */;\n}\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\nabbr:where([title]) {\n text-decoration: underline dotted;\n}\n/*\nRemove the default font size and weight for headings.\n*/\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\na {\n color: inherit;\n text-decoration: inherit;\n}\n/*\nAdd the correct font weight in Edge and Safari.\n*/\nb,\nstrong {\n font-weight: bolder;\n}\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace /* 1 */;\n font-feature-settings: normal /* 2 */;\n font-size: 1em /* 4 */;\n font-variation-settings: normal /* 3 */;\n}\n/*\nAdd the correct font size in all browsers.\n*/\nsmall {\n font-size: 80%;\n}\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsub {\n bottom: -0.25em;\n}\nsup {\n top: -0.5em;\n}\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\ntable {\n border-collapse: collapse /* 3 */;\n border-color: inherit /* 2 */;\n text-indent: 0 /* 1 */;\n}\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit /* 1 */;\n font-family: inherit /* 1 */;\n font-feature-settings: inherit /* 1 */;\n font-size: 100% /* 1 */;\n font-variation-settings: inherit /* 1 */;\n font-weight: inherit /* 1 */;\n line-height: inherit /* 1 */;\n margin: 0 /* 2 */;\n padding: 0 /* 3 */;\n}\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\nbutton,\nselect {\n text-transform: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\nbutton,\n[type='button'],\n[type='reset'],\n[type='submit'] {\n/* Will affect the button style of most component libraries, so disable it */\n/* https://github.com/unocss/unocss/issues/2127 */\n/* background-color: transparent; !* 2 *! */\n background-image: none /* 2 */;\n -webkit-appearance: button /* 1 */;\n}\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n:-moz-focusring {\n outline: auto;\n}\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n:-moz-ui-invalid {\n box-shadow: none;\n}\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\nprogress {\n vertical-align: baseline;\n}\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n[type='search'] {\n outline-offset: -2px /* 2 */;\n -webkit-appearance: textfield /* 1 */;\n}\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n::-webkit-file-upload-button {\n font: inherit /* 2 */;\n -webkit-appearance: button /* 1 */;\n}\n/*\nAdd the correct display in Chrome and Safari.\n*/\nsummary {\n display: list-item;\n}\n/*\nRemoves the default spacing for appropriate elements.\n*/\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\nfieldset {\n margin: 0;\n padding: 0;\n}\nlegend {\n padding: 0;\n}\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\ndialog {\n padding: 0;\n}\n/*\nPrevent resizing textareas horizontally by default.\n*/\ntextarea {\n resize: vertical;\n}\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\ninput::placeholder,\ntextarea::placeholder {\n color: #9ca3af /* 2 */;\n opacity: 1 /* 1 */;\n}\n/*\nSet the default cursor for buttons.\n*/\nbutton,\n[role='button'] {\n cursor: pointer;\n}\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block /* 1 */;\n vertical-align: middle /* 2 */;\n}\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\nimg,\nvideo {\n height: auto;\n max-width: 100%;\n}\n/*\nMake elements with the HTML hidden attribute stay hidden by default.\n*/\n[hidden]:where(:not([hidden='until-found'])) {\n display: none;\n}\n"],"names":[]}
package/Scroll._.css.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":null,"mappings":"AAAA,gCAIA,uIASA,iGAIA,yLAWA,mRAUA,iMAUA,qGAKA,yCAGA,6EAOA,2GAMA,2EAMA,yFAIA,kEAKA,2EAOA,2GAMA,4EAMA,gDAGA","sources":["Users/z/git/webc-zh/lib/Scroll._.css"],"sourcesContent":["v-scroll,\nh-scroll {\n display: block;\n}\nv-scroll::part(scroll),\nh-scroll::part(scroll) {\n display: flex;\n height: 100%;\n overflow: auto;\n position: relative;\n scrollbar-width: none;\n width: 100%;\n}\nv-scroll::part(scroll)::-webkit-scrollbar,\nh-scroll::part(scroll)::-webkit-scrollbar {\n display: none;\n}\nv-scroll::part(bar),\nh-scroll::part(bar) {\n bottom: 0;\n display: block;\n position: sticky;\n transition: all 0.2s, opacity 1s, box-shadow 1s;\n user-select: none;\n z-index: 999;\n --si-anim: none;\n --si-bg: rgba(125,125,125,0.6);\n}\nv-scroll::part(bar):hover,\nh-scroll::part(bar):hover,\nv-scroll::part(drag),\nh-scroll::part(drag) {\n background: rgba(0,0,0,0.051);\n box-shadow: inset 0 1px 6px rgba(255,255,255,0.8), inset 0 -2px 8px rgba(0,0,0,0.039), inset 0 0 0 1px rgba(255,255,255,0.502);\n opacity: 1 !important;\n --si-anim: v-scroll-pop 0.4s ease-out;\n --si-bg: rgba(125,125,125,0.8);\n}\nv-scroll::part(si),\nh-scroll::part(si) {\n animation: var(--si-anim);\n background: var(--si-bg);\n border-radius: 3px;\n display: block;\n margin: auto;\n position: absolute;\n transition: all 0.2s, opacity 1s, box-shadow 1s;\n}\nv-scroll {\n height: 100%;\n width: 100%;\n --sh: inset 3px 0 3px -3px rgba(0,0,0,0.302), inset -3px 0 3px -3px rgba(0,0,0,0.051);\n}\nv-scroll::part(scroll) {\n overflow-x: hidden;\n}\nv-scroll::part(bar) {\n height: 100%;\n left: 100%;\n margin-left: -13px;\n top: 0;\n width: 13px;\n}\nv-scroll::part(bar):hover,\nv-scroll::part(drag) {\n cursor: var(--cursorScrollvSvg);\n margin-left: -21px;\n width: 21px;\n}\nv-scroll::part(si) {\n cursor: var(--cursorScrollvSvg);\n left: 0;\n right: 0;\n width: 7px;\n}\nh-scroll {\n width: 100%;\n --sh: inset 0 3px 3px -3px rgba(0,0,0,0.302), inset 0 -3px 3px -3px rgba(0,0,0,0.051);\n}\nh-scroll::part(scroll) {\n display: block;\n overflow-y: hidden;\n width: 100%;\n}\nh-scroll::part(bar) {\n height: 13px;\n left: 0;\n margin-top: -13px;\n right: 0;\n width: 100%;\n}\nh-scroll::part(bar):hover,\nh-scroll::part(drag) {\n cursor: var(--cursorScrollhSvg);\n height: 21px;\n margin-top: -21px;\n}\nh-scroll::part(si) {\n bottom: 0;\n cursor: var(--cursorScrollhSvg);\n height: 7px;\n top: 0;\n}\nbody.drag {\n cursor: var(--cursorGrabSvg) !important;\n}\n@-moz-keyframes v-scroll-pop {\n 0% {\n transform: scale(1);\n }\n 40% {\n transform: scale(1.15);\n }\n 100% {\n transform: scale(1);\n }\n}\n@-webkit-keyframes v-scroll-pop {\n 0% {\n transform: scale(1);\n }\n 40% {\n transform: scale(1.15);\n }\n 100% {\n transform: scale(1);\n }\n}\n@-o-keyframes v-scroll-pop {\n 0% {\n transform: scale(1);\n }\n 40% {\n transform: scale(1.15);\n }\n 100% {\n transform: scale(1);\n }\n}\n@keyframes v-scroll-pop {\n 0% {\n transform: scale(1);\n }\n 40% {\n transform: scale(1.15);\n }\n 100% {\n transform: scale(1);\n }\n}\n"],"names":[]}
package/Wait._.css.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":null,"mappings":"AAAA,6BAIA,mLAcA,mCAGA,4DAMA","sources":["Users/z/git/webc-zh/lib/Wait._.css"],"sourcesContent":[".wait,\n.ing {\n position: relative;\n}\n.wait:before,\n.ing:before {\n animation-duration: 1s;\n animation-name: fadeIn;\n background: var(--waitSvg) 50% 50%/64px no-repeat;\n bottom: 0;\n content: '';\n cursor: wait;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 999;\n}\n.ing:before {\n background-color: rgba(255,255,255,0.6);\n}\n.wait {\n align-self: center;\n display: flex;\n height: 64px;\n width: 64px;\n}\n@-moz-keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@-webkit-keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@-o-keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n"],"names":[]}