agentcss 0.16.0 → 0.24.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.
Files changed (56) hide show
  1. package/02-primitives/choice/choice.css +31 -2
  2. package/02-primitives/input/input.css +14 -0
  3. package/02-primitives/progress/progress.css +56 -0
  4. package/02-primitives/skeleton/skeleton.css +18 -0
  5. package/02-primitives/switch/switch.css +61 -2
  6. package/02-primitives/timeline/README.md +70 -0
  7. package/02-primitives/timeline/demo.html +161 -0
  8. package/02-primitives/timeline/timeline.css +152 -0
  9. package/02-primitives/upload/README.md +142 -0
  10. package/02-primitives/upload/demo.html +318 -0
  11. package/02-primitives/upload/upload.css +490 -0
  12. package/02-primitives/upload/upload.js +676 -0
  13. package/03-patterns/drawer/drawer.js +30 -5
  14. package/04-recipes/app-shell/README.md +272 -0
  15. package/04-recipes/app-shell/app-shell.css +588 -0
  16. package/04-recipes/app-shell/demo.html +322 -0
  17. package/04-recipes/app-shell/shell-nav.js +288 -0
  18. package/04-recipes/table/table.css +22 -0
  19. package/AGENTS.md +8 -0
  20. package/API.md +4 -0
  21. package/CHANGELOG.md +763 -0
  22. package/CONTRIBUTING.md +22 -1
  23. package/README.md +17 -5
  24. package/README.zh-CN.md +16 -6
  25. package/START-HERE.md +12 -7
  26. package/ai/START-HERE.md +37 -3
  27. package/ai/behaviors.json +32 -0
  28. package/ai/cli.js +183 -25
  29. package/ai/components.json +185 -7
  30. package/ai/components.meta.json +13 -0
  31. package/ai/pitfalls-writing.json +119 -0
  32. package/ai/pitfalls.json +193 -0
  33. package/dist/02-primitives/choice/choice.css +1 -1
  34. package/dist/02-primitives/input/input.css +1 -1
  35. package/dist/02-primitives/progress/progress.css +1 -1
  36. package/dist/02-primitives/skeleton/skeleton.css +1 -1
  37. package/dist/02-primitives/switch/switch.css +1 -1
  38. package/dist/02-primitives/timeline/timeline.css +1 -0
  39. package/dist/02-primitives/upload/upload.css +1 -0
  40. package/dist/02-primitives/upload/upload.js +515 -0
  41. package/dist/03-patterns/drawer/drawer.js +14 -4
  42. package/dist/04-recipes/app-shell/app-shell.css +1 -0
  43. package/dist/04-recipes/app-shell/shell-nav.js +173 -0
  44. package/dist/04-recipes/table/table.css +1 -1
  45. package/dist/COSTS.md +12 -10
  46. package/docs/ACCESSIBILITY.md +20 -7
  47. package/docs/AI-CONTRACT.md +2 -0
  48. package/docs/BUDGET.md +179 -0
  49. package/docs/CONVENTIONS.md +3 -0
  50. package/docs/STABILITY.md +126 -0
  51. package/esm/index.mjs +2 -0
  52. package/esm/upload.mjs +7 -0
  53. package/index.html +5 -2
  54. package/llms-full.txt +153 -0
  55. package/llms.txt +55 -0
  56. package/package.json +4 -1
package/API.md CHANGED
@@ -75,6 +75,8 @@ import { Accordion, Tabs, Select } from 'agentcss/esm';
75
75
  | `Pagination` | ✅ | create | `create` `update` `pagesOf` |
76
76
  | `Accordion` | ✅ | **construct** | 实例方法在原型上:`toggle` `set` `bind` `init` … |
77
77
  | `Tabs` | ✅ | **construct** | 实例方法在原型上:`select` `focusables` `enabled` `rove` `bind`(方向键游走已并入 roving 核) |
78
+ | `Upload` | ✅ | **construct** | 实例方法在原型上:`add` `removeAt` `setProgress` `render` `destroy`(`new Upload(root, { maxSize, maxFiles })`;自动初始化时读 `data-max-size` / `data-max-files`)|
79
+ | `ShellNav` | ✅ | **construct** | 实例方法在原型上:`open` `close` `destroy`(`new ShellNav(root, { label, place })`)。本层只做接线,抽屉的行为由 drawer.js 提供 |
78
80
  | `Tooltip` | ✅ | attach | `attach` |
79
81
  | `Popover` | ✅ | attach | `attach` `closeAll` `current` |
80
82
  | `Overlay` | ✅ | direct | `dialog` `toast` |
@@ -139,6 +141,8 @@ window.ScientificPlot.render(el, {
139
141
  | `FLIP` | 否 | 必须 `FLIP.flip(...)` |
140
142
  | `ModelViewer` | 是 | 扫 `[data-mv]`(模型加载后自动 `update()`) |
141
143
  | `ScientificPlot` | 否 | 必须 `ScientificPlot.render(el, opts)` |
144
+ | `Upload` | 是 | 扫 `[data-upload]`,实例挂在 `el.uploadInstance`(幂等;缺 `.upload__input` 时 console.warn 后跳过该元素) |
145
+ | `ShellNav` | 是 | 扫 `[data-shell-nav]`(值 = 抽屉标题),实例挂在 `el.shellNavInstance`。幂等;缺 `Drawer` 或缺 `.shell__side` 时 console.warn 后跳过 —— **不注入按钮**,不留一个点不动的按钮 |
142
146
  <!-- autoinit-table:end -->
143
147
 
144
148
  **为什么不做成"全都自动"**:需要 options 的组件(`Select.create(root, opts)`)