@haklex/rich-ext-code-snippet 0.26.4 → 0.26.6
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/dist/{CodeSnippetNode-B2wZFBh6.js → CodeSnippetNode-DIyfPOdA.js} +4 -4
- package/dist/{edit-CCwT5iqK.js → edit-CdAf0hrI.js} +4 -22
- package/dist/edit.mjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{node-DpGd-RRA.js → node-DCc-pqKW.js} +1 -1
- package/dist/node.mjs +2 -2
- package/dist/static.mjs +2 -2
- package/package.json +12 -11
|
@@ -9,7 +9,7 @@ import { createRendererDecoration } from "@haklex/rich-editor/renderers";
|
|
|
9
9
|
*/
|
|
10
10
|
var CODE_SNIPPET_NODE_KEY = "CodeSnippet";
|
|
11
11
|
//#endregion
|
|
12
|
-
//#region \0@oxc-project+runtime@0.
|
|
12
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
|
|
13
13
|
function _typeof(o) {
|
|
14
14
|
"@babel/helpers - typeof";
|
|
15
15
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -19,7 +19,7 @@ function _typeof(o) {
|
|
|
19
19
|
}, _typeof(o);
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
|
22
|
-
//#region \0@oxc-project+runtime@0.
|
|
22
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
|
|
23
23
|
function toPrimitive(t, r) {
|
|
24
24
|
if ("object" != _typeof(t) || !t) return t;
|
|
25
25
|
var e = t[Symbol.toPrimitive];
|
|
@@ -31,13 +31,13 @@ function toPrimitive(t, r) {
|
|
|
31
31
|
return ("string" === r ? String : Number)(t);
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
|
-
//#region \0@oxc-project+runtime@0.
|
|
34
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
|
|
35
35
|
function toPropertyKey(t) {
|
|
36
36
|
var i = toPrimitive(t, "string");
|
|
37
37
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
40
|
-
//#region \0@oxc-project+runtime@0.
|
|
40
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
|
|
41
41
|
function _defineProperty(e, r, t) {
|
|
42
42
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
43
43
|
value: t,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { C as modalSidebar, D as semanticClassNames, E as renameInput, O as sidebarAddButton, S as modalIconButton, T as modalTitlebar, _ as fileList, a as breadcrumbLeft, b as modalBody, c as dragOverlay, d as editOverlay, f as editorContainer, g as fileItem, h as fileIcon, k as sidebarHeader, l as editContainer, m as fileDragHandle, n as getLanguageFromFilename, r as breadcrumb, s as codeSnippetDialogPopup, t as CodeSnippetRenderer, u as editLabel, v as fileName, w as modalTitle, x as modalEditor, y as modal } from "./CodeSnippetRenderer-B8BuxVDx.js";
|
|
2
|
-
import { i as _defineProperty, n as $isCodeSnippetNode, r as CodeSnippetNode } from "./CodeSnippetNode-
|
|
2
|
+
import { i as _defineProperty, n as $isCodeSnippetNode, r as CodeSnippetNode } from "./CodeSnippetNode-DIyfPOdA.js";
|
|
3
3
|
import { $getNodeByKey, $insertNodes } from "lexical";
|
|
4
4
|
import { FileCode, GripVertical, Pencil, Plus, Trash2, X } from "lucide-react";
|
|
5
|
-
import {
|
|
5
|
+
import { createElement, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
6
|
+
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
6
7
|
import { useColorScheme } from "@haklex/rich-editor/static";
|
|
7
8
|
import { presentDialog } from "@haklex/rich-editor-ui";
|
|
8
9
|
import { usePortalTheme } from "@haklex/rich-style-token";
|
|
@@ -17,25 +18,6 @@ import { normalizeLanguage } from "@haklex/rich-renderer-codeblock/constants";
|
|
|
17
18
|
import { FileIcon } from "@haklex/rich-renderer-codeblock/icons";
|
|
18
19
|
import { createPortal } from "react-dom";
|
|
19
20
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
-
//#region ../../node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.6_react@19.2.6__react@19.2.6_yjs@13.6.29/node_modules/@lexical/react/dist/LexicalComposerContext.prod.mjs
|
|
21
|
-
/**
|
|
22
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
var r = createContext(null);
|
|
29
|
-
function o() {
|
|
30
|
-
const n = useContext(r);
|
|
31
|
-
return n ?? function(n, ...e) {
|
|
32
|
-
const r = new URL("https://lexical.dev/docs/error"), t = new URLSearchParams();
|
|
33
|
-
t.append("code", n);
|
|
34
|
-
for (const n of e) t.append("v", n);
|
|
35
|
-
throw r.search = t.toString(), Error(`Minified Lexical error #${n}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
36
|
-
}(8), n;
|
|
37
|
-
}
|
|
38
|
-
//#endregion
|
|
39
21
|
//#region src/CodeEditorModal.tsx
|
|
40
22
|
var SortableFileItem = ({ file, isActive, isEditing, editValue, canDelete, onSelect, onStartRename, onEditChange, onCommitRename, onCancelRename, onDelete }) => {
|
|
41
23
|
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: file.filename });
|
|
@@ -353,7 +335,7 @@ var CodeSnippetEditRenderer = ({ files, onFilesChange }) => {
|
|
|
353
335
|
//#endregion
|
|
354
336
|
//#region src/CodeSnippetEditDecorator.tsx
|
|
355
337
|
var CodeSnippetEditDecorator = ({ nodeKey, files }) => {
|
|
356
|
-
const [editor] =
|
|
338
|
+
const [editor] = useLexicalComposerContext();
|
|
357
339
|
return /* @__PURE__ */ jsx(CodeSnippetEditRenderer, {
|
|
358
340
|
files,
|
|
359
341
|
onFilesChange: useCallback((newFiles) => {
|
package/dist/edit.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as __augmentLoaded_code_snippet } from "./augment-B79wHSjn.js";
|
|
2
|
-
import { a as CodeSnippetEditRenderer, i as CodeSnippetEditNode, n as $createCodeSnippetEditNode, r as $isCodeSnippetEditNode, t as codeSnippetEditNodes } from "./edit-
|
|
2
|
+
import { a as CodeSnippetEditRenderer, i as CodeSnippetEditNode, n as $createCodeSnippetEditNode, r as $isCodeSnippetEditNode, t as codeSnippetEditNodes } from "./edit-CdAf0hrI.js";
|
|
3
3
|
export { $createCodeSnippetEditNode, $isCodeSnippetEditNode, CodeSnippetEditNode, CodeSnippetEditRenderer, __augmentLoaded_code_snippet, codeSnippetEditNodes };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __augmentLoaded_code_snippet } from "./augment-B79wHSjn.js";
|
|
2
2
|
import { t as CodeSnippetRenderer } from "./CodeSnippetRenderer-B8BuxVDx.js";
|
|
3
|
-
import { a as CodeSnippetEditRenderer, i as CodeSnippetEditNode, n as $createCodeSnippetEditNode, r as $isCodeSnippetEditNode, t as codeSnippetEditNodes } from "./edit-
|
|
4
|
-
import { a as CODE_SNIPPET_NODE_KEY, n as $isCodeSnippetNode, r as CodeSnippetNode, t as $createCodeSnippetNode } from "./CodeSnippetNode-
|
|
5
|
-
import { n as CODE_SNIPPET_BLOCK_TRANSFORMER, t as codeSnippetNodes } from "./node-
|
|
3
|
+
import { a as CodeSnippetEditRenderer, i as CodeSnippetEditNode, n as $createCodeSnippetEditNode, r as $isCodeSnippetEditNode, t as codeSnippetEditNodes } from "./edit-CdAf0hrI.js";
|
|
4
|
+
import { a as CODE_SNIPPET_NODE_KEY, n as $isCodeSnippetNode, r as CodeSnippetNode, t as $createCodeSnippetNode } from "./CodeSnippetNode-DIyfPOdA.js";
|
|
5
|
+
import { n as CODE_SNIPPET_BLOCK_TRANSFORMER, t as codeSnippetNodes } from "./node-DCc-pqKW.js";
|
|
6
6
|
import "./renderer.mjs";
|
|
7
7
|
export { $createCodeSnippetEditNode, $createCodeSnippetNode, $isCodeSnippetEditNode, $isCodeSnippetNode, CODE_SNIPPET_BLOCK_TRANSFORMER, CODE_SNIPPET_NODE_KEY, CodeSnippetEditNode, CodeSnippetEditRenderer, CodeSnippetNode, CodeSnippetRenderer, __augmentLoaded_code_snippet, codeSnippetEditNodes, codeSnippetNodes };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as CodeSnippetNode } from "./CodeSnippetNode-
|
|
1
|
+
import { r as CodeSnippetNode } from "./CodeSnippetNode-DIyfPOdA.js";
|
|
2
2
|
import { CODE_SNIPPET_BLOCK_TRANSFORMER } from "@haklex/rich-headless/transformers";
|
|
3
3
|
//#region src/node.ts
|
|
4
4
|
var codeSnippetNodes = [CodeSnippetNode];
|
package/dist/node.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { t as __augmentLoaded_code_snippet } from "./augment-B79wHSjn.js";
|
|
2
|
-
import { a as CODE_SNIPPET_NODE_KEY, n as $isCodeSnippetNode, r as CodeSnippetNode, t as $createCodeSnippetNode } from "./CodeSnippetNode-
|
|
3
|
-
import { n as CODE_SNIPPET_BLOCK_TRANSFORMER, t as codeSnippetNodes } from "./node-
|
|
2
|
+
import { a as CODE_SNIPPET_NODE_KEY, n as $isCodeSnippetNode, r as CodeSnippetNode, t as $createCodeSnippetNode } from "./CodeSnippetNode-DIyfPOdA.js";
|
|
3
|
+
import { n as CODE_SNIPPET_BLOCK_TRANSFORMER, t as codeSnippetNodes } from "./node-DCc-pqKW.js";
|
|
4
4
|
export { $createCodeSnippetNode, $isCodeSnippetNode, CODE_SNIPPET_BLOCK_TRANSFORMER, CODE_SNIPPET_NODE_KEY, CodeSnippetNode, __augmentLoaded_code_snippet, codeSnippetNodes };
|
package/dist/static.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __augmentLoaded_code_snippet } from "./augment-B79wHSjn.js";
|
|
2
2
|
import { t as CodeSnippetRenderer } from "./CodeSnippetRenderer-B8BuxVDx.js";
|
|
3
|
-
import { a as CODE_SNIPPET_NODE_KEY, n as $isCodeSnippetNode, r as CodeSnippetNode, t as $createCodeSnippetNode } from "./CodeSnippetNode-
|
|
4
|
-
import { n as CODE_SNIPPET_BLOCK_TRANSFORMER, t as codeSnippetNodes } from "./node-
|
|
3
|
+
import { a as CODE_SNIPPET_NODE_KEY, n as $isCodeSnippetNode, r as CodeSnippetNode, t as $createCodeSnippetNode } from "./CodeSnippetNode-DIyfPOdA.js";
|
|
4
|
+
import { n as CODE_SNIPPET_BLOCK_TRANSFORMER, t as codeSnippetNodes } from "./node-DCc-pqKW.js";
|
|
5
5
|
import "./renderer.mjs";
|
|
6
6
|
export { $createCodeSnippetNode, $isCodeSnippetNode, CODE_SNIPPET_BLOCK_TRANSFORMER, CODE_SNIPPET_NODE_KEY, CodeSnippetNode, CodeSnippetRenderer, __augmentLoaded_code_snippet, codeSnippetNodes };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-ext-code-snippet",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.6",
|
|
4
4
|
"description": "Multi-file code snippet extension",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@codemirror/commands": "^6.10.3",
|
|
41
41
|
"@codemirror/state": "^6.6.0",
|
|
42
|
-
"@codemirror/view": "^6.43.
|
|
42
|
+
"@codemirror/view": "^6.43.1",
|
|
43
43
|
"@dnd-kit/core": "^6.3.1",
|
|
44
44
|
"@dnd-kit/sortable": "^10.0.0",
|
|
45
45
|
"@dnd-kit/utilities": "^3.2.2",
|
|
46
|
-
"@haklex/
|
|
47
|
-
"@haklex/rich-headless": "0.26.
|
|
48
|
-
"@haklex/
|
|
46
|
+
"@haklex/rich-renderer-codeblock": "0.26.6",
|
|
47
|
+
"@haklex/rich-headless": "0.26.6",
|
|
48
|
+
"@haklex/cm-editor": "0.26.6"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@lexical/react": "^0.45.0",
|
|
52
|
-
"@types/react": "^19.2.
|
|
52
|
+
"@types/react": "^19.2.17",
|
|
53
53
|
"@types/react-dom": "^19.2.3",
|
|
54
54
|
"@vanilla-extract/css": "^1.20.1",
|
|
55
55
|
"@vanilla-extract/recipes": "^0.5.7",
|
|
@@ -59,17 +59,18 @@
|
|
|
59
59
|
"react-dom": "19.2.6",
|
|
60
60
|
"shiki": "^4.2.0",
|
|
61
61
|
"typescript": "^5.9.3",
|
|
62
|
-
"unplugin-dts": "^1.0.
|
|
63
|
-
"vite": "^8.0.
|
|
62
|
+
"unplugin-dts": "^1.0.2",
|
|
63
|
+
"vite": "^8.0.16"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
+
"@lexical/react": "^0.45.0",
|
|
66
67
|
"lexical": "^0.45.0",
|
|
67
68
|
"lucide-react": "^1.0.0",
|
|
68
69
|
"react": ">=19",
|
|
69
70
|
"shiki": ">=4.0.0",
|
|
70
|
-
"@haklex/rich-editor": "^0.26.
|
|
71
|
-
"@haklex/rich-editor-ui": "^0.26.
|
|
72
|
-
"@haklex/rich-style-token": "^0.26.
|
|
71
|
+
"@haklex/rich-editor": "^0.26.6",
|
|
72
|
+
"@haklex/rich-editor-ui": "^0.26.6",
|
|
73
|
+
"@haklex/rich-style-token": "^0.26.6"
|
|
73
74
|
},
|
|
74
75
|
"publishConfig": {
|
|
75
76
|
"access": "public"
|