@ai-matrx/alchemy 0.19.1 → 0.20.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.20.2
|
|
4
|
+
### `documentToPdf` is `captureDocumentPdf` (first published form)
|
|
5
|
+
|
|
6
|
+
- Renamed so it can never be mistaken for print's document-tree engine (`print/document` `documentToPdf`, which `check-operate-sizes.mjs` refuses in the capture entry by that exact name — it held 0.20.1). Same behaviour.
|
|
7
|
+
|
|
8
|
+
**Consumer action:** call `captureDocumentPdf` from `@ai-matrx/alchemy/operate/capture`.
|
|
9
|
+
|
|
10
|
+
## 0.20.1
|
|
11
|
+
### Publish 0.20.0's document capture (the release was held by a stale test)
|
|
12
|
+
|
|
13
|
+
- `table-default-selection.test.tsx` now asserts design-system 0.72.1's contract: the default copy selection is kept across source pages of the same table (it asserted the retired "cleared on page change" behaviour, which failed every alchemy publish since 0.19.2). No code change.
|
|
14
|
+
|
|
15
|
+
**Consumer action:** none (adopt `captureDocumentPdf`).
|
|
16
|
+
|
|
17
|
+
## 0.20.0
|
|
18
|
+
### `/operate/capture` `documentToPdf`; the rasteriser ruling corrected (AP-2 fifth check)
|
|
19
|
+
|
|
20
|
+
- `captureDocumentPdf(element | elements, options)` (named `documentToPdf` in the unpublished 0.20.0/0.20.1) answers a DOCUMENT as a PDF Blob through print's one engine: one tall element sliced into paper pages (`captureToPDFBlob`), or a list of designed report pages, one each (`captureElementsToPDFBlob`). Save it with kit `downloadFile`. Test: `src/operate/capture.test.ts`.
|
|
21
|
+
- FEATURE.md ruling A6 corrected: PDF assembly is print's `pagesToPdf`; canvases come from `renderElement` for a picture of a surface and html2canvas for a document. Packages that depend on Alchemy and all app code reach `@ai-matrx/print/pdf` only through `/operate/capture`.
|
|
22
|
+
|
|
23
|
+
**Consumer action:** replace a direct `@ai-matrx/print/pdf` `captureToPDF` / `captureElementsToPDF` / `captureBlockElement` call with `captureDocumentPdf` + `downloadFile`.
|
|
24
|
+
|
|
25
|
+
## 0.19.2
|
|
26
|
+
### `/operate/read` reverses the formula guard; the rasteriser ruling is recorded (AP-2 A1/A6)
|
|
27
|
+
|
|
28
|
+
- `parseDelimited` (re-exported from kit, needs kit 0.32.0) strips the guard's `'` from cells our writer guarded (`unguardFormulas: false` keeps raw text). Workbook copy text stays guarded.
|
|
29
|
+
- FEATURE.md records the rasteriser ruling: one DOM→PDF engine (print); html2canvas owns document capture, html-to-image owns a picture of a visual surface.
|
|
30
|
+
|
|
31
|
+
**Consumer action:** none.
|
|
32
|
+
|
|
3
33
|
## 0.19.1
|
|
4
34
|
### Split-Copy hosts can drop the two tiles they already show
|
|
5
35
|
|
package/dist/operate-capture.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var operate_capture_exports={};__export(operate_capture_exports,{canvasToBlob:()=>canvasToBlob,captureElement:()=>captureElement,elementToImage:()=>elementToImage,elementsToPdf:()=>elementsToPdf,pagesToPdf:()=>pagesToPdf,renderElement:()=>renderElement,renderElementToDataUrl:()=>renderElementToDataUrl});module.exports=__toCommonJS(operate_capture_exports);async function captureElement(element,options={}){let{captureCanvas}=await import("@ai-matrx/print/pdf");return captureCanvas(element,options)}async function canvasToBlob(canvas,type="image/png",quality){let blob=await new Promise(resolve=>canvas.toBlob(resolve,type,quality));if(!blob)throw new Error("The image could not be encoded.");return blob}async function elementToImage(element,options={}){let{type,quality,...capture}=options;return canvasToBlob(await captureElement(element,capture),type,quality)}async function renderElement(element,options={}){let{toCanvas}=await import("html-to-image");return toCanvas(element,options)}async function renderElementToDataUrl(element,options={}){let{toPng}=await import("html-to-image");return toPng(element,options)}async function pagesToPdf(pages,options={}){let{pagesToPdf:layOut}=await import("@ai-matrx/print/pdf");return layOut(pages,options)}async function elementsToPdf(elements,options={}){let pages=[];for(let element of elements)pages.push({...options.page,image:await captureElement(element,options.capture)});return pagesToPdf(pages,options)}
|
|
1
|
+
"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var operate_capture_exports={};__export(operate_capture_exports,{canvasToBlob:()=>canvasToBlob,captureDocumentPdf:()=>captureDocumentPdf,captureElement:()=>captureElement,elementToImage:()=>elementToImage,elementsToPdf:()=>elementsToPdf,pagesToPdf:()=>pagesToPdf,renderElement:()=>renderElement,renderElementToDataUrl:()=>renderElementToDataUrl});module.exports=__toCommonJS(operate_capture_exports);async function captureElement(element,options={}){let{captureCanvas}=await import("@ai-matrx/print/pdf");return captureCanvas(element,options)}async function canvasToBlob(canvas,type="image/png",quality){let blob=await new Promise(resolve=>canvas.toBlob(resolve,type,quality));if(!blob)throw new Error("The image could not be encoded.");return blob}async function elementToImage(element,options={}){let{type,quality,...capture}=options;return canvasToBlob(await captureElement(element,capture),type,quality)}async function renderElement(element,options={}){let{toCanvas}=await import("html-to-image");return toCanvas(element,options)}async function renderElementToDataUrl(element,options={}){let{toPng}=await import("html-to-image");return toPng(element,options)}async function pagesToPdf(pages,options={}){let{pagesToPdf:layOut}=await import("@ai-matrx/print/pdf");return layOut(pages,options)}async function captureDocumentPdf(element,options={}){let engine=await import("@ai-matrx/print/pdf");return Array.isArray(element)?engine.captureElementsToPDFBlob([...element],options):engine.captureToPDFBlob(element,options)}async function elementsToPdf(elements,options={}){let pages=[];for(let element of elements)pages.push({...options.page,image:await captureElement(element,options.capture)});return pagesToPdf(pages,options)}
|
|
2
2
|
//# sourceMappingURL=operate-capture.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/operate-capture.ts","../src/operate/capture.ts"],"sourcesContent":["/** `@ai-matrx/alchemy/operate/capture` — the one DOM capture engine (element → image / PDF). html2canvas, html-to-image and jsPDF load on first use. */\nexport {\n canvasToBlob,\n captureElement,\n elementToImage,\n elementsToPdf,\n pagesToPdf,\n renderElement,\n renderElementToDataUrl,\n type CaptureOptions,\n type PdfDocumentOptions,\n type PdfMargins,\n type PdfPage,\n type RenderOptions,\n} from \"./operate/capture\";\n","/**\n * `@ai-matrx/alchemy/operate/capture` — THE DOM capture door (ALC-19 T11): an element on screen →\n * an image or a PDF, with nothing else in the app importing html2canvas or jsPDF. The html2canvas +\n * jsPDF engine itself is `@ai-matrx/print/pdf` (`captureCanvas`, `pagesToPdf`), loaded on first use\n * (`import()`), so a page that never exports never downloads it; html-to-image (`renderElement`) is\n * this module's own.\n *\n * Tailwind 4 colours (oklch/lab/color()) are not parseable by html2canvas, which logs an error per\n * value; `safeColors` substitutes theme-appropriate hex values for the duration of the capture.\n */\n\n// THE one html2canvas + jsPDF engine is print's (AP-2 engine ruling: print sits below alchemy, so\n// alchemy loads it — never a second copy here). Type-only imports; the module loads on first use.\nimport type { CanvasCaptureOptions, PdfDocumentOptions, PdfPage } from \"@ai-matrx/print/pdf\";\nexport type { CanvasCaptureOptions as CaptureOptions, PdfDocumentOptions, PdfMargins, PdfPage } from \"@ai-matrx/print/pdf\";\ntype CaptureOptions = CanvasCaptureOptions;\n\n/** Rasterise a live element to a canvas (what the person sees, at `scale`) — print's `captureCanvas`. */\nexport async function captureElement(element: HTMLElement, options: CaptureOptions = {}): Promise<HTMLCanvasElement> {\n const { captureCanvas } = await import(\"@ai-matrx/print/pdf\");\n return captureCanvas(element, options);\n}\n\n/** Encode a canvas (PNG by default; JPEG/WebP take a 0–1 quality). Throws when the browser refuses. */\nexport async function canvasToBlob(canvas: HTMLCanvasElement, type: \"image/png\" | \"image/jpeg\" | \"image/webp\" = \"image/png\", quality?: number): Promise<Blob> {\n const blob = await new Promise<Blob | null>((resolve) => canvas.toBlob(resolve, type, quality));\n if (!blob) throw new Error(\"The image could not be encoded.\");\n return blob;\n}\n\n/** Capture an element straight to an image Blob. */\nexport async function elementToImage(\n element: HTMLElement,\n options: CaptureOptions & { type?: \"image/png\" | \"image/jpeg\" | \"image/webp\"; quality?: number } = {},\n): Promise<Blob> {\n const { type, quality, ...capture } = options;\n return canvasToBlob(await captureElement(element, capture), type, quality);\n}\n\n/** Options for `renderElement` (html-to-image): the SVG foreignObject renderer. */\nexport type RenderOptions = {\n /** Device-pixel ratio (default 1). */\n pixelRatio?: number;\n width?: number;\n height?: number;\n /** Final canvas size; the render is scaled to it. */\n canvasWidth?: number;\n canvasHeight?: number;\n backgroundColor?: string;\n /** Inline style applied to the cloned root (e.g. a translate to pad the chart). */\n style?: Partial<CSSStyleDeclaration>;\n /** Return false to leave a node out of the picture. */\n filter?(node: HTMLElement): boolean;\n skipFonts?: boolean;\n /** Bust the image cache so a CORS fetch is fresh. */\n cacheBust?: boolean;\n /** Data URL drawn instead of an image that fails to load. */\n imagePlaceholder?: string;\n onImageErrorHandler?(...args: unknown[]): void;\n};\n\n/**\n * Render a live element to a canvas through the SVG foreignObject renderer (html-to-image). It keeps\n * the browser's own layout and fonts where html2canvas re-implements them, and it takes a `filter`\n * and a root `style` override — the right tool for a transformed or panned surface. Loads on first use.\n */\nexport async function renderElement(element: HTMLElement, options: RenderOptions = {}): Promise<HTMLCanvasElement> {\n const { toCanvas } = await import(\"html-to-image\");\n return toCanvas(element, options as Parameters<typeof toCanvas>[1]);\n}\n\n/** `renderElement` answering a PNG data URL (what a chat attachment preview needs besides the Blob). */\nexport async function renderElementToDataUrl(element: HTMLElement, options: RenderOptions = {}): Promise<string> {\n const { toPng } = await import(\"html-to-image\");\n return toPng(element, options as Parameters<typeof toPng>[1]);\n}\n\n/** Lay canvases out as PDF pages (one page each) and answer the PDF Blob — print's `pagesToPdf`. */\nexport async function pagesToPdf(pages: readonly PdfPage[], options: PdfDocumentOptions = {}): Promise<Blob> {\n const { pagesToPdf: layOut } = await import(\"@ai-matrx/print/pdf\");\n return layOut(pages, options);\n}\n\n/** Capture each element and lay them out one per PDF page. */\nexport async function elementsToPdf(\n elements: readonly HTMLElement[],\n options: PdfDocumentOptions & { capture?: CaptureOptions; page?: Omit<PdfPage, \"image\"> } = {},\n): Promise<Blob> {\n const pages: PdfPage[] = [];\n for (const element of elements) pages.push({ ...options.page, image: await captureElement(element, options.capture) });\n return pagesToPdf(pages, options);\n}\n"],"mappings":"y5BAAA,
|
|
1
|
+
{"version":3,"sources":["../src/operate-capture.ts","../src/operate/capture.ts"],"sourcesContent":["/** `@ai-matrx/alchemy/operate/capture` — the one DOM capture engine (element → image / PDF). html2canvas, html-to-image and jsPDF load on first use. */\nexport {\n canvasToBlob,\n captureElement,\n captureDocumentPdf,\n elementToImage,\n elementsToPdf,\n pagesToPdf,\n renderElement,\n renderElementToDataUrl,\n type CaptureOptions,\n type DocumentPdfOptions,\n type PdfDocumentOptions,\n type PdfMargins,\n type PdfPage,\n type RenderOptions,\n} from \"./operate/capture\";\n","/**\n * `@ai-matrx/alchemy/operate/capture` — THE DOM capture door (ALC-19 T11): an element on screen →\n * an image or a PDF, with nothing else in the app importing html2canvas or jsPDF. The html2canvas +\n * jsPDF engine itself is `@ai-matrx/print/pdf` (`captureCanvas`, `pagesToPdf`), loaded on first use\n * (`import()`), so a page that never exports never downloads it; html-to-image (`renderElement`) is\n * this module's own.\n *\n * Tailwind 4 colours (oklch/lab/color()) are not parseable by html2canvas, which logs an error per\n * value; `safeColors` substitutes theme-appropriate hex values for the duration of the capture.\n */\n\n// THE one html2canvas + jsPDF engine is print's (AP-2 engine ruling: print sits below alchemy, so\n// alchemy loads it — never a second copy here). Type-only imports; the module loads on first use.\nimport type { CanvasCaptureOptions, DomCaptureOptions, PdfDocumentOptions, PdfPage } from \"@ai-matrx/print/pdf\";\nexport type { CanvasCaptureOptions as CaptureOptions, PdfDocumentOptions, PdfMargins, PdfPage } from \"@ai-matrx/print/pdf\";\n/** Options for `captureDocumentPdf` (print's DOCUMENT capture: paper, orientation, scale, progress, theme). */\nexport type DocumentPdfOptions = Omit<DomCaptureOptions, \"filename\">;\ntype CaptureOptions = CanvasCaptureOptions;\n\n/** Rasterise a live element to a canvas (what the person sees, at `scale`) — print's `captureCanvas`. */\nexport async function captureElement(element: HTMLElement, options: CaptureOptions = {}): Promise<HTMLCanvasElement> {\n const { captureCanvas } = await import(\"@ai-matrx/print/pdf\");\n return captureCanvas(element, options);\n}\n\n/** Encode a canvas (PNG by default; JPEG/WebP take a 0–1 quality). Throws when the browser refuses. */\nexport async function canvasToBlob(canvas: HTMLCanvasElement, type: \"image/png\" | \"image/jpeg\" | \"image/webp\" = \"image/png\", quality?: number): Promise<Blob> {\n const blob = await new Promise<Blob | null>((resolve) => canvas.toBlob(resolve, type, quality));\n if (!blob) throw new Error(\"The image could not be encoded.\");\n return blob;\n}\n\n/** Capture an element straight to an image Blob. */\nexport async function elementToImage(\n element: HTMLElement,\n options: CaptureOptions & { type?: \"image/png\" | \"image/jpeg\" | \"image/webp\"; quality?: number } = {},\n): Promise<Blob> {\n const { type, quality, ...capture } = options;\n return canvasToBlob(await captureElement(element, capture), type, quality);\n}\n\n/** Options for `renderElement` (html-to-image): the SVG foreignObject renderer. */\nexport type RenderOptions = {\n /** Device-pixel ratio (default 1). */\n pixelRatio?: number;\n width?: number;\n height?: number;\n /** Final canvas size; the render is scaled to it. */\n canvasWidth?: number;\n canvasHeight?: number;\n backgroundColor?: string;\n /** Inline style applied to the cloned root (e.g. a translate to pad the chart). */\n style?: Partial<CSSStyleDeclaration>;\n /** Return false to leave a node out of the picture. */\n filter?(node: HTMLElement): boolean;\n skipFonts?: boolean;\n /** Bust the image cache so a CORS fetch is fresh. */\n cacheBust?: boolean;\n /** Data URL drawn instead of an image that fails to load. */\n imagePlaceholder?: string;\n onImageErrorHandler?(...args: unknown[]): void;\n};\n\n/**\n * Render a live element to a canvas through the SVG foreignObject renderer (html-to-image). It keeps\n * the browser's own layout and fonts where html2canvas re-implements them, and it takes a `filter`\n * and a root `style` override — the right tool for a transformed or panned surface. Loads on first use.\n */\nexport async function renderElement(element: HTMLElement, options: RenderOptions = {}): Promise<HTMLCanvasElement> {\n const { toCanvas } = await import(\"html-to-image\");\n return toCanvas(element, options as Parameters<typeof toCanvas>[1]);\n}\n\n/** `renderElement` answering a PNG data URL (what a chat attachment preview needs besides the Blob). */\nexport async function renderElementToDataUrl(element: HTMLElement, options: RenderOptions = {}): Promise<string> {\n const { toPng } = await import(\"html-to-image\");\n return toPng(element, options as Parameters<typeof toPng>[1]);\n}\n\n/** Lay canvases out as PDF pages (one page each) and answer the PDF Blob — print's `pagesToPdf`. */\nexport async function pagesToPdf(pages: readonly PdfPage[], options: PdfDocumentOptions = {}): Promise<Blob> {\n const { pagesToPdf: layOut } = await import(\"@ai-matrx/print/pdf\");\n return layOut(pages, options);\n}\n\n/**\n * A DOCUMENT as a PDF Blob, through print's html2canvas + jsPDF engine. One element (a page, a\n * response — arbitrarily tall) is sliced into paper pages (print's `captureToPDFBlob`); a list of\n * elements is a designed report whose pages are its own, one PDF page each (`captureElementsToPDFBlob`).\n * Save it with kit `downloadFile`, or upload it. A PICTURE of a surface is `renderElement` →\n * `pagesToPdf` instead (rasteriser ruling A6).\n */\nexport async function captureDocumentPdf(\n element: HTMLElement | readonly HTMLElement[],\n options: DocumentPdfOptions = {},\n): Promise<Blob> {\n const engine = await import(\"@ai-matrx/print/pdf\");\n return Array.isArray(element)\n ? engine.captureElementsToPDFBlob([...element], options)\n : engine.captureToPDFBlob(element as HTMLElement, options);\n}\n\n/** Capture each element and lay them out one per PDF page. */\nexport async function elementsToPdf(\n elements: readonly HTMLElement[],\n options: PdfDocumentOptions & { capture?: CaptureOptions; page?: Omit<PdfPage, \"image\"> } = {},\n): Promise<Blob> {\n const pages: PdfPage[] = [];\n for (const element of elements) pages.push({ ...options.page, image: await captureElement(element, options.capture) });\n return pagesToPdf(pages, options);\n}\n"],"mappings":"y5BAAA,gZCoBA,eAAsB,eAAe,QAAsB,QAA0B,CAAC,EAA+B,CACnH,GAAM,CAAE,aAAc,EAAI,KAAM,QAAO,qBAAqB,EAC5D,OAAO,cAAc,QAAS,OAAO,CACvC,CAGA,eAAsB,aAAa,OAA2B,KAAkD,YAAa,QAAiC,CAC5J,IAAM,KAAO,MAAM,IAAI,QAAsB,SAAY,OAAO,OAAO,QAAS,KAAM,OAAO,CAAC,EAC9F,GAAI,CAAC,KAAM,MAAM,IAAI,MAAM,iCAAiC,EAC5D,OAAO,IACT,CAGA,eAAsB,eACpB,QACA,QAAmG,CAAC,EACrF,CACf,GAAM,CAAE,KAAM,QAAS,GAAG,OAAQ,EAAI,QACtC,OAAO,aAAa,MAAM,eAAe,QAAS,OAAO,EAAG,KAAM,OAAO,CAC3E,CA6BA,eAAsB,cAAc,QAAsB,QAAyB,CAAC,EAA+B,CACjH,GAAM,CAAE,QAAS,EAAI,KAAM,QAAO,eAAe,EACjD,OAAO,SAAS,QAAS,OAAyC,CACpE,CAGA,eAAsB,uBAAuB,QAAsB,QAAyB,CAAC,EAAoB,CAC/G,GAAM,CAAE,KAAM,EAAI,KAAM,QAAO,eAAe,EAC9C,OAAO,MAAM,QAAS,OAAsC,CAC9D,CAGA,eAAsB,WAAW,MAA2B,QAA8B,CAAC,EAAkB,CAC3G,GAAM,CAAE,WAAY,MAAO,EAAI,KAAM,QAAO,qBAAqB,EACjE,OAAO,OAAO,MAAO,OAAO,CAC9B,CASA,eAAsB,mBACpB,QACA,QAA8B,CAAC,EAChB,CACf,IAAM,OAAS,KAAM,QAAO,qBAAqB,EACjD,OAAO,MAAM,QAAQ,OAAO,EACxB,OAAO,yBAAyB,CAAC,GAAG,OAAO,EAAG,OAAO,EACrD,OAAO,iBAAiB,QAAwB,OAAO,CAC7D,CAGA,eAAsB,cACpB,SACA,QAA4F,CAAC,EAC9E,CACf,IAAM,MAAmB,CAAC,EAC1B,QAAW,WAAW,SAAU,MAAM,KAAK,CAAE,GAAG,QAAQ,KAAM,MAAO,MAAM,eAAe,QAAS,QAAQ,OAAO,CAAE,CAAC,EACrH,OAAO,WAAW,MAAO,OAAO,CAClC","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CanvasCaptureOptions, PdfDocumentOptions, PdfPage } from '@ai-matrx/print/pdf';
|
|
1
|
+
import { DomCaptureOptions, CanvasCaptureOptions, PdfDocumentOptions, PdfPage } from '@ai-matrx/print/pdf';
|
|
2
2
|
export { CanvasCaptureOptions as CaptureOptions, PdfDocumentOptions, PdfMargins, PdfPage } from '@ai-matrx/print/pdf';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -12,6 +12,8 @@ export { CanvasCaptureOptions as CaptureOptions, PdfDocumentOptions, PdfMargins,
|
|
|
12
12
|
* value; `safeColors` substitutes theme-appropriate hex values for the duration of the capture.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
/** Options for `captureDocumentPdf` (print's DOCUMENT capture: paper, orientation, scale, progress, theme). */
|
|
16
|
+
type DocumentPdfOptions = Omit<DomCaptureOptions, "filename">;
|
|
15
17
|
type CaptureOptions = CanvasCaptureOptions;
|
|
16
18
|
/** Rasterise a live element to a canvas (what the person sees, at `scale`) — print's `captureCanvas`. */
|
|
17
19
|
declare function captureElement(element: HTMLElement, options?: CaptureOptions): Promise<HTMLCanvasElement>;
|
|
@@ -53,10 +55,18 @@ declare function renderElement(element: HTMLElement, options?: RenderOptions): P
|
|
|
53
55
|
declare function renderElementToDataUrl(element: HTMLElement, options?: RenderOptions): Promise<string>;
|
|
54
56
|
/** Lay canvases out as PDF pages (one page each) and answer the PDF Blob — print's `pagesToPdf`. */
|
|
55
57
|
declare function pagesToPdf(pages: readonly PdfPage[], options?: PdfDocumentOptions): Promise<Blob>;
|
|
58
|
+
/**
|
|
59
|
+
* A DOCUMENT as a PDF Blob, through print's html2canvas + jsPDF engine. One element (a page, a
|
|
60
|
+
* response — arbitrarily tall) is sliced into paper pages (print's `captureToPDFBlob`); a list of
|
|
61
|
+
* elements is a designed report whose pages are its own, one PDF page each (`captureElementsToPDFBlob`).
|
|
62
|
+
* Save it with kit `downloadFile`, or upload it. A PICTURE of a surface is `renderElement` →
|
|
63
|
+
* `pagesToPdf` instead (rasteriser ruling A6).
|
|
64
|
+
*/
|
|
65
|
+
declare function captureDocumentPdf(element: HTMLElement | readonly HTMLElement[], options?: DocumentPdfOptions): Promise<Blob>;
|
|
56
66
|
/** Capture each element and lay them out one per PDF page. */
|
|
57
67
|
declare function elementsToPdf(elements: readonly HTMLElement[], options?: PdfDocumentOptions & {
|
|
58
68
|
capture?: CaptureOptions;
|
|
59
69
|
page?: Omit<PdfPage, "image">;
|
|
60
70
|
}): Promise<Blob>;
|
|
61
71
|
|
|
62
|
-
export { type RenderOptions, canvasToBlob, captureElement, elementToImage, elementsToPdf, pagesToPdf, renderElement, renderElementToDataUrl };
|
|
72
|
+
export { type DocumentPdfOptions, type RenderOptions, canvasToBlob, captureDocumentPdf, captureElement, elementToImage, elementsToPdf, pagesToPdf, renderElement, renderElementToDataUrl };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CanvasCaptureOptions, PdfDocumentOptions, PdfPage } from '@ai-matrx/print/pdf';
|
|
1
|
+
import { DomCaptureOptions, CanvasCaptureOptions, PdfDocumentOptions, PdfPage } from '@ai-matrx/print/pdf';
|
|
2
2
|
export { CanvasCaptureOptions as CaptureOptions, PdfDocumentOptions, PdfMargins, PdfPage } from '@ai-matrx/print/pdf';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -12,6 +12,8 @@ export { CanvasCaptureOptions as CaptureOptions, PdfDocumentOptions, PdfMargins,
|
|
|
12
12
|
* value; `safeColors` substitutes theme-appropriate hex values for the duration of the capture.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
/** Options for `captureDocumentPdf` (print's DOCUMENT capture: paper, orientation, scale, progress, theme). */
|
|
16
|
+
type DocumentPdfOptions = Omit<DomCaptureOptions, "filename">;
|
|
15
17
|
type CaptureOptions = CanvasCaptureOptions;
|
|
16
18
|
/** Rasterise a live element to a canvas (what the person sees, at `scale`) — print's `captureCanvas`. */
|
|
17
19
|
declare function captureElement(element: HTMLElement, options?: CaptureOptions): Promise<HTMLCanvasElement>;
|
|
@@ -53,10 +55,18 @@ declare function renderElement(element: HTMLElement, options?: RenderOptions): P
|
|
|
53
55
|
declare function renderElementToDataUrl(element: HTMLElement, options?: RenderOptions): Promise<string>;
|
|
54
56
|
/** Lay canvases out as PDF pages (one page each) and answer the PDF Blob — print's `pagesToPdf`. */
|
|
55
57
|
declare function pagesToPdf(pages: readonly PdfPage[], options?: PdfDocumentOptions): Promise<Blob>;
|
|
58
|
+
/**
|
|
59
|
+
* A DOCUMENT as a PDF Blob, through print's html2canvas + jsPDF engine. One element (a page, a
|
|
60
|
+
* response — arbitrarily tall) is sliced into paper pages (print's `captureToPDFBlob`); a list of
|
|
61
|
+
* elements is a designed report whose pages are its own, one PDF page each (`captureElementsToPDFBlob`).
|
|
62
|
+
* Save it with kit `downloadFile`, or upload it. A PICTURE of a surface is `renderElement` →
|
|
63
|
+
* `pagesToPdf` instead (rasteriser ruling A6).
|
|
64
|
+
*/
|
|
65
|
+
declare function captureDocumentPdf(element: HTMLElement | readonly HTMLElement[], options?: DocumentPdfOptions): Promise<Blob>;
|
|
56
66
|
/** Capture each element and lay them out one per PDF page. */
|
|
57
67
|
declare function elementsToPdf(elements: readonly HTMLElement[], options?: PdfDocumentOptions & {
|
|
58
68
|
capture?: CaptureOptions;
|
|
59
69
|
page?: Omit<PdfPage, "image">;
|
|
60
70
|
}): Promise<Blob>;
|
|
61
71
|
|
|
62
|
-
export { type RenderOptions, canvasToBlob, captureElement, elementToImage, elementsToPdf, pagesToPdf, renderElement, renderElementToDataUrl };
|
|
72
|
+
export { type DocumentPdfOptions, type RenderOptions, canvasToBlob, captureDocumentPdf, captureElement, elementToImage, elementsToPdf, pagesToPdf, renderElement, renderElementToDataUrl };
|
package/dist/operate-capture.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
async function captureElement(element,options={}){let{captureCanvas}=await import("@ai-matrx/print/pdf");return captureCanvas(element,options)}async function canvasToBlob(canvas,type="image/png",quality){let blob=await new Promise(resolve=>canvas.toBlob(resolve,type,quality));if(!blob)throw new Error("The image could not be encoded.");return blob}async function elementToImage(element,options={}){let{type,quality,...capture}=options;return canvasToBlob(await captureElement(element,capture),type,quality)}async function renderElement(element,options={}){let{toCanvas}=await import("html-to-image");return toCanvas(element,options)}async function renderElementToDataUrl(element,options={}){let{toPng}=await import("html-to-image");return toPng(element,options)}async function pagesToPdf(pages,options={}){let{pagesToPdf:layOut}=await import("@ai-matrx/print/pdf");return layOut(pages,options)}async function elementsToPdf(elements,options={}){let pages=[];for(let element of elements)pages.push({...options.page,image:await captureElement(element,options.capture)});return pagesToPdf(pages,options)}export{canvasToBlob,captureElement,elementToImage,elementsToPdf,pagesToPdf,renderElement,renderElementToDataUrl};
|
|
1
|
+
async function captureElement(element,options={}){let{captureCanvas}=await import("@ai-matrx/print/pdf");return captureCanvas(element,options)}async function canvasToBlob(canvas,type="image/png",quality){let blob=await new Promise(resolve=>canvas.toBlob(resolve,type,quality));if(!blob)throw new Error("The image could not be encoded.");return blob}async function elementToImage(element,options={}){let{type,quality,...capture}=options;return canvasToBlob(await captureElement(element,capture),type,quality)}async function renderElement(element,options={}){let{toCanvas}=await import("html-to-image");return toCanvas(element,options)}async function renderElementToDataUrl(element,options={}){let{toPng}=await import("html-to-image");return toPng(element,options)}async function pagesToPdf(pages,options={}){let{pagesToPdf:layOut}=await import("@ai-matrx/print/pdf");return layOut(pages,options)}async function captureDocumentPdf(element,options={}){let engine=await import("@ai-matrx/print/pdf");return Array.isArray(element)?engine.captureElementsToPDFBlob([...element],options):engine.captureToPDFBlob(element,options)}async function elementsToPdf(elements,options={}){let pages=[];for(let element of elements)pages.push({...options.page,image:await captureElement(element,options.capture)});return pagesToPdf(pages,options)}export{canvasToBlob,captureDocumentPdf,captureElement,elementToImage,elementsToPdf,pagesToPdf,renderElement,renderElementToDataUrl};
|
|
2
2
|
//# sourceMappingURL=operate-capture.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/operate/capture.ts"],"sourcesContent":["/**\n * `@ai-matrx/alchemy/operate/capture` — THE DOM capture door (ALC-19 T11): an element on screen →\n * an image or a PDF, with nothing else in the app importing html2canvas or jsPDF. The html2canvas +\n * jsPDF engine itself is `@ai-matrx/print/pdf` (`captureCanvas`, `pagesToPdf`), loaded on first use\n * (`import()`), so a page that never exports never downloads it; html-to-image (`renderElement`) is\n * this module's own.\n *\n * Tailwind 4 colours (oklch/lab/color()) are not parseable by html2canvas, which logs an error per\n * value; `safeColors` substitutes theme-appropriate hex values for the duration of the capture.\n */\n\n// THE one html2canvas + jsPDF engine is print's (AP-2 engine ruling: print sits below alchemy, so\n// alchemy loads it — never a second copy here). Type-only imports; the module loads on first use.\nimport type { CanvasCaptureOptions, PdfDocumentOptions, PdfPage } from \"@ai-matrx/print/pdf\";\nexport type { CanvasCaptureOptions as CaptureOptions, PdfDocumentOptions, PdfMargins, PdfPage } from \"@ai-matrx/print/pdf\";\ntype CaptureOptions = CanvasCaptureOptions;\n\n/** Rasterise a live element to a canvas (what the person sees, at `scale`) — print's `captureCanvas`. */\nexport async function captureElement(element: HTMLElement, options: CaptureOptions = {}): Promise<HTMLCanvasElement> {\n const { captureCanvas } = await import(\"@ai-matrx/print/pdf\");\n return captureCanvas(element, options);\n}\n\n/** Encode a canvas (PNG by default; JPEG/WebP take a 0–1 quality). Throws when the browser refuses. */\nexport async function canvasToBlob(canvas: HTMLCanvasElement, type: \"image/png\" | \"image/jpeg\" | \"image/webp\" = \"image/png\", quality?: number): Promise<Blob> {\n const blob = await new Promise<Blob | null>((resolve) => canvas.toBlob(resolve, type, quality));\n if (!blob) throw new Error(\"The image could not be encoded.\");\n return blob;\n}\n\n/** Capture an element straight to an image Blob. */\nexport async function elementToImage(\n element: HTMLElement,\n options: CaptureOptions & { type?: \"image/png\" | \"image/jpeg\" | \"image/webp\"; quality?: number } = {},\n): Promise<Blob> {\n const { type, quality, ...capture } = options;\n return canvasToBlob(await captureElement(element, capture), type, quality);\n}\n\n/** Options for `renderElement` (html-to-image): the SVG foreignObject renderer. */\nexport type RenderOptions = {\n /** Device-pixel ratio (default 1). */\n pixelRatio?: number;\n width?: number;\n height?: number;\n /** Final canvas size; the render is scaled to it. */\n canvasWidth?: number;\n canvasHeight?: number;\n backgroundColor?: string;\n /** Inline style applied to the cloned root (e.g. a translate to pad the chart). */\n style?: Partial<CSSStyleDeclaration>;\n /** Return false to leave a node out of the picture. */\n filter?(node: HTMLElement): boolean;\n skipFonts?: boolean;\n /** Bust the image cache so a CORS fetch is fresh. */\n cacheBust?: boolean;\n /** Data URL drawn instead of an image that fails to load. */\n imagePlaceholder?: string;\n onImageErrorHandler?(...args: unknown[]): void;\n};\n\n/**\n * Render a live element to a canvas through the SVG foreignObject renderer (html-to-image). It keeps\n * the browser's own layout and fonts where html2canvas re-implements them, and it takes a `filter`\n * and a root `style` override — the right tool for a transformed or panned surface. Loads on first use.\n */\nexport async function renderElement(element: HTMLElement, options: RenderOptions = {}): Promise<HTMLCanvasElement> {\n const { toCanvas } = await import(\"html-to-image\");\n return toCanvas(element, options as Parameters<typeof toCanvas>[1]);\n}\n\n/** `renderElement` answering a PNG data URL (what a chat attachment preview needs besides the Blob). */\nexport async function renderElementToDataUrl(element: HTMLElement, options: RenderOptions = {}): Promise<string> {\n const { toPng } = await import(\"html-to-image\");\n return toPng(element, options as Parameters<typeof toPng>[1]);\n}\n\n/** Lay canvases out as PDF pages (one page each) and answer the PDF Blob — print's `pagesToPdf`. */\nexport async function pagesToPdf(pages: readonly PdfPage[], options: PdfDocumentOptions = {}): Promise<Blob> {\n const { pagesToPdf: layOut } = await import(\"@ai-matrx/print/pdf\");\n return layOut(pages, options);\n}\n\n/** Capture each element and lay them out one per PDF page. */\nexport async function elementsToPdf(\n elements: readonly HTMLElement[],\n options: PdfDocumentOptions & { capture?: CaptureOptions; page?: Omit<PdfPage, \"image\"> } = {},\n): Promise<Blob> {\n const pages: PdfPage[] = [];\n for (const element of elements) pages.push({ ...options.page, image: await captureElement(element, options.capture) });\n return pagesToPdf(pages, options);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/operate/capture.ts"],"sourcesContent":["/**\n * `@ai-matrx/alchemy/operate/capture` — THE DOM capture door (ALC-19 T11): an element on screen →\n * an image or a PDF, with nothing else in the app importing html2canvas or jsPDF. The html2canvas +\n * jsPDF engine itself is `@ai-matrx/print/pdf` (`captureCanvas`, `pagesToPdf`), loaded on first use\n * (`import()`), so a page that never exports never downloads it; html-to-image (`renderElement`) is\n * this module's own.\n *\n * Tailwind 4 colours (oklch/lab/color()) are not parseable by html2canvas, which logs an error per\n * value; `safeColors` substitutes theme-appropriate hex values for the duration of the capture.\n */\n\n// THE one html2canvas + jsPDF engine is print's (AP-2 engine ruling: print sits below alchemy, so\n// alchemy loads it — never a second copy here). Type-only imports; the module loads on first use.\nimport type { CanvasCaptureOptions, DomCaptureOptions, PdfDocumentOptions, PdfPage } from \"@ai-matrx/print/pdf\";\nexport type { CanvasCaptureOptions as CaptureOptions, PdfDocumentOptions, PdfMargins, PdfPage } from \"@ai-matrx/print/pdf\";\n/** Options for `captureDocumentPdf` (print's DOCUMENT capture: paper, orientation, scale, progress, theme). */\nexport type DocumentPdfOptions = Omit<DomCaptureOptions, \"filename\">;\ntype CaptureOptions = CanvasCaptureOptions;\n\n/** Rasterise a live element to a canvas (what the person sees, at `scale`) — print's `captureCanvas`. */\nexport async function captureElement(element: HTMLElement, options: CaptureOptions = {}): Promise<HTMLCanvasElement> {\n const { captureCanvas } = await import(\"@ai-matrx/print/pdf\");\n return captureCanvas(element, options);\n}\n\n/** Encode a canvas (PNG by default; JPEG/WebP take a 0–1 quality). Throws when the browser refuses. */\nexport async function canvasToBlob(canvas: HTMLCanvasElement, type: \"image/png\" | \"image/jpeg\" | \"image/webp\" = \"image/png\", quality?: number): Promise<Blob> {\n const blob = await new Promise<Blob | null>((resolve) => canvas.toBlob(resolve, type, quality));\n if (!blob) throw new Error(\"The image could not be encoded.\");\n return blob;\n}\n\n/** Capture an element straight to an image Blob. */\nexport async function elementToImage(\n element: HTMLElement,\n options: CaptureOptions & { type?: \"image/png\" | \"image/jpeg\" | \"image/webp\"; quality?: number } = {},\n): Promise<Blob> {\n const { type, quality, ...capture } = options;\n return canvasToBlob(await captureElement(element, capture), type, quality);\n}\n\n/** Options for `renderElement` (html-to-image): the SVG foreignObject renderer. */\nexport type RenderOptions = {\n /** Device-pixel ratio (default 1). */\n pixelRatio?: number;\n width?: number;\n height?: number;\n /** Final canvas size; the render is scaled to it. */\n canvasWidth?: number;\n canvasHeight?: number;\n backgroundColor?: string;\n /** Inline style applied to the cloned root (e.g. a translate to pad the chart). */\n style?: Partial<CSSStyleDeclaration>;\n /** Return false to leave a node out of the picture. */\n filter?(node: HTMLElement): boolean;\n skipFonts?: boolean;\n /** Bust the image cache so a CORS fetch is fresh. */\n cacheBust?: boolean;\n /** Data URL drawn instead of an image that fails to load. */\n imagePlaceholder?: string;\n onImageErrorHandler?(...args: unknown[]): void;\n};\n\n/**\n * Render a live element to a canvas through the SVG foreignObject renderer (html-to-image). It keeps\n * the browser's own layout and fonts where html2canvas re-implements them, and it takes a `filter`\n * and a root `style` override — the right tool for a transformed or panned surface. Loads on first use.\n */\nexport async function renderElement(element: HTMLElement, options: RenderOptions = {}): Promise<HTMLCanvasElement> {\n const { toCanvas } = await import(\"html-to-image\");\n return toCanvas(element, options as Parameters<typeof toCanvas>[1]);\n}\n\n/** `renderElement` answering a PNG data URL (what a chat attachment preview needs besides the Blob). */\nexport async function renderElementToDataUrl(element: HTMLElement, options: RenderOptions = {}): Promise<string> {\n const { toPng } = await import(\"html-to-image\");\n return toPng(element, options as Parameters<typeof toPng>[1]);\n}\n\n/** Lay canvases out as PDF pages (one page each) and answer the PDF Blob — print's `pagesToPdf`. */\nexport async function pagesToPdf(pages: readonly PdfPage[], options: PdfDocumentOptions = {}): Promise<Blob> {\n const { pagesToPdf: layOut } = await import(\"@ai-matrx/print/pdf\");\n return layOut(pages, options);\n}\n\n/**\n * A DOCUMENT as a PDF Blob, through print's html2canvas + jsPDF engine. One element (a page, a\n * response — arbitrarily tall) is sliced into paper pages (print's `captureToPDFBlob`); a list of\n * elements is a designed report whose pages are its own, one PDF page each (`captureElementsToPDFBlob`).\n * Save it with kit `downloadFile`, or upload it. A PICTURE of a surface is `renderElement` →\n * `pagesToPdf` instead (rasteriser ruling A6).\n */\nexport async function captureDocumentPdf(\n element: HTMLElement | readonly HTMLElement[],\n options: DocumentPdfOptions = {},\n): Promise<Blob> {\n const engine = await import(\"@ai-matrx/print/pdf\");\n return Array.isArray(element)\n ? engine.captureElementsToPDFBlob([...element], options)\n : engine.captureToPDFBlob(element as HTMLElement, options);\n}\n\n/** Capture each element and lay them out one per PDF page. */\nexport async function elementsToPdf(\n elements: readonly HTMLElement[],\n options: PdfDocumentOptions & { capture?: CaptureOptions; page?: Omit<PdfPage, \"image\"> } = {},\n): Promise<Blob> {\n const pages: PdfPage[] = [];\n for (const element of elements) pages.push({ ...options.page, image: await captureElement(element, options.capture) });\n return pagesToPdf(pages, options);\n}\n"],"mappings":"AAoBA,eAAsB,eAAe,QAAsB,QAA0B,CAAC,EAA+B,CACnH,GAAM,CAAE,aAAc,EAAI,KAAM,QAAO,qBAAqB,EAC5D,OAAO,cAAc,QAAS,OAAO,CACvC,CAGA,eAAsB,aAAa,OAA2B,KAAkD,YAAa,QAAiC,CAC5J,IAAM,KAAO,MAAM,IAAI,QAAsB,SAAY,OAAO,OAAO,QAAS,KAAM,OAAO,CAAC,EAC9F,GAAI,CAAC,KAAM,MAAM,IAAI,MAAM,iCAAiC,EAC5D,OAAO,IACT,CAGA,eAAsB,eACpB,QACA,QAAmG,CAAC,EACrF,CACf,GAAM,CAAE,KAAM,QAAS,GAAG,OAAQ,EAAI,QACtC,OAAO,aAAa,MAAM,eAAe,QAAS,OAAO,EAAG,KAAM,OAAO,CAC3E,CA6BA,eAAsB,cAAc,QAAsB,QAAyB,CAAC,EAA+B,CACjH,GAAM,CAAE,QAAS,EAAI,KAAM,QAAO,eAAe,EACjD,OAAO,SAAS,QAAS,OAAyC,CACpE,CAGA,eAAsB,uBAAuB,QAAsB,QAAyB,CAAC,EAAoB,CAC/G,GAAM,CAAE,KAAM,EAAI,KAAM,QAAO,eAAe,EAC9C,OAAO,MAAM,QAAS,OAAsC,CAC9D,CAGA,eAAsB,WAAW,MAA2B,QAA8B,CAAC,EAAkB,CAC3G,GAAM,CAAE,WAAY,MAAO,EAAI,KAAM,QAAO,qBAAqB,EACjE,OAAO,OAAO,MAAO,OAAO,CAC9B,CASA,eAAsB,mBACpB,QACA,QAA8B,CAAC,EAChB,CACf,IAAM,OAAS,KAAM,QAAO,qBAAqB,EACjD,OAAO,MAAM,QAAQ,OAAO,EACxB,OAAO,yBAAyB,CAAC,GAAG,OAAO,EAAG,OAAO,EACrD,OAAO,iBAAiB,QAAwB,OAAO,CAC7D,CAGA,eAAsB,cACpB,SACA,QAA4F,CAAC,EAC9E,CACf,IAAM,MAAmB,CAAC,EAC1B,QAAW,WAAW,SAAU,MAAM,KAAK,CAAE,GAAG,QAAQ,KAAM,MAAO,MAAM,eAAe,QAAS,QAAQ,OAAO,CAAE,CAAC,EACrH,OAAO,WAAW,MAAO,OAAO,CAClC","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/alchemy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.2",
|
|
4
4
|
"description": "Matrx Alchemy: the complete Matrx copy, prepare-for-AI, and export experience, with framework-neutral core, React menu, glyph and styles; Declare (what a screen holds: types, registry, validation, JSON schema) and the one surface sync; Actions (the one action registry: eligibility, duplicate refusal, projected reads) and the one menu engine (model + bar, overflow, context, selection, sheet and palette layouts as per-layout React subpaths); Surface (the one SurfacePort runtime: the database surface chain with organization extensions, values, live values a mounted page publishes, item sources, and Action runs).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -366,7 +366,7 @@
|
|
|
366
366
|
"@ai-matrx/print": "latest"
|
|
367
367
|
},
|
|
368
368
|
"scripts": {
|
|
369
|
-
"build": "pnpm clean &&
|
|
369
|
+
"build": "pnpm clean && node ./scripts/build.mjs && node ./scripts/ignore-node-builtins.mjs && node ./scripts/copy-assets.mjs && node ./scripts/assert-distribution-artifacts.mjs && node ./scripts/check-subpath-sizes.mjs && node ../scripts/check-node-env-not-inlined.mjs",
|
|
370
370
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
371
371
|
"check:package": "node ./scripts/generate-declare-schema.mjs --check && node ../scripts/check-kit-never-imports-print.mjs && pnpm build && node ./scripts/check-operate-sizes.mjs && node ./scripts/check-operate-sizes.mjs --self-test && node ./scripts/check-bundled-deps.mjs --self-test && node ./scripts/check-bundled-deps.mjs && node ../scripts/check-exports-agreement.mjs && node ../scripts/check-alchemy-below-agents.mjs && publint && pnpm verify:tarball",
|
|
372
372
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.shipped.json --noEmit",
|