@rightkit/document-workspace 0.1.0 → 0.1.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.1
4
+
5
+ - Ask 5: host contract documented in `README.md`: legal data is passed in with `configureLegal({ manifest, contract })`, product name with `setHostAppName()`, the DOCX host-toolbar patch requirement, and `VITE_RIGHTKIT_BROWSER_QA`. The `@rightkit-host` alias is documented as the test-fixture alias only; the README previously described it as the host's data path, which the code does not use.
6
+ - Ask 4: pins `prosemirror-view` 1.42.8 (was 1.42.6).
7
+ - Wording fix in the published section comments; no behaviour change.
8
+
3
9
  ## 0.1.0
4
10
 
5
11
  - First release. Multi-format document workspace shell: tabs, sidebar, document router, loaders, savers and actions.
package/README.md CHANGED
@@ -24,18 +24,41 @@ Multi-format document workspace shell: tabs, sidebar, document router, loaders,
24
24
 
25
25
  `react`, `react-dom`
26
26
 
27
- ## Host data
27
+ ## Host data (legal)
28
28
 
29
- Legal and version data stay in the host app. Alias `@rightkit-host` to the host project root
30
- (Vite `resolve.alias`); the package imports `@rightkit-host/legal/legal-manifest.json`,
31
- `@rightkit-host/src/generated/legal-contract.json`, `@rightkit-host/package.json` and
32
- `@rightkit-host/legal/*.md?raw` where it needs them.
29
+ The package does not import the host's legal files. The host passes them in once at startup with
30
+ `configureLegal({ manifest, contract })` (exported from the root and from `state/legal`):
31
+
32
+ - `manifest`: the host's `legal/legal-manifest.json`, parsed. It must have a `documents` array.
33
+ - `contract`: the host's generated `legal-contract.json`, with `acceptanceVersion` and `materialSha256` strings.
34
+
35
+ Until `configureLegal` runs, the legal exports (`REQUIRED_LEGAL_ACCEPTANCE_VERSION`,
36
+ `LEGAL_MATERIAL_SHA256`, `LEGAL_GATE_DOCUMENTS`, `LEGAL_ABOUT_LINKS`) are empty or unset, so call it
37
+ before the first render. The exports are live bindings, so every importer sees the configured values.
38
+
39
+ The `@rightkit-host` alias is only used by this package's own test fixture (`test/host-fixture`,
40
+ set in `vitest.config.ts`). The `@rightkit-host/*` module declarations in `src/env.d.ts` describe the
41
+ same files for type-checking; a host does not need to alias them to run the package.
33
42
 
34
43
  ## Product name
35
44
 
36
45
  User-facing copy reads the product name from `hostAppName()` (default `"App"`). Call
37
46
  `setHostAppName("Your App")` (exported from the root and from `appName`) once at startup, before
38
- rendering.
47
+ rendering. Accent preset names and copy are read at display time, so the order matters only for
48
+ values the host reads at import.
49
+
50
+ ## Host toolbar (DOCX)
51
+
52
+ The DOCX pane uses `@rightkit/docx-editor`, which needs the host-toolbar patch on
53
+ `@eigenpal/docx-editor-react@1.9.0` (see that package's README). Until the workspace root registers
54
+ the patch, a host must apply it or the DOCX pane shows the editor's built-in toolbar.
55
+
56
+ ## Host configuration (environment and state)
57
+
58
+ - `VITE_RIGHTKIT_BROWSER_QA=1` at build time enables browser-QA fixtures. A host's QA build sets
59
+ it; release builds leave it unset.
60
+ - The ProseMirror packages used here (`prosemirror-view` and `prosemirror-transform`) are pinned exactly in the
61
+ dependent packages. A host must not install a second copy of either, or plugin keys break.
39
62
 
40
63
  ## Host contract
41
64
 
@@ -6,7 +6,7 @@ export declare function AboutFrame({ card, panels }: {
6
6
  card: React.ReactNode;
7
7
  panels: React.ReactNode;
8
8
  }): import("react").JSX.Element;
9
- /** Renders the published licenseSection body (status, verify, deactivate, activate, purchase rows) under the the host app token map. */
9
+ /** Renders the published licenseSection body (status, verify, deactivate, activate, purchase rows) under the host app token map. */
10
10
  export declare function PublishedLicense({ section }: {
11
11
  section: SettingsSection;
12
12
  }): import("react").JSX.Element;
@@ -24,7 +24,7 @@ function useRkContext() {
24
24
  };
25
25
  }, [settings.autoCheckUpdates, update]);
26
26
  }
27
- /** Renders a published section body under the the host app token map. */
27
+ /** Renders a published section body under the host app token map. */
28
28
  function RkSection({ section, ctx, children }) {
29
29
  return (_jsxs("div", { className: "vr-rk", children: [section.render(ctx), children] }));
30
30
  }
@@ -66,7 +66,7 @@ export function AboutFrame({ card, panels }) {
66
66
  const section = useMemo(() => aboutSection({ appName: hostAppName(), version: APP_VERSION, card, panels }), [card, panels]);
67
67
  return _jsx(RkSection, { section: section, ctx: ctx });
68
68
  }
69
- /** Renders the published licenseSection body (status, verify, deactivate, activate, purchase rows) under the the host app token map. */
69
+ /** Renders the published licenseSection body (status, verify, deactivate, activate, purchase rows) under the host app token map. */
70
70
  export function PublishedLicense({ section }) {
71
71
  const ctx = useRkContext();
72
72
  return _jsx(RkSection, { section: section, ctx: ctx });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rightkit/document-workspace",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Multi-format document workspace shell: tabs, sidebar, document router, loaders, savers and actions.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "type": "module",
@@ -38,13 +38,13 @@
38
38
  "@lezer/highlight": "^1.2.5",
39
39
  "@phosphor-icons/react": "^2.1.10",
40
40
  "@rightkit/app-update": "^0.4.2",
41
- "@rightkit/document-core": "^0.1.0",
42
- "@rightkit/docx-editor": "^0.1.0",
43
- "@rightkit/html-editor": "^0.1.0",
41
+ "@rightkit/document-core": "^0.1.1",
42
+ "@rightkit/docx-editor": "^0.1.1",
43
+ "@rightkit/html-editor": "^0.1.1",
44
44
  "@rightkit/legal": "^0.6.3",
45
45
  "@rightkit/legal-ui": "^0.4.1",
46
46
  "@rightkit/license": "^0.3.0",
47
- "@rightkit/markdown-editor": "^0.1.0",
47
+ "@rightkit/markdown-editor": "^0.1.1",
48
48
  "@rightkit/media-ui": "^0.3.4",
49
49
  "@rightkit/onboarding": "^0.6.3",
50
50
  "@rightkit/platform-ui": "^0.4.0",
@@ -53,7 +53,7 @@
53
53
  "@tauri-apps/api": "^2.12.2",
54
54
  "@tauri-apps/plugin-process": "^2.4.0",
55
55
  "prosemirror-state": "^1.4.4",
56
- "prosemirror-view": "1.42.6",
56
+ "prosemirror-view": "1.42.8",
57
57
  "tailwindcss": "^4.3.3"
58
58
  },
59
59
  "peerDependencies": {