@lemoncat7/dsh-knowledge 2.3.3 → 2.3.4
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 +1 -1
- package/docs/ui-maintenance.md +97 -0
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +356 -205
- package/lib/client.js.map +4 -4
- package/lib/design-tokens.d.ts +12 -0
- package/lib/design-tokens.d.ts.map +1 -0
- package/lib/design-tokens.js +58 -0
- package/lib/design-tokens.js.map +1 -0
- package/lib/knowledge-activity-controller.d.ts +3 -8
- package/lib/knowledge-activity-controller.d.ts.map +1 -1
- package/lib/knowledge-activity-controller.js +19 -7
- package/lib/knowledge-activity-controller.js.map +1 -1
- package/lib/knowledge-activity-notes.d.ts.map +1 -1
- package/lib/knowledge-activity-notes.js +19 -10
- package/lib/knowledge-activity-notes.js.map +1 -1
- package/lib/knowledge-activity-panel.d.ts.map +1 -1
- package/lib/knowledge-activity-panel.js +32 -20
- package/lib/knowledge-activity-panel.js.map +1 -1
- package/lib/knowledge-activity-presentation.d.ts +14 -0
- package/lib/knowledge-activity-presentation.d.ts.map +1 -0
- package/lib/knowledge-activity-presentation.js +77 -0
- package/lib/knowledge-activity-presentation.js.map +1 -0
- package/lib/knowledge-activity-state.d.ts +17 -0
- package/lib/knowledge-activity-state.d.ts.map +1 -0
- package/lib/knowledge-activity-state.js +14 -0
- package/lib/knowledge-activity-state.js.map +1 -0
- package/lib/latest-request.d.ts +7 -0
- package/lib/latest-request.d.ts.map +1 -0
- package/lib/latest-request.js +14 -0
- package/lib/latest-request.js.map +1 -0
- package/lib/local-provider.d.ts +0 -2
- package/lib/local-provider.d.ts.map +1 -1
- package/lib/local-provider.js +2 -323
- package/lib/local-provider.js.map +1 -1
- package/lib/notes/share-page-styles.d.ts +2 -0
- package/lib/notes/share-page-styles.d.ts.map +1 -0
- package/lib/notes/share-page-styles.js +11 -0
- package/lib/notes/share-page-styles.js.map +1 -0
- package/lib/notes/share-page.d.ts.map +1 -1
- package/lib/notes/share-page.js +1 -8
- package/lib/notes/share-page.js.map +1 -1
- package/lib/storage/migrations.d.ts +5 -0
- package/lib/storage/migrations.d.ts.map +1 -0
- package/lib/storage/migrations.js +325 -0
- package/lib/storage/migrations.js.map +1 -0
- package/lib/theme-bridge.d.ts +9 -7
- package/lib/theme-bridge.d.ts.map +1 -1
- package/lib/theme-bridge.js +3 -23
- package/lib/theme-bridge.js.map +1 -1
- package/lib/web-note-editor-selection.d.ts.map +1 -1
- package/lib/web-note-editor-selection.js +50 -15
- package/lib/web-note-editor-selection.js.map +1 -1
- package/lib/web-note-editor.d.ts.map +1 -1
- package/lib/web-note-editor.js +15 -1
- package/lib/web-note-editor.js.map +1 -1
- package/lib/web.d.ts.map +1 -1
- package/lib/web.js +4 -0
- package/lib/web.js.map +1 -1
- package/package.json +1 -1
- package/web/app.js +78 -176
- package/web/design-tokens.css +1 -0
- package/web/dialogs.js +94 -0
- package/web/document-actions.js +68 -0
- package/web/index.html +1 -0
- package/web/model-catalog.js +22 -0
- package/web/note-editor.js +57 -57
- package/web/select-control.js +193 -0
- package/web/styles.css +93 -185
- package/web/ui-primitives.js +5 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## 兼容性
|
|
10
10
|
|
|
11
|
-
正式版 `2.3.
|
|
11
|
+
正式版 `2.3.4` 针对 DeepSeek Harness `0.1.2-rc.1` 构建并完成部署验证,需要 Node.js `22.19+` 或 `24+`。浏览器端使用该版本的 Session Controller、Renderer、Chat、Settings 与 Theme 插槽接口。
|
|
12
12
|
|
|
13
13
|
当前版本提供可部署的多知识库、按需检索工具、本地与远程中央服务、文档型 Web 管理台,以及全局回写策略与安全直写协调:
|
|
14
14
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# UI ownership and regression boundaries
|
|
2
|
+
|
|
3
|
+
The plugin owns its component appearance. DSH provides placement and light/dark
|
|
4
|
+
mode, not palette values from the active decorative theme. No private shared UI
|
|
5
|
+
package or DSH source patch is required.
|
|
6
|
+
|
|
7
|
+
## Responsibilities
|
|
8
|
+
|
|
9
|
+
- `src/design-tokens.ts`: canonical light/dark palette and font families. The
|
|
10
|
+
build generates `web/design-tokens.css` from this source; do not edit the
|
|
11
|
+
generated asset. Host client roots receive scoped copies of the same tokens.
|
|
12
|
+
Embedded workspace panes and the activity reader use `KNOWLEDGE_EMBEDDED_MATERIAL`
|
|
13
|
+
for the same surface, filter and control fill. Header/tab sections do not add
|
|
14
|
+
another tint layer; overlapping menus retain an opaque dialog surface.
|
|
15
|
+
- `src/theme-bridge.ts` and `web/host-theme.js`: versioned, validated iframe
|
|
16
|
+
theme transport. Only mode and allowlisted plugin tokens cross the boundary.
|
|
17
|
+
- `src/client.css` / `src/knowledge-activity.css`: host-side launcher, activity
|
|
18
|
+
reader and conversation status. Do not style host parents or sibling slots.
|
|
19
|
+
- `web/styles.css`: management-workspace layout and components. Embedded canvas
|
|
20
|
+
stays transparent; overlaid menus, mobile navigation and outline are solid
|
|
21
|
+
enough to prevent text from showing through.
|
|
22
|
+
- `web/ui-primitives.js`: DOM primitives, icons, actions and notifications.
|
|
23
|
+
- `web/document-actions.js`: one grouped overflow menu for knowledge and note
|
|
24
|
+
documents, with keyboard navigation, outside dismissal and listener cleanup.
|
|
25
|
+
Save state, outline and primary save remain outside at every viewport width;
|
|
26
|
+
find/history/export/share/rename and lifecycle actions stay in the same menu.
|
|
27
|
+
Do not recreate separate desktop/mobile copies of document actions. Keep the
|
|
28
|
+
editor's overlay stacking below its toolbar, and allow toolbar grid items to
|
|
29
|
+
shrink (`min-width: 0`) without clipping primary buttons.
|
|
30
|
+
Document menus use the neutral menu surface, not the brighter dialog surface:
|
|
31
|
+
high-opacity frost on desktop, solid fill on small/touch screens, reduced
|
|
32
|
+
transparency and browsers without backdrop-filter. Do not animate the filter.
|
|
33
|
+
- `web/dialogs.js`: dialog lifetime, dirty-form protection and keyboard focus.
|
|
34
|
+
- `web/select-control.js`: plugin-owned select appearance and listbox behavior;
|
|
35
|
+
native value, validation, reset and change semantics remain available to forms.
|
|
36
|
+
- `web/model-catalog.js`: coalesced discovery requests and expiring success cache.
|
|
37
|
+
Network or malformed-response failures must not be cached as empty catalogs.
|
|
38
|
+
- `src/knowledge-activity-state.ts`: per-session selection transitions. Changing
|
|
39
|
+
knowledge base clears an unrelated document; notes retain their own path.
|
|
40
|
+
Empty or not-yet-loaded sessions open the workspace because DSH does not
|
|
41
|
+
allocate a details column for those sessions.
|
|
42
|
+
- `src/knowledge-activity-presentation.tsx`: observes the host column transition,
|
|
43
|
+
holds the plugin reader at a stable width, and releases it after collapse.
|
|
44
|
+
Rapid reversal cancels release; reduced-motion needs no timed wait. Workspace
|
|
45
|
+
handoff releases immediately. Never change the host's CSS or DOM attributes.
|
|
46
|
+
- `src/latest-request.ts`: request cancellation owner, shared by initial load,
|
|
47
|
+
refresh and pagination. Ignore aborted responses before committing view state.
|
|
48
|
+
- `src/storage/migrations.ts`: versioned SQLite upgrades, preserving existing
|
|
49
|
+
schemas and transaction boundaries. The provider owns the database lifetime.
|
|
50
|
+
- `src/notes/share-page.ts` / `share-page-styles.ts`: safe shared-page rendering
|
|
51
|
+
and its stylesheet. Shared pages require no editor bundle or runtime framework.
|
|
52
|
+
|
|
53
|
+
## Performance rules
|
|
54
|
+
|
|
55
|
+
Menu visibility and loading progress updates must not reconstruct the workspace
|
|
56
|
+
or destroy note editor instances. Keep the heavyweight editor lazy-loaded.
|
|
57
|
+
Cancel superseded reads on navigation and unmount. Disconnect observers and
|
|
58
|
+
remove event listeners when their control lifetime ends. Prefer small targeted
|
|
59
|
+
updates over document-wide layout work or decorative animation.
|
|
60
|
+
|
|
61
|
+
Cards, buttons and selected tree rows stay in place: use color/border/focus
|
|
62
|
+
feedback, not floating transforms or animated shadows. Static metrics should
|
|
63
|
+
not pretend to be clickable. Skeletons are static except for one loading-status
|
|
64
|
+
indicator. Keep progress on transform rather than width, and do not animate the
|
|
65
|
+
desktop grid when resizing/collapsing navigation. Pointer resize writes are
|
|
66
|
+
coalesced per frame and flushed on release; keyboard resizing stays immediate.
|
|
67
|
+
Dialogs use a short fade without scaling text or fading the full backdrop;
|
|
68
|
+
mobile drawers retain directional motion. Reduced-motion disables animations
|
|
69
|
+
and transitions entirely, including infinite loaders. Pane material tokens are
|
|
70
|
+
independent of motion and must remain unchanged by performance adjustments.
|
|
71
|
+
|
|
72
|
+
The existing application orchestrator and provider remain public entry points;
|
|
73
|
+
this refactor does not replace persistence, authorization or write-back logic.
|
|
74
|
+
Further domain extraction should be driven by behavioral tests, not file-size
|
|
75
|
+
targets or another shared package dependency.
|
|
76
|
+
|
|
77
|
+
## Verification
|
|
78
|
+
|
|
79
|
+
Run `npm test` for API, persistence, permission, migration and UI-state tests.
|
|
80
|
+
For real Chromium checks, build first, then run:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
KNOWLEDGE_PLAYWRIGHT_MODULE=/path/to/playwright-core/index.mjs node scripts/verify-ui.mjs
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The browser check creates an isolated temporary database and note files. It
|
|
87
|
+
checks desktop/mobile/tablet widths, both modes, overflow, editor preservation,
|
|
88
|
+
custom-select keyboard/reset/validation, dynamic options and modal dismissal.
|
|
89
|
+
Screenshots are retained in the printed temporary directory for visual review.
|
|
90
|
+
It never writes to a live DSH profile.
|
|
91
|
+
|
|
92
|
+
`scripts/verify-activity-interaction.mjs` additionally checks the real host column
|
|
93
|
+
with an existing test session (read-only). Set `KNOWLEDGE_PLAYWRIGHT_MODULE`,
|
|
94
|
+
`DSH_BROWSER_STATE`, and `DSH_TEST_SESSION_TITLE`; optionally `DSH_TEST_URL`.
|
|
95
|
+
`KNOWLEDGE_LOCAL_BUNDLE=1` replaces only the knowledge bundle in the test browser
|
|
96
|
+
to verify a build before deployment. It checks stable reader width, rapid
|
|
97
|
+
close/open reversal, focus exclusion, release and reduced-motion behavior.
|
package/lib/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AA8CnE,MAAM,WAAW,4BAA4B;IAC3C,MAAM,IAAI,OAAO,CAAA;IACjB,IAAI,IAAI,IAAI,CAAA;IACZ,MAAM,IAAI,IAAI,CAAA;IACd,YAAY,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAA;IACnD,aAAa,IAAI,uBAAuB,GAAG,SAAS,CAAA;IACpD,KAAK,IAAI,IAAI,CAAA;IACb,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;CAC5C;AAED,MAAM,MAAM,uBAAuB,GAC/B;IAAE,IAAI,CAAC,EAAE,SAAS,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACjE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAsBtC,kDAAkD;AAClD,eAAO,MAAM,MAAM,UAA2C,CAAA;AAE9D,gFAAgF;AAChF,wBAAgB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAyB9C"}
|