@deepseek-ai/dsh-client-web 0.1.0-rc.8 → 0.1.1-rc.2

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.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/client/web/README.md
5
- README.md: c7b77d3eba8cf56017c816362e9ffc4fcb3be403
6
- README.zh.md: 2a52bcdfe7395466866b80160f0646cf3b7fe111
5
+ README.md: b4304ddc3f7d8fc0f8bfc5cb8373196a97e0273f
6
+ README.zh.md: 2da442289898ce4e8684d3733ebff5498a0b53f3
package/README.md CHANGED
@@ -8,7 +8,7 @@ The boot page uses plain DOM and local CSS, so client-bundle and plugin-activati
8
8
 
9
9
  `PLATFORM_MODULES` (src/platform.ts) is the single source of truth for shell-seeded shared modules. Together with `PRELOADED_CLIENT_EXTERNALS`, it defines the implicit external baseline for every dynamic bundle; `dsh.client.external` adds only exact non-baseline requests.
10
10
 
11
- The optional override parameter `seams` forwards the module system's `loadBundle` transport override (`BootSeams`) for environments where external `<script>` execution cannot reach the page context; ordinary browser callers omit it.
11
+ The optional override parameter `seams` forwards the module system's `loadBundle` transport override (`BootSeams`) for environments where external `<script>` execution cannot reach the page context; ordinary browser callers omit it. A pre-injected page transport is the default ahead of it: when `globalThis.__DSH_TRANSPORT__` (the connection package's `ClientTransportHooks`) carries `loadBundle`, the module stage adopts it as the bundle transport and skips the immediate-tier HTTP prefetch — explicit `seams` still win.
12
12
 
13
13
  ## Model Experience
14
14
 
package/README.zh.md CHANGED
@@ -4,11 +4,11 @@
4
4
 
5
5
  Web 启动内核:`new AppWebEntry(el, seams?).run()` 分两个阶段挂载客户端。模块阶段调用 Host 安装的 `window.__ModuleLoader__.create()`,传入 `window.__DSH_BOOT__`、外壳静态模块以及可选测试传输覆盖;facade 接纳 parser 预载的 registration 后返回构造好的模块系统与已解析 manifest。本包随后预取 `immediately` 层级。插件阶段挂载仓库内置的 Cordis Loader,通过 Loader 的 `internal` 接口注入该模块系统,统一创建全部图 entry,并等待每个 fiber 进入 ACTIVE。随后它把带标记的启动 DOM 交给动态 UI 渲染器的 `ctx.uiRenderer.mount(el)` 操作;渲染器先 hydrate 该 DOM,再切换到完整 UI。Graph、parser preload 与 facade 归 Host 所有;AppWebEntry 不感知 bootstrap package id,也不解析 wire 格式。
6
6
 
7
- 启动页只使用原生 DOM 与本地 CSS,因此客户端 bundle 或插件激活失败时仍能显示。其回退字体和颜色与加载期间到达的主题 token 一致。fiber 更新会保留同一个 spinner 节点,并在 entry 首次进入 active 时增长其 CSS 圆弧;hydrate 会继续保留该节点及其动画相位,直到应用提交。React 挂载、slot 渲染、应用组装和浏览器标题投影位于 [`ui-renderer`](../ui-renderer/README.md)。Modules bundle 会缓存自身已物化导出,并在其普通图 entry 激活时提供闭包中的系统;Cordis service 等待使图 row 创建顺序不依赖该激活时点。
7
+ 启动页只使用原生 DOM 与本地 CSS,因此客户端 bundle 或插件激活失败时仍能显示。其回退字体和颜色与加载期间到达的主题 token 一致。fiber 更新会保留同一个 spinner 节点,并在 entry 首次进入 active 时增长其 CSS 圆弧;hydrate 会继续保留该节点及其动画相位,直到应用提交。React 挂载、slot 渲染、应用组装和浏览器标题投影位于 [`ui-renderer`](../ui-renderer/README.zh.md)。Modules bundle 会缓存自身已物化导出,并在其普通图 entry 激活时提供闭包中的系统;Cordis service 等待使图 row 创建顺序不依赖该激活时点。
8
8
 
9
9
  `PLATFORM_MODULES`(src/platform.ts)是外壳播种共享模块的唯一事实来源。它与 `PRELOADED_CLIENT_EXTERNALS` 一起定义全部动态 bundle 的隐式 external 基座;`dsh.client.external` 只添加基座之外的精确请求。
10
10
 
11
- 可选的覆盖参数 `seams` 会为外部 `<script>` 执行无法到达页面上下文的环境转发模块系统的 `loadBundle` 传输覆盖(`BootSeams`);普通浏览器调用方省略此参数。
11
+ 可选的覆盖参数 `seams` 会为外部 `<script>` 执行无法到达页面上下文的环境转发模块系统的 `loadBundle` 传输覆盖(`BootSeams`);普通浏览器调用方省略此参数。预注入的页面传输是位于其前的默认值:当 `globalThis.__DSH_TRANSPORT__`(connection 包的 `ClientTransportHooks`)携带 `loadBundle` 时,模块阶段将其采纳为 bundle 传输并跳过 immediately 层级的 HTTP 预取——显式 `seams` 仍然优先。
12
12
 
13
13
  ## 模型体验
14
14
 
package/lib/index.js CHANGED
@@ -181,9 +181,11 @@ var AppWebEntry = class {
181
181
  const win = globalThis;
182
182
  const moduleLoader = win.__ModuleLoader__;
183
183
  if (moduleLoader === void 0) throw new Error("web boot: window.__ModuleLoader__ bootstrap facade is missing");
184
+ const transport = globalThis.__DSH_TRANSPORT__;
184
185
  this.modules = moduleLoader.create({
185
186
  boot: win.__DSH_BOOT__,
186
187
  staticModules: getStaticModules(),
188
+ ...transport?.loadBundle === void 0 ? {} : { loadBundle: transport.loadBundle },
187
189
  ...this.seams
188
190
  });
189
191
  this.manifest = this.modules.manifest;
@@ -212,6 +214,7 @@ var AppWebEntry = class {
212
214
  }
213
215
  /** Prefetch stage-one bundles; their import path owns any eventual failure. */
214
216
  async prefetchImmediateTier() {
217
+ if (globalThis.__DSH_TRANSPORT__?.loadBundle !== void 0) return;
215
218
  await Promise.all(this.manifest.plugins.filter((row) => row.immediately).map((row) => this.modules.prefetch(row.id).catch((_prefetchError) => {})));
216
219
  }
217
220
  /** Mount the Loader, create all graph entries, await quiescence, and audit activation. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-client-web",
3
3
  "description": "Web boot kernel: static module table, Cordis loader, framework-free boot page, and UI-renderer handoff",
4
- "version": "0.1.0-rc.8",
4
+ "version": "0.1.1-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,17 +32,17 @@
32
32
  "react": "^18.2.0",
33
33
  "react-dom": "^18.2.0",
34
34
  "typescript": "^6.0.3",
35
- "@deepseek-ai/dsh-client-modules": "^0.1.0-rc.8",
36
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.0-rc.8",
37
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.8",
38
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.8",
35
+ "@deepseek-ai/dsh-client-modules": "^0.1.1-rc.2",
36
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.1-rc.2",
39
37
  "@deepseek-ai/cordis-plugin-loader": "^1.0.2",
40
- "@deepseek-ai/dsh-invariants": "^0.1.0-rc.8",
38
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.1-rc.2",
39
+ "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
40
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.1-rc.2",
41
41
  "@deepseek-ai/cordis": "^4.0.1"
42
42
  },
43
43
  "peerDependencies": {
44
- "@deepseek-ai/cordis": "^4.0.1",
45
- "@deepseek-ai/dsh-invariants": "^0.1.0-rc.8"
44
+ "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
45
+ "@deepseek-ai/cordis": "^4.0.1"
46
46
  },
47
47
  "files": [
48
48
  "lib/index.js",