use-chisel 0.1.7 → 0.1.9

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": "use-chisel",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Dev-only visual editing layer for Next.js apps.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -63,7 +63,7 @@
63
63
  "access": "public"
64
64
  },
65
65
  "scripts": {
66
- "build": "tsc -p tsconfig.json && node -e \"const fs=require('node:fs');for(const f of ['review-ui.css','workspace-design.css'])fs.copyFileSync('src/review/'+f,'dist/review/'+f)\" && esbuild dist/index.js dist/workspace-entry.js dist/hosted-entry.js dist/review-entry.js dist/review-content-entry.js --bundle --minify --format=esm --platform=browser --loader:.css=text --external:react --external:react/jsx-runtime --external:react-dom --external:use-chisel --external:slate --external:slate-history --external:slate-react --define:process.env.NODE_ENV=process.env.NODE_ENV --outdir=dist --allow-overwrite",
66
+ "build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json --emitDeclarationOnly && node build.mjs",
67
67
  "prepack": "npm run build",
68
68
  "test": "vitest run",
69
69
  "typecheck": "tsc -p tsconfig.json --noEmit"
@@ -74,7 +74,6 @@
74
74
  "react-dom": ">=18 <20"
75
75
  },
76
76
  "dependencies": {
77
- "lucide-react": "^1.61.0",
78
77
  "slate": "^0.110.2",
79
78
  "slate-history": "^0.110.3",
80
79
  "slate-react": "^0.110.3"
@@ -83,6 +82,7 @@
83
82
  "@types/react": "^18.3.3",
84
83
  "@types/react-dom": "^18.3.7",
85
84
  "esbuild": "^0.28.1",
86
- "vitest": "^5.0.5"
85
+ "vitest": "^5.0.5",
86
+ "lucide-react": "^1.61.0"
87
87
  }
88
88
  }
@@ -1,30 +0,0 @@
1
- export declare const STORAGE_SCHEMA_VERSION: 1;
2
- export type StoredElementChange = {
3
- selector: string;
4
- sourceHint?: string;
5
- text?: string;
6
- styles: Partial<Record<string, string>>;
7
- asset?: {
8
- fileName: string;
9
- mimeType: string;
10
- size: number;
11
- };
12
- };
13
- export type StoredVersion = {
14
- id: string;
15
- name: string;
16
- elements: Record<string, StoredElementChange>;
17
- };
18
- export type VersionEnvelope = {
19
- schemaVersion: typeof STORAGE_SCHEMA_VERSION;
20
- activeVersionId: string;
21
- versions: StoredVersion[];
22
- };
23
- export type StorageResult = {
24
- envelope?: VersionEnvelope;
25
- warning?: string;
26
- migrated: boolean;
27
- };
28
- export declare function createVersionEnvelope(versions: StoredVersion[], activeVersionId: string): VersionEnvelope;
29
- export declare function parseVersionStorage(raw: string | null): StorageResult;
30
- export declare function isVersionEnvelope(value: unknown): value is VersionEnvelope;
@@ -1,8 +0,0 @@
1
- type Media = {
2
- src: string;
3
- name: string;
4
- mimeType: string;
5
- onError?(): void;
6
- };
7
- export declare function MediaPreview({ src, name, mimeType, onError }: Media): import("react").JSX.Element;
8
- export {};
package/dist/theme.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const themeCSS = "\n:is(.chisel-root,.feedback-shell,.chisel-sign-in,.chisel-color-picker,.comment-box) :focus{outline:none}\n.chisel-root,.feedback-shell,.chisel-sign-in,.chisel-color-picker,.comment-box{color-scheme:light;--chisel-ui-panel-shadow:0 4px 20px rgba(0,0,0,.08);--chisel-ui-canvas:#f7f7f7;--chisel-ui-surface:#ffffff;--chisel-ui-raised:#f5f5f5;--chisel-ui-inset:#eeeeee;--chisel-ui-hover:#f0f0f0;--chisel-ui-selected:#eaeaea;--chisel-ui-border:#e2e2e2;--chisel-ui-border-strong:#c4c4c4;--chisel-ui-text:#242424;--chisel-ui-secondary:#626262;--chisel-ui-muted:#686868;--chisel-ui-focus:#2468d3;--chisel-ui-accent-text:#2468d3;--chisel-ui-accent-surface:#edf4ff;--chisel-ui-action:#242424;--chisel-ui-action-text:#ffffff;--chisel-ui-danger:#b33737;--chisel-ui-avatar:#ededed;--chisel-ui-avatar-text:#565656;--chisel-ui-scrollbar:#c2c2c2;--chisel-ui-checker-light:#e5e5e5;--chisel-ui-checker-dark:#c7c7c7;}\n@media(prefers-color-scheme:dark){.chisel-root,.feedback-shell,.chisel-sign-in,.chisel-color-picker,.comment-box{color-scheme:dark;--chisel-ui-panel-shadow:0 4px 20px #0003;--chisel-ui-canvas:#171717;--chisel-ui-surface:#222222;--chisel-ui-raised:#2a2a2a;--chisel-ui-inset:#191919;--chisel-ui-hover:#303030;--chisel-ui-selected:#383838;--chisel-ui-border:#3c3c3c;--chisel-ui-border-strong:#555555;--chisel-ui-text:#ededed;--chisel-ui-secondary:#b7b7b7;--chisel-ui-muted:#a5a5a5;--chisel-ui-focus:#8bb9ff;--chisel-ui-accent-text:#8bb9ff;--chisel-ui-accent-surface:#253447;--chisel-ui-action:#ededed;--chisel-ui-action-text:#111111;--chisel-ui-danger:#ffa5a5;--chisel-ui-avatar:#383838;--chisel-ui-avatar-text:#cccccc;--chisel-ui-scrollbar:#50504d;--chisel-ui-checker-light:#555555;--chisel-ui-checker-dark:#333333;}\n}\n\n.chisel-root,.feedback-shell,.chisel-sign-in,.chisel-color-picker,.comment-box{--chisel-ui-font:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif;--chisel-ui-space:4px;--chisel-ui-control:40px;--chisel-ui-radius:8px;--chisel-ui-text-size:13px;--chisel-ui-small:12px;--chisel-ui-motion:120ms cubic-bezier(.2,0,0,1);--chisel-ui-popover-shadow:0 2px 6px #0000000f,0 12px 36px #0000001f;}\n@media(prefers-color-scheme:dark){.chisel-root,.feedback-shell,.chisel-sign-in,.chisel-color-picker,.comment-box{--chisel-ui-popover-shadow:0 0 0 1px #ffffff0d,0 4px 12px #0003,0 16px 40px #0004;}}\n";
@@ -1,6 +0,0 @@
1
- export default function ColorPicker({ label, value, onChange, disabled }: {
2
- label: string;
3
- value: string;
4
- onChange(value: string): void;
5
- disabled: boolean;
6
- }): import("react").JSX.Element;
@@ -1,9 +0,0 @@
1
- export type HSV = {
2
- h: number;
3
- s: number;
4
- v: number;
5
- a: number;
6
- };
7
- export declare function rgbToHsv(r: number, g: number, b: number, a?: number): HSV;
8
- export declare function hsvToHex({ h, s, v, a }: HSV): string;
9
- export declare function readColor(value: string): HSV;
@@ -1,3 +0,0 @@
1
- export default function CommentDragHandle({ onMoveStart }: {
2
- onMoveStart?: () => void;
3
- }): import("react").JSX.Element;
@@ -1,13 +0,0 @@
1
- type Size = {
2
- width: number;
3
- height: number;
4
- };
5
- export declare function composerPosition(pin: {
6
- x: number;
7
- y: number;
8
- }, card: Size, viewport: Size): {
9
- left: number;
10
- top: number;
11
- maxHeight: number;
12
- };
13
- export {};
@@ -1,11 +0,0 @@
1
- type Confirmation = {
2
- title: string;
3
- description: string;
4
- action: string;
5
- danger?: boolean;
6
- };
7
- export declare function useConfirmation(): {
8
- confirm: (next: Confirmation) => Promise<boolean>;
9
- dialog: import("react").JSX.Element | null;
10
- };
11
- export {};
@@ -1,4 +0,0 @@
1
- export declare function createHoverDismiss(onClose: () => void): {
2
- cancel: () => void;
3
- schedule(): void;
4
- };
@@ -1 +0,0 @@
1
- export declare function modeShortcut(event: KeyboardEvent): "comment" | "edit" | "view" | "toggle-comments" | undefined;
@@ -1,7 +0,0 @@
1
- export default function PageControl({ path, routes, disabled, onNavigate, onOpen }: {
2
- path: string;
3
- routes: string[];
4
- disabled: boolean;
5
- onNavigate(input: string): Promise<boolean>;
6
- onOpen?(): void;
7
- }): import("react").JSX.Element;
@@ -1,4 +0,0 @@
1
- export declare function normalizePreviewPath(input: string, origin: string, currentPath?: string): string | null;
2
- export declare function previewPagePath(path: string): string;
3
- export declare function previewPath(win: Pick<Window, "location">): string | null;
4
- export declare function observePreviewNavigation(win: Window, onNavigate: (path: string) => void): () => void;
@@ -1 +0,0 @@
1
- export declare function animateThread(card: HTMLElement, closing?: boolean, previous?: Animation | null): Animation | null;