use-chisel 0.1.8 → 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/README.md +3 -2
- package/dist/hosted-entry.js +4 -133
- package/dist/index.js +5 -168
- package/dist/review-content-entry.js +2 -2
- package/dist/review-entry.js +3 -3
- package/dist/workspace-entry.js +7 -346
- package/package.json +4 -4
- package/dist/persistence.d.ts +0 -30
- package/dist/review/media-lightbox.d.ts +0 -8
- package/dist/theme.d.ts +0 -1
- package/dist/workspace/area.d.ts +0 -10
- package/dist/workspace/color-picker.d.ts +0 -6
- package/dist/workspace/color.d.ts +0 -9
- package/dist/workspace/comment-drag-handle.d.ts +0 -3
- package/dist/workspace/composer-position.d.ts +0 -13
- package/dist/workspace/confirmation.d.ts +0 -11
- package/dist/workspace/hover-dismiss.d.ts +0 -4
- package/dist/workspace/mode-shortcuts.d.ts +0 -1
- package/dist/workspace/page-control.d.ts +0 -7
- package/dist/workspace/preview-navigation.d.ts +0 -4
- package/dist/workspace/thread-morph.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "use-chisel",
|
|
3
|
-
"version": "0.1.
|
|
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": "
|
|
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
|
}
|
package/dist/persistence.d.ts
DELETED
|
@@ -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;
|
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";
|
package/dist/workspace/area.d.ts
DELETED
|
@@ -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,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 +0,0 @@
|
|
|
1
|
-
export declare function modeShortcut(event: KeyboardEvent): "comment" | "edit" | "view" | "toggle-comments" | undefined;
|
|
@@ -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;
|