@arshdelight/practi 0.25.1 → 0.27.0
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/dist/cmd/delete.js +69 -0
- package/dist/cmd/delete.js.map +1 -0
- package/dist/cmd/show.js +27 -0
- package/dist/cmd/show.js.map +1 -1
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/dist/render.js +4 -0
- package/dist/render.js.map +1 -1
- package/dist/web.js +38 -12
- package/dist/web.js.map +1 -1
- package/package.json +2 -2
- package/skills/use-practi/SKILL.md +148 -21
- package/skills/use-practi/examples/daily-folder-backup.json +102 -0
- package/skills/use-practi/examples/first-5k-in-8-weeks.json +88 -0
- package/skills/use-practi/examples/monthly-budget-routine.json +71 -0
- package/skills/use-practi/examples/pan-seared-steak.json +135 -0
- package/skills/use-practi/examples/patch-a-nail-hole.json +106 -0
- package/web-default/detail.html +3 -0
- package/web-default/detail.js +306 -40
- package/web-default/lang.js +24 -8
- package/web-default/style.css +87 -23
package/web-default/style.css
CHANGED
|
@@ -30,11 +30,12 @@
|
|
|
30
30
|
--ink: #111111; /* 正黑主墨(hub「字体尽量正黑」):正文/标题统一中性墨 */
|
|
31
31
|
--primary: #111827; /* =ink-900 */
|
|
32
32
|
--primary-foreground: #ffffff;
|
|
33
|
+
--secondary-brand: #24324B; /* =hub navy-900:步骤卡 / 选项卡悬停描边(hub ChildCard hover:border-secondary-brand) */
|
|
33
34
|
--muted: #F4F6F9; /* =ink-50 */
|
|
34
35
|
--muted-foreground: #72777E; /* =ink-500 */
|
|
35
36
|
--border: #E5E7EB; /* =ink-200 */
|
|
36
37
|
--radius: 8px;
|
|
37
|
-
/* 正墨透明度刻度(hub text-ink/40~
|
|
38
|
+
/* 正墨透明度刻度(hub text-ink/40~80 同口径:弱化文字不换色,只降透明度) */
|
|
38
39
|
--ink-a15: rgba(17, 17, 17, .15);
|
|
39
40
|
--ink-a30: rgba(17, 17, 17, .3);
|
|
40
41
|
--ink-a35: rgba(17, 17, 17, .35);
|
|
@@ -44,6 +45,8 @@
|
|
|
44
45
|
--ink-a55: rgba(17, 17, 17, .55);
|
|
45
46
|
--ink-a60: rgba(17, 17, 17, .6);
|
|
46
47
|
--ink-a65: rgba(17, 17, 17, .65);
|
|
48
|
+
--ink-a70: rgba(17, 17, 17, .7);
|
|
49
|
+
--ink-a80: rgba(17, 17, 17, .8);
|
|
47
50
|
}
|
|
48
51
|
* { box-sizing: border-box; }
|
|
49
52
|
/* 常驻滚动条水槽:内容超长时滚动条出现不再挤压视口,居中元素(操作区等)不左右平移 */
|
|
@@ -168,6 +171,43 @@ main.u-main { padding: 24px 24px 48px; }
|
|
|
168
171
|
.card-title { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
169
172
|
.card-excerpt { font-size: 14px; color: var(--ink-a60); margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
170
173
|
.card-excerpt .none { color: var(--ink-a40); }
|
|
174
|
+
/* 实践页的派生清单与动作页自己的声明是同一份清单组件(你会得到 / 需要准备):紧凑单行「名字 · 规格」。
|
|
175
|
+
清单常常一屏放不下(补墙篇 8 样东西),规格另起一行会把步骤目录整个挤出首屏。
|
|
176
|
+
序号自绘进条目(清单 list-style: none):整行「序号 + 名字 · 规格」是一块悬停高亮区——
|
|
177
|
+
用户 2026-11-24:悬停要把前面的数字加点也包进去。菜单默认不开,点击才在条目下方弹出步骤菜单
|
|
178
|
+
(hub ghost hover 口径:浅底高亮、不换字色) */
|
|
179
|
+
ol.flow-list { margin: 0; padding-left: 0; list-style: none; font-size: 15px; line-height: 1.5; color: var(--ink); }
|
|
180
|
+
ol.flow-list li { padding: 1px 0; }
|
|
181
|
+
.flow-item { position: relative; }
|
|
182
|
+
.flow-item.open { z-index: 30; } /* 开着菜单的条目压过其后的内容 */
|
|
183
|
+
.flow-idx { display: inline-block; min-width: 18px; margin-right: 2px; text-align: right; }
|
|
184
|
+
/* 条目行:宽度贴着内容(不横贯整列),向左探出 6px——高亮区从序号前一点开始,名字仍起在小节左边缘 */
|
|
185
|
+
.flow-toggle, .flow-row { display: inline-block; vertical-align: top; max-width: 100%; margin: 0 0 0 -6px; padding: 3px 8px 3px 3px; border: none; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.5; text-align: left; }
|
|
186
|
+
.flow-toggle { cursor: pointer; transition: background .15s; }
|
|
187
|
+
.flow-toggle:hover { background: var(--ink-50); }
|
|
188
|
+
.flow-toggle:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(17, 24, 39, .1); }
|
|
189
|
+
.flow-item .io-spec { display: inline; font-size: 14px; color: var(--ink-a45); margin-left: 6px; }
|
|
190
|
+
.flow-item .io-spec::before { content: '· '; }
|
|
191
|
+
/* 步骤菜单:条目下方的小卡(版本条的分支下拉同观感);下方放不下时向上弹(.up) */
|
|
192
|
+
.flow-menu { position: absolute; left: 0; top: 100%; margin-top: 4px; width: max-content; min-width: 240px; max-width: min(360px, 100%); max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--ink-200); border-radius: 6px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1); padding: 4px 0; }
|
|
193
|
+
.flow-menu[hidden] { display: none; }
|
|
194
|
+
.flow-menu.up { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 4px; }
|
|
195
|
+
.flow-menu-title { margin: 0; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--ink); }
|
|
196
|
+
.flow-option { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; color: var(--ink); font-size: 13px; line-height: 1.5; text-decoration: none; }
|
|
197
|
+
/* 菜单项 hover 只换底色:全局 a:hover 的下划线在这里压掉(用户 2026-11-24:相关步骤的 hover 不要下划线) */
|
|
198
|
+
.flow-option:hover { background: var(--ink-50); text-decoration: none; }
|
|
199
|
+
.flow-option-num { flex: none; min-width: 20px; color: var(--ink-a50); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; }
|
|
200
|
+
.flow-option-name { min-width: 0; overflow-wrap: anywhere; }
|
|
201
|
+
/* 注意事项(spec 2.2.0 的 notice 字段):独立提醒框,垫在节点的最下方(用户 2026-11-24 定)。
|
|
202
|
+
warning 族(50 底 / 200 描边 / 700 字),左侧 3px 竖线压出「提醒」的分量,hub 侧实现 notice 渲染时同观感 */
|
|
203
|
+
.notice { margin: 12px 0 4px; padding: 10px 14px; border: 1px solid var(--warning-200); border-left: 3px solid var(--warning-700); border-radius: var(--radius); background: var(--warning-50); }
|
|
204
|
+
.notice-label { font-size: 12px; font-weight: 600; color: var(--warning-700); margin-bottom: 2px; }
|
|
205
|
+
.notice-body { font-size: 14px; line-height: 1.65; color: var(--ink-800); }
|
|
206
|
+
.notice-body p { margin: 4px 0; }
|
|
207
|
+
.notice-body p:last-child { margin-bottom: 0; }
|
|
208
|
+
.notice-body code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; background: #fff; border: 1px solid var(--warning-200); border-radius: 4px; padding: 1px 5px; }
|
|
209
|
+
/* 实践页派生清单的槽位:聚合数据到达前占位,到达后就地填入(不重渲染整页,不抢滚动位置) */
|
|
210
|
+
.flows-slot:empty { display: none; }
|
|
171
211
|
/* 页脚行(hub InstanceCard 页脚:mt-2 text-sm ink/60 truncate);本地无头像,只出 owner/文件夹名 */
|
|
172
212
|
.card-foot { font-size: 14px; color: var(--ink-a60); margin: 8px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
173
213
|
.card-meta { font-size: 12px; color: var(--ink-a40); margin: 8px 0 0; font-variant-numeric: tabular-nums; }
|
|
@@ -193,7 +233,7 @@ main.u-main { padding: 24px 24px 48px; }
|
|
|
193
233
|
/* 内容列=详情页唯一的滚动容器(应用壳布局);gutter 常驻防长文档切换时内容左右微移 */
|
|
194
234
|
/*.detail 是滚动容器且拉满全宽——滚动条在窗口最右而非内容列右缘;
|
|
195
235
|
内容限宽由子元素承担(.nav 是 fixed 定位,排除在限宽外)*/
|
|
196
|
-
.detail { max-width: none; overflow-y: auto; scrollbar-gutter: stable; padding
|
|
236
|
+
.detail { max-width: none; overflow-y: auto; scrollbar-gutter: stable; padding: 18px 0 110px; } /* 顶部 18px:原内容列顶栏并入版本条后由它留出标题上方的呼吸 */
|
|
197
237
|
.detail > *:not(.nav) { max-width: 48rem; margin-inline: auto; }
|
|
198
238
|
.node-title { font-size: 22px; font-weight: 700; color: var(--ink); margin: 8px 0 4px; }
|
|
199
239
|
h2.node-title.child { font-size: 20px; }
|
|
@@ -282,12 +322,7 @@ h2.node-title.child { font-size: 20px; }
|
|
|
282
322
|
.prose th, .prose td { border: 1px solid var(--border); padding: 6px 12px; text-align: left; }
|
|
283
323
|
.prose th { background: var(--ink-50); font-weight: 600; }
|
|
284
324
|
.prose hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
|
|
285
|
-
|
|
286
|
-
ol.io-list { margin: 0; padding-left: 24px; font-size: 16px; line-height: 1.75; color: var(--ink); }
|
|
287
|
-
ol.io-list li { padding: 2px 0; }
|
|
288
|
-
/* spec 独立成行放在名字下方(弃括号内联),小一号弱化 */
|
|
289
|
-
.io-spec { display: block; font-size: 13px; line-height: 1.5; color: var(--ink-a45); }
|
|
290
|
-
.io-from, .att-meta { color: var(--ink-a35); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; }
|
|
325
|
+
.att-meta { color: var(--ink-a35); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; }
|
|
291
326
|
/* from 反解命中的 #编号引用:小号等宽+点状下划线提示可悬停(title=来源节点名) */
|
|
292
327
|
/* 通用悬停气泡(hub Tooltip.tsx 深色皮肤):#24292f 白字圆角,hover .5s 延迟出现 */
|
|
293
328
|
[data-tip] { position: relative; }
|
|
@@ -296,9 +331,6 @@ ol.io-list li { padding: 2px 0; }
|
|
|
296
331
|
/* 侧栏 tab 的气泡朝下翻:tab 贴侧栏顶,朝上会被 .side 的 overflow-y:auto 裁剪
|
|
297
332
|
(absolute 元素出不了滚动容器,非 z-index 问题),朝下空间无限不受裁 */
|
|
298
333
|
.side-tab[data-tip]::after { bottom: auto; top: calc(100% + 6px); }
|
|
299
|
-
/* from 反解命中的 #编号引用:可点跳转(data-path 委托) */
|
|
300
|
-
.io-ref { color: var(--ink-a50); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; cursor: pointer; border-bottom: 1px dotted var(--ink-a30); text-decoration: none; }
|
|
301
|
-
.io-ref:hover { color: var(--ink); text-decoration: none; }
|
|
302
334
|
.section-sm { margin-top: 18px; }
|
|
303
335
|
.section-sm .label { font-size: 12px; font-weight: 600; color: var(--ink-a55); margin-bottom: 6px; }
|
|
304
336
|
/* JSON 视图 label 行:label 居左 + 复制按钮居右(按钮复用 .codeblock-copy 深色样式,在浅底上取中性色) */
|
|
@@ -306,13 +338,16 @@ ol.io-list li { padding: 2px 0; }
|
|
|
306
338
|
.label-row .label { margin-bottom: 0; }
|
|
307
339
|
.label-row .json-copy { color: var(--ink-a40); }
|
|
308
340
|
.label-row .json-copy:hover { color: var(--ink); background: rgba(17, 17, 17, .06); }
|
|
309
|
-
|
|
341
|
+
/* 步骤卡(hub ChildCard 逐值对齐):圆角 10px、白底、节点名正黑、描述 80% 墨——hub 2026-10-19
|
|
342
|
+
用户拍板「内容文字不用灰」,此前这里的 65% / 45% 两档偏淡;hover=品牌蓝描边、不换底 */
|
|
343
|
+
.child-card { display: block; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; font-size: 14px; color: var(--ink); background: #fff; transition: border-color .15s; }
|
|
310
344
|
button.child-card { width: 100%; text-align: left; cursor: pointer; font: inherit; }
|
|
311
|
-
button.child-card:hover { border-color: var(--
|
|
312
|
-
.child-desc { font-size: 12px; color: var(--ink-
|
|
313
|
-
/*
|
|
314
|
-
.choice-card { display:
|
|
315
|
-
.choice-card:hover { border-color: var(--
|
|
345
|
+
button.child-card:hover { border-color: var(--secondary-brand); }
|
|
346
|
+
.child-desc { font-size: 12px; line-height: 1.625; color: var(--ink-a80); margin-top: 2px; display: block; }
|
|
347
|
+
/* 选项卡:hub 的选项与步骤是同一个 ChildCard 组件——同观感(此前是另一套:灰底 hover + 更大的内边距) */
|
|
348
|
+
.choice-card { display: block; width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; background: #fff; cursor: pointer; font: inherit; font-size: 14px; color: var(--ink); transition: border-color .15s; }
|
|
349
|
+
.choice-card:hover { border-color: var(--secondary-brand); }
|
|
350
|
+
.choice-body { display: block; }
|
|
316
351
|
/* 底部导航固定在视口底部:位置恒定,不随内容高度漂移;内行与正文列同宽对齐 */
|
|
317
352
|
/* 底部操作区:固定视口底悬浮于内容列上方,无分界线(仅极轻投影托起),行与正文列同宽 */
|
|
318
353
|
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; padding: 10px 24px; box-shadow: 0 -1px 8px rgba(0, 0, 0, .03); transition: right .25s ease; }
|
|
@@ -407,11 +442,41 @@ body.detail-page > header { flex: none; }
|
|
|
407
442
|
.web-toast { position: fixed; right: 16px; bottom: 16px; background: #fff; color: #1f2937; font-size: 13px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0, 0, 0, .08); display: flex; align-items: center; gap: 8px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; z-index: 110; }
|
|
408
443
|
.web-toast.show { opacity: 1; transform: translateY(0); }
|
|
409
444
|
|
|
410
|
-
/* ──
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
.
|
|
445
|
+
/* ── 版本条(hub 实例页「版本条」同款,2026-11-24):页眉之下、阅读区之上的整行,白底 + 底边线,
|
|
446
|
+
h-11;左=分支选择器 / N 个提交 / 同步状态徽标 / 创建于,右=文档动作(附件 / 信息)。
|
|
447
|
+
文档动作按钮=hub PopDocActions 图标钮口径:w-8 h-8、hover 只加深不换底。
|
|
448
|
+
z-40:分支下拉面板要盖住下方阅读区,又让位页眉 z-50 ── */
|
|
449
|
+
.version-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 24px; background: #fff; border-bottom: 1px solid var(--ink-200); position: relative; z-index: 40; user-select: none; }
|
|
450
|
+
.version-bar[hidden] { display: none; }
|
|
451
|
+
.vb-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
|
|
452
|
+
.vb-right { display: flex; align-items: center; gap: 8px; flex: none; }
|
|
453
|
+
/* 版本条按钮(hub h-7 px-2.5 rounded-md text-xs font-medium):分支选择器与「N 个提交」同形 */
|
|
454
|
+
.vb-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--ink-200); border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
|
|
455
|
+
.vb-btn:hover { border-color: var(--ink-300); background: var(--ink-50); text-decoration: none; }
|
|
456
|
+
.vb-btn svg { width: 13px; height: 13px; color: var(--ink-a40); flex: none; }
|
|
457
|
+
.vb-btn .chev { transition: transform .15s; }
|
|
458
|
+
.vb-btn.on .chev { transform: rotate(180deg); }
|
|
459
|
+
.vb-date { font-size: 12px; color: var(--ink-a40); white-space: nowrap; }
|
|
460
|
+
.vb-link { font-size: 12px; color: var(--primary); text-decoration: none; white-space: nowrap; }
|
|
461
|
+
.vb-link:hover { text-decoration: underline; }
|
|
462
|
+
/* 同步状态徽标:hub Badge「私密」档(border-ink-300 + 70% 墨);「有未推送」走 warning 档 */
|
|
463
|
+
.vb-badge { padding: 2px 8px; border-color: var(--ink-300); color: var(--ink-a70); }
|
|
464
|
+
/* 分支下拉面板(hub BranchSelector:w-72 白卡 + 投影 + 标题行;当前支浅底不可点、默认支带「默认」小徽) */
|
|
465
|
+
.branch-select { position: relative; }
|
|
466
|
+
.branch-menu { position: absolute; left: 0; top: 100%; margin-top: 6px; width: 288px; max-width: calc(100vw - 48px); max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--ink-200); border-radius: 6px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1); padding: 4px 0; }
|
|
467
|
+
.branch-menu-title { margin: 0; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--ink); }
|
|
468
|
+
.branch-option { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border: none; background: transparent; color: var(--ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
|
|
469
|
+
.branch-option:hover { background: var(--ink-50); }
|
|
470
|
+
.branch-option.on { background: rgba(17, 24, 39, .06); cursor: default; }
|
|
471
|
+
.branch-option svg { width: 13px; height: 13px; color: var(--ink-a35); flex: none; }
|
|
472
|
+
.branch-option .vb-check { color: var(--primary); }
|
|
473
|
+
.branch-name { flex: 1; min-width: 0; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
474
|
+
.branch-menu .branch-default { flex: none; font-size: 10px; padding: 1px 6px; border: 1px solid var(--ink-200); border-radius: 999px; color: var(--ink-a50); }
|
|
475
|
+
|
|
476
|
+
/* 版本条右侧的文档动作按钮:附件钮带计数、信息钮纯图标 */
|
|
477
|
+
.vb-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--ink-200); background: #fff; color: var(--ink-a50); border-radius: var(--radius); height: 32px; padding: 0 12px; font-size: 12px; font-weight: 500; font-family: inherit; cursor: pointer; text-decoration: none; transition: color .15s, border-color .15s; }
|
|
478
|
+
.vb-action:hover { color: var(--ink); border-color: var(--ink-300); text-decoration: none; }
|
|
479
|
+
.vb-action-icon { width: 32px; padding: 0; }
|
|
415
480
|
/* 文档信息/附件弹窗(hub AppDialog 同观感:白卡 16px 圆角、居中、遮罩;hub 浮层规则=模态统一 z-100) */
|
|
416
481
|
#info-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 100; display: flex; align-items: center; justify-content: center; }
|
|
417
482
|
.info-card { width: 320px; max-width: calc(100vw - 32px); background: #fff; border-radius: 16px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1); padding: 24px; }
|
|
@@ -428,7 +493,6 @@ body.detail-page > header { flex: none; }
|
|
|
428
493
|
.att-row a { color: var(--primary); text-decoration: none; font-weight: 500; }
|
|
429
494
|
.att-row a:hover { text-decoration: underline; }
|
|
430
495
|
.att-row .att-meta { display: block; font-size: 11px; color: var(--ink-a45); margin-top: 2px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
|
|
431
|
-
.topbar-right { display: flex; align-items: center; gap: 8px; }
|
|
432
496
|
.info-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 13px; color: var(--ink); }
|
|
433
497
|
.info-row .info-key { color: var(--ink-a60); }
|
|
434
498
|
/* 哈希整行按钮(hub InfoDialog 同款):指纹图标+等宽哈希+复制图标,hover 沉到全色 */
|