hd-garden 0.14.2 → 0.14.5
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/.agents/skills/garden-compose/SKILL.md +14 -17
- package/.agents/skills/garden-compose/references/engine-gaps.md +8 -0
- package/.agents/skills/garden-compose/references/frames.md +6 -0
- package/.agents/skills/garden-compose/references/layout-recipes.md +53 -7
- package/.agents/skills/garden-compose/references/measured-connectors.js +94 -0
- package/.agents/skills/garden-compose/references/mobile-contract.md +23 -0
- package/.agents/skills/garden-compose/references/rendering-model.md +16 -2
- package/.agents/skills/garden-compose/references/visual-selection.md +23 -4
- package/.agents/skills/garden-compose/references/workflow.md +26 -0
- package/.agents/skills/garden-compose/scripts/lint-layout.mjs +87 -0
- package/app/components/PostReadingView.tsx +1 -1
- package/app/styles/a2.css +13 -1
- package/app/styles/shell.css +4 -4
- package/bin/garden.mjs +8 -2
- package/docs/handbook/components/compose.md +2 -0
- package/docs/handbook/en/components/compose.md +2 -0
- package/docs/handbook/en/reference/compose.md +7 -0
- package/docs/handbook/reference/compose.md +7 -0
- package/editors/dist/garden-typora-0.14.5.zip +0 -0
- package/editors/dist/typora/main.js +76 -77
- package/editors/dist/typora/manifest.json +7 -3
- package/editors/dist/typora/style.css +31 -18
- package/editors/dist/vscode/{garden-ui-0.14.2.vsix → garden-ui-0.14.5.vsix} +0 -0
- package/package.json +3 -2
- package/scripts/handbook-facts.mjs +5 -4
- package/scripts/pack-editors.mjs +8 -1
- package/scripts/rendered-site.mjs +130 -0
- package/scripts/sync-editor-version.mjs +5 -5
- package/templates/skills-en/garden-compose/SKILL.md +15 -17
- package/ui/compose/compose.css +6 -8
- package/ui/host.mjs +0 -1
- package/ui/preview/dist/garden-ui.css +31 -18
- package/ui/preview/dist/garden-ui.esm.js +77 -78
- package/ui/preview/dist/garden-ui.iife.js +77 -78
- package/ui/react/components/chart.tsx +2 -1
- package/ui/react/components/sandbox.tsx +3 -0
- package/ui/react/ui.css +12 -9
package/app/styles/shell.css
CHANGED
|
@@ -36,15 +36,15 @@ img,svg{max-width:100%}
|
|
|
36
36
|
/* ---------- header ---------- */
|
|
37
37
|
.sh-header{position:sticky;top:0;z-index:40;background:var(--paper);border-bottom:1px solid transparent;transition:border-color .2s ease}
|
|
38
38
|
.sh-header.is-scrolled{border-bottom-color:var(--rule)}
|
|
39
|
-
.sh-bar{max-width:var(--shell);margin:0 auto;height:var(--hdr);padding:0 32px;display:flex;align-items:center;gap:28px}
|
|
40
|
-
.sh-word{display:inline-flex;align-items:center;gap:10px;font:600 var(--fs-lead)/1 var(--serif);color:var(--ink);text-decoration:none;white-space:
|
|
39
|
+
.sh-bar{max-width:var(--shell);margin:0 auto;min-height:var(--hdr);height:auto;padding:0 32px;display:flex;align-items:center;gap:28px}
|
|
40
|
+
.sh-word{display:inline-flex;align-items:center;gap:10px;font:600 var(--fs-lead)/1 var(--serif);color:var(--ink);text-decoration:none;white-space:normal;overflow-wrap:anywhere;min-width:0;flex:0 1 auto;line-height:1.2;padding:8px 0}
|
|
41
41
|
.sh-mark{display:inline-flex;flex:none}
|
|
42
42
|
.sh-mark svg{display:block;height:26px;width:auto}
|
|
43
|
-
.sh-nav{display:flex;gap:4px;margin-left:auto}
|
|
43
|
+
.sh-nav{display:flex;flex-shrink:0;gap:4px;margin-left:auto}
|
|
44
44
|
.sh-nav a{font-size:15px;color:var(--soft);text-decoration:none;padding:8px 12px;border-radius:var(--r);transition:color .15s ease,background-color .15s ease}
|
|
45
45
|
.sh-nav a:hover{color:var(--ink);background:var(--tint)}
|
|
46
46
|
.sh-nav a[aria-current="page"],.sh-nav a[aria-current="true"]{color:var(--blue);font-weight:600}
|
|
47
|
-
.sh-tools{display:flex;align-items:center;gap:8px}
|
|
47
|
+
.sh-tools{display:flex;flex-shrink:0;align-items:center;gap:8px}
|
|
48
48
|
/* A hairline box so the entry reads as a field, not a stray word. */
|
|
49
49
|
.sh-search{display:inline-flex;align-items:center;gap:6px;box-sizing:border-box;height:34px;padding:0 10px 0 12px;border:1px solid var(--rule);background:transparent;color:var(--soft);border-radius:8px;font:400 15px/1 var(--sans);cursor:pointer;appearance:none;transition:color .15s ease,border-color .15s ease}
|
|
50
50
|
.sh-search:hover{color:var(--ink);border-color:var(--rule-strong)}
|
package/bin/garden.mjs
CHANGED
|
@@ -495,7 +495,7 @@ function help() {
|
|
|
495
495
|
garden files 读取 Compose <file> 里远程文件的大小,写入 file-sizes.json(build 时会自动做)
|
|
496
496
|
garden init [目录] 创建只含稿和配置的新站点
|
|
497
497
|
garden check <文章.md> 检查一篇博文的硬性结构
|
|
498
|
-
garden verify [文章.md|--diff] 全量/单篇/改动文档严格预检(包含草稿;make check 使用)
|
|
498
|
+
garden verify [文章.md|--diff|--rendered] 全量/单篇/改动文档严格预检(包含草稿;make check 使用)
|
|
499
499
|
garden ui <子命令> Intelligent UI:scan、check、apply、prompt、schema、catalog
|
|
500
500
|
garden hooks 安装提交前检查(检查暂存稿件里的 ui 块)
|
|
501
501
|
garden editors install 安装 Intelligent UI 插件到 VS Code / Cursor 与 Typora(--vscode、--typora、--yes)
|
|
@@ -544,6 +544,7 @@ async function main() {
|
|
|
544
544
|
runNode("scripts/html-lang.mjs");
|
|
545
545
|
// 404.html also under basePath when the host serves that folder alone.
|
|
546
546
|
runNode("scripts/static-404.mjs");
|
|
547
|
+
runNode("scripts/rendered-site.mjs");
|
|
547
548
|
}
|
|
548
549
|
break;
|
|
549
550
|
case "links":
|
|
@@ -565,7 +566,12 @@ async function main() {
|
|
|
565
566
|
runNode("scripts/fetch-embed.mjs", rest);
|
|
566
567
|
break;
|
|
567
568
|
case "verify":
|
|
568
|
-
|
|
569
|
+
if (rest[0] === "--rendered") {
|
|
570
|
+
if (rest.length !== 1) fail("Usage: garden verify --rendered");
|
|
571
|
+
runNode("scripts/rendered-site.mjs");
|
|
572
|
+
} else {
|
|
573
|
+
runNode("scripts/check-site.mjs", rest);
|
|
574
|
+
}
|
|
569
575
|
break;
|
|
570
576
|
case "check":
|
|
571
577
|
runNode("scripts/check-post.mjs", rest);
|
|
@@ -24,6 +24,8 @@ badge: compose
|
|
|
24
24
|
|
|
25
25
|
先说明视觉关系与重点,再使用受支持的属性表达必要样式。默认样式不保证复刻参考图,必须检查真实排版。
|
|
26
26
|
|
|
27
|
+
静态 Compose 最外层场景默认背景透明,边框、圆角与内边距仍保留。无底色不等于无外框;需要去掉整个场景外框时,使用唯一最外层 `<figure frame="none">…</figure>`。内部容器显式指定的背景、tone 与节点填色不受影响;全屏或弹层的背景由宿主单独处理。
|
|
28
|
+
|
|
27
29
|
**完整标签与属性**见 [组件参考 · compose](/garden/reference/compose);**全部图标名**见 [compose 图标](/garden/reference/compose-icons)。
|
|
28
30
|
|
|
29
31
|
## 写法对照
|
|
@@ -24,6 +24,8 @@ Cover four things:
|
|
|
24
24
|
|
|
25
25
|
Describe the visual relationships and desired emphasis. Defaults are a starting point, not a substitute for checking alignment and hierarchy. Explicit styling must use supported controls.
|
|
26
26
|
|
|
27
|
+
The outer static Compose scene is transparent by default; its border, corner radius, and padding remain. A transparent background does not remove the frame. To remove the entire scene frame, use one outer `<figure frame="none">…</figure>`. Explicit container backgrounds, tones, and node fills are unchanged. The host handles fullscreen or overlay backgrounds separately.
|
|
28
|
+
|
|
27
29
|
**Every tag and shared token**: [compose reference](/garden/en/reference/compose). **Every icon name**: [compose icons](/garden/en/reference/compose-icons).
|
|
28
30
|
|
|
29
31
|
## Rewrite patterns
|
|
@@ -109,3 +109,10 @@ Safe HTML supports allowlisted local `style` properties, including useful layout
|
|
|
109
109
|
3. Inspect the complete-theme render: icon rail fixed, heading and **all** paragraphs share the same right edge/left edge, no centered headings or full-width body beneath a detached icon row, dividers outside rows, no unintended cards/arrows, no horizontal overflow.
|
|
110
110
|
4. Check desktop and narrow screenshots plus geometry/computed styles; exercise choices, relations, file previews, state updates and sandbox behavior when used.
|
|
111
111
|
5. A hand-authored passing scene proves engine capability, not that an independent model reliably produces it from a short prompt. Report those claims separately.
|
|
112
|
+
|
|
113
|
+
## Host and exported-artifact acceptance
|
|
114
|
+
Explicit `justify` owns the main axis; `align` owns the cross axis. A title and trailing badge can use `row align="center" justify="between"`. Reading width takes priority over side rails; frameless runtimes do not add body padding; fullscreen controls use a separate top band. The post's mobile contents entry stays in normal flow. Measure the real column and iframe before changing content or type size.
|
|
115
|
+
|
|
116
|
+
Use native relations for ring-and-detail interactions. Custom topology stays in the same Compose entry, using an offline sandbox, HTML labels and connector-only SVG. The author skill includes a measured-endpoint recipe, not an automatic layout/obstacle router. An isolated iframe does not automatically inherit article web fonts.
|
|
117
|
+
|
|
118
|
+
Static builds check final HTML links, CSS/JS and lazy dependencies, Compose styles and navigation payloads. Rerun with `garden verify --rendered`. Asset integrity is not visual or client-lifecycle proof: test normal homepage Link entry, return/re-entry, history and direct links separately.
|
|
@@ -111,3 +111,10 @@ Safe HTML supports allowlisted local `style` properties, including useful layout
|
|
|
111
111
|
3. Inspect the complete-theme render: icon rail fixed, heading and **all** paragraphs share the same right edge/left edge, no centered headings or full-width body beneath a detached icon row, dividers outside rows, no unintended cards/arrows, no horizontal overflow.
|
|
112
112
|
4. Check desktop and narrow screenshots plus geometry/computed styles; exercise choices, relations, file previews, state updates and sandbox behavior when used.
|
|
113
113
|
5. A hand-authored passing scene proves engine capability, not that an independent model reliably produces it from a short prompt. Report those claims separately.
|
|
114
|
+
|
|
115
|
+
## 宿主与最终产物验收
|
|
116
|
+
显式 `justify` 管主轴,`align` 管交叉轴;标题+徽标可直接使用 `row align="center" justify="between"`。正文栏优先于侧栏,frame="none"不叠运行时内距,全屏按钮使用独立顶栏;手机目录入口随正文正常排版。先量真实正文/iframe宽度,不用缩字补救宿主挤压。
|
|
117
|
+
|
|
118
|
+
复杂连线:原生relations适用于环形关系与详情;自定义拓扑使用同一compose内的离线sandbox,普通HTML承载文字,SVG只画线。作者skill提供实测端点配方,不提供自动排图/避障。iframe字体须单独验证,不能声称隔离文档自动继承文章web字体。
|
|
119
|
+
|
|
120
|
+
静态构建自动检查最终HTML引用的CSS/JS及懒加载依赖、Compose样式与导航payload;`garden verify --rendered`可单独重跑。它不证明视觉或客户端导航;仍需测试首页正常Link、返回再入、历史及直接链接。
|
|
Binary file
|