@lincyaw/host 1.0.0-rc.127 → 1.0.0-rc.129

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lincyaw/host",
3
- "version": "1.0.0-rc.127",
3
+ "version": "1.0.0-rc.129",
4
4
  "description": "Presmium's host interface for plugin components in every form: step state, services, interface text, and the design system (tokens, components, fonts)",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -45,8 +45,8 @@
45
45
  "@radix-ui/react-tooltip": "^1.2.8",
46
46
  "react": "18.3.1",
47
47
  "react-dom": "18.3.1",
48
- "@lincyaw/design": "1.0.0-rc.127",
49
- "@lincyaw/kernel": "1.0.0-rc.127"
48
+ "@lincyaw/design": "1.0.0-rc.129",
49
+ "@lincyaw/kernel": "1.0.0-rc.129"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/react": "18.3.28",
package/src/contracts.ts CHANGED
@@ -138,10 +138,15 @@ export interface ProductionPlayback {
138
138
  }
139
139
  export const PRODUCTION_PLAYBACK = defineService<ProductionPlayback>('presmium.productionPlayback')
140
140
 
141
- /** A loaded timed-caption player owns presentation captions until its lease is released. */
141
+ /**
142
+ * A loaded timed-caption player owns presentation captions until its lease is released. `shown` tells whether it shows
143
+ * them (turned on, in a production preview, burned into an export): the slides keep room for them while it does.
144
+ */
142
145
  export interface TimedCaptions {
143
146
  readonly active: Store<boolean>
147
+ readonly shown: Store<boolean>
144
148
  claim(): Unsubscribe
149
+ show(on: boolean): void
145
150
  }
146
151
  export const TIMED_CAPTIONS = defineService<TimedCaptions>('presmium.timedCaptions')
147
152
 
package/src/messages.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { zhSpaced } from '@lincyaw/kernel'
1
2
  import type { PluginStatus } from '@lincyaw/kernel/contracts'
2
3
  import type { Catalog } from './locale.ts'
3
4
 
@@ -31,7 +32,7 @@ export const HOST_MESSAGES: Catalog<HostMessages> = {
31
32
  status: { started: '已启动', degraded: '部分可用', disabled: '已禁用', failed: '启动失败' },
32
33
  because: ':',
33
34
  unnamedPlugin: '其他插件',
34
- componentError: (component, message) => `${component} 出错:${message}`,
35
+ componentError: (component, message) => zhSpaced`${component}出错:${message}`,
35
36
  problems: count => `${count} 个问题`,
36
37
  approvals: count => `待确认 ${count}`,
37
38
  approvalsTitle: '待确认的操作',
package/src/registries.ts CHANGED
@@ -6,12 +6,12 @@ import type { PageReadiness, StatusProvider, StatusRegistry, TimedCaptions, Tool
6
6
  import { createStore } from './store.ts'
7
7
 
8
8
  export function createTimedCaptions(): TimedCaptions {
9
- const owners = new Set<symbol>(), active = createStore(false)
10
- return { active, claim() {
9
+ const owners = new Set<symbol>(), active = createStore(false), shown = createStore(false)
10
+ return { active, shown, claim() {
11
11
  const owner = Symbol()
12
12
  owners.add(owner); active.set(true)
13
13
  return () => { if (owners.delete(owner)) active.set(owners.size > 0) }
14
- } }
14
+ }, show(on) { shown.set(on) } }
15
15
  }
16
16
 
17
17
  export function createPageReadiness(): PageReadiness {