@ai-matrx/rich-content 0.2.55 → 0.2.56

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,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.56 — the Alchemy palette loads on first use
4
+
5
+ - THE PAY-ONLY-FOR-WHAT-YOU-USE LAW: `rich-document/variants/ActionBar` lazy-loads `AlchemyDocumentMenu`
6
+ (the Alchemy transfer workspace, its data table and operations), so a chat's first screen no longer
7
+ carries them. Measured on the chat side-panel canary: first screen 1797 → 1738 kB gzip. Until the chunk
8
+ arrives, Transform opens the export palette.
9
+
10
+ Consumer action: none.
11
+
3
12
  ## 0.2.55
4
13
 
5
14
  - Transform works on the rich-document bar (chat answers, notes). `ExportPaletteAnchor` kept ONE opener per key, and two bars for one document share `instanceKey("alchemy")`: the newest overwrote the rest and, on unmount, deleted the key while the bar on screen still needed it. The registry now keeps every anchor per key (newest on-screen wins, on `globalThis`), and `openerRef` hands each host its own anchor — the bar's Transform opens its own palette. Guard: `copy/__tests__/export-palette-anchor.test.tsx`.
@@ -4,13 +4,16 @@ import * as React from "react";
4
4
  import { ActionBar as AlchemyActionBar } from "@ai-matrx/alchemy/react/bar";
5
5
  import { useRichDocumentProvider } from "../actions/useRichDocumentProvider.js";
6
6
  import { cn } from "@ai-matrx/design-system";
7
- import { AlchemyDocumentMenu } from "./shared/AlchemyDocumentMenu.js";
7
+ import { clientLazy } from "@ai-matrx/kit/client-lazy";
8
8
  import { ContentActions } from "../../copy/ContentActions.js";
9
9
  import { copyRichContent } from "../../copy/copy-commands.js";
10
10
  import { ExportPaletteAnchor, openExportPalette } from "../../copy/ExportPalette.js";
11
11
  import { ensureExportPaletteAction } from "../actions/export-palette-action.js";
12
12
  import { OpenOneMenuButton, useOneMenuFor } from "./shared/OpenOneMenuButton.js";
13
13
  import { StandaloneOneMenu } from "./shared/StandaloneOneMenu.js";
14
+ const AlchemyDocumentMenu = clientLazy(
15
+ () => import("./shared/AlchemyDocumentMenu.js").then((m) => ({ default: m.AlchemyDocumentMenu }))
16
+ );
14
17
  ensureExportPaletteAction();
15
18
  const BAR_RESTRICT = { exclude: ["copy"] };
16
19
  const SPLIT_COPY_ACTION_IDS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/rich-content",
3
- "version": "0.2.55",
3
+ "version": "0.2.56",
4
4
  "description": "The AI Matrx formatted-text engine: the one markdown renderer, streaming markdown, the block splitter and renderer, the generic blocks, <RichContent> levels, the rich-document action registry and menus, copy, and the selection toolbar — as portable React.",
5
5
  "type": "module",
6
6
  "license": "MIT",