@placeholderco/placeholder-ui 3.3.8 → 3.3.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/dist/editors/codemirror/languages.d.ts +1 -0
- package/dist/editors/codemirror/languages.js +5 -0
- package/dist/editors/tiptap/extensions/CodeBlockEditor.d.ts +1 -0
- package/dist/editors/tiptap/extensions/CodeBlockEditor.js +1 -0
- package/dist/editors/tiptap/extensions/codeBlockEditor.css +2 -2
- package/dist/editors/tiptap/extensions/codeBlockLanguages.d.ts +0 -1
- package/dist/editors/tiptap/extensions/codeBlockLanguages.js +0 -4
- package/package.json +20 -20
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Extension } from '@codemirror/state';
|
|
2
|
+
import '../tiptap/extensions/codeBlockEditor.css';
|
|
2
3
|
/** Language identifiers shared by the CodeMirror editor and rich code blocks */
|
|
3
4
|
export type CodeLanguageId = 'plaintext' | 'javascript' | 'typescript' | 'html' | 'css' | 'json' | 'markdown' | 'sql' | 'csharp' | 'powershell' | 'python' | 'shell' | 'yaml' | 'xml' | 'toml' | 'ini' | 'dockerfile' | 'diff' | 'log';
|
|
4
5
|
export interface CodeLanguageDef {
|
|
@@ -17,6 +17,11 @@ import { toml } from '@codemirror/legacy-modes/mode/toml';
|
|
|
17
17
|
import { xml } from '@codemirror/legacy-modes/mode/xml';
|
|
18
18
|
import { yaml } from '@codemirror/legacy-modes/mode/yaml';
|
|
19
19
|
import { log } from './log.js';
|
|
20
|
+
// Rich code block styles. Imported here, in a module with real code, so read-only renderers
|
|
21
|
+
// that only call resolveCodeLanguage / resolveCodeBlockLanguage still load them. Don't move this
|
|
22
|
+
// into a re-export-only module: package.json marks .js files side-effect-free, so bundlers skip
|
|
23
|
+
// such modules and drop their CSS imports.
|
|
24
|
+
import '../tiptap/extensions/codeBlockEditor.css';
|
|
20
25
|
// Languages without a native CodeMirror 6 package use legacy stream parsers. Those provide
|
|
21
26
|
// highlighting only, so keyword lists plus word matching stand in for the scope-aware
|
|
22
27
|
// completions the native language packages ship with.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type CodeBlockOptions } from '@tiptap/extension-code-block';
|
|
2
2
|
import { type CodeBlockLanguageId } from './codeBlockLanguages.js';
|
|
3
|
+
import './codeBlockEditor.css';
|
|
3
4
|
/** Configuration accepted by the `codeBlocks` prop on TipTap / TipTapBubble */
|
|
4
5
|
export interface CodeBlocksOptions {
|
|
5
6
|
/** Languages offered in the code block language picker (default: all registered) */
|
|
@@ -8,6 +8,7 @@ import { autocompletion, closeBrackets, closeBracketsKeymap, completionKeymap }
|
|
|
8
8
|
import { bracketMatching, indentOnInput, syntaxHighlighting } from '@codemirror/language';
|
|
9
9
|
import { classHighlighter } from '@lezer/highlight';
|
|
10
10
|
import { codeBlockLanguages, resolveCodeBlockLanguage } from './codeBlockLanguages.js';
|
|
11
|
+
import './codeBlockEditor.css';
|
|
11
12
|
/**
|
|
12
13
|
* Renders each code block as an embedded CodeMirror editor, following the
|
|
13
14
|
* ProseMirror codemirror node view pattern: CodeMirror owns the block's text and
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Styles for CodeMirror-powered code blocks (the CodeBlockEditor TipTap extension and
|
|
2
|
-
read-only renderers built on resolveCodeBlockLanguage). Loaded via
|
|
3
|
-
or import '@placeholderco/placeholder-ui/code-block.css' directly.
|
|
2
|
+
read-only renderers built on resolveCodeBlockLanguage). Loaded via CodeBlockEditor.ts and
|
|
3
|
+
codemirror/languages.ts, or import '@placeholderco/placeholder-ui/code-block.css' directly.
|
|
4
4
|
Syntax colors target the stable tok-* classes emitted by @lezer/highlight's
|
|
5
5
|
classHighlighter: light palette follows CodeMirror's default highlight style,
|
|
6
6
|
dark palette follows One Dark. Dark mode uses the library's `.dark` root class. */
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import './codeBlockEditor.css';
|
|
2
1
|
export { codeLanguages as codeBlockLanguages, resolveCodeLanguage as resolveCodeBlockLanguage } from '../../codemirror/languages.js';
|
|
3
2
|
export type { CodeLanguageDef as CodeBlockLanguageDef, CodeLanguageId as CodeBlockLanguageId } from '../../codemirror/languages.js';
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
// Code block styles are imported here rather than in CodeBlockEditor so that read-only
|
|
2
|
-
// renderers using only resolveCodeBlockLanguage still load them. Production builds split
|
|
3
|
-
// CSS per chunk, so an import that lives only in the editor would not reach those routes.
|
|
4
|
-
import './codeBlockEditor.css';
|
|
5
1
|
// Code blocks and the CodeMirror component share one registry; these names predate it.
|
|
6
2
|
export { codeLanguages as codeBlockLanguages, resolveCodeLanguage as resolveCodeBlockLanguage } from '../../codemirror/languages.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@placeholderco/placeholder-ui",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.9",
|
|
4
4
|
"description": "A modern, customizable Svelte 5 UI component library with comprehensive theming support. Re-brand it with a single config object.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Placeholderco",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
76
76
|
"@types/node": "^26.6.6",
|
|
77
77
|
"globals": "^17.14.0",
|
|
78
|
-
"prettier": "^3.10.
|
|
78
|
+
"prettier": "^3.10.1",
|
|
79
79
|
"prettier-plugin-svelte": "^4.1.1",
|
|
80
80
|
"publint": "^0.3.25",
|
|
81
81
|
"rimraf": "^6.1.4",
|
|
@@ -95,29 +95,29 @@
|
|
|
95
95
|
"@codemirror/lang-sql": "^6.10.0",
|
|
96
96
|
"@codemirror/language": "^6.13.1",
|
|
97
97
|
"@codemirror/legacy-modes": "^6.5.5",
|
|
98
|
-
"@codemirror/lint": "^6.9.
|
|
98
|
+
"@codemirror/lint": "^6.9.8",
|
|
99
99
|
"@codemirror/search": "^6.7.2",
|
|
100
100
|
"@codemirror/state": "^6.7.6",
|
|
101
101
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
102
102
|
"@codemirror/view": "^6.43.15",
|
|
103
103
|
"@lezer/highlight": "^1.2.5",
|
|
104
|
-
"@tiptap/core": "^3.
|
|
105
|
-
"@tiptap/extension-bubble-menu": "^3.
|
|
106
|
-
"@tiptap/extension-code-block": "^3.
|
|
107
|
-
"@tiptap/extension-collaboration": "^3.
|
|
108
|
-
"@tiptap/extension-collaboration-caret": "^3.
|
|
109
|
-
"@tiptap/extension-color": "^3.
|
|
110
|
-
"@tiptap/extension-image": "^3.
|
|
111
|
-
"@tiptap/extension-link": "^3.
|
|
112
|
-
"@tiptap/extension-placeholder": "^3.
|
|
113
|
-
"@tiptap/extension-subscript": "^3.
|
|
114
|
-
"@tiptap/extension-superscript": "^3.
|
|
115
|
-
"@tiptap/extension-table": "^3.
|
|
116
|
-
"@tiptap/extension-text-align": "^3.
|
|
117
|
-
"@tiptap/extension-text-style": "^3.
|
|
118
|
-
"@tiptap/extension-underline": "^3.
|
|
119
|
-
"@tiptap/pm": "^3.
|
|
120
|
-
"@tiptap/starter-kit": "^3.
|
|
104
|
+
"@tiptap/core": "^3.34.0",
|
|
105
|
+
"@tiptap/extension-bubble-menu": "^3.34.0",
|
|
106
|
+
"@tiptap/extension-code-block": "^3.34.0",
|
|
107
|
+
"@tiptap/extension-collaboration": "^3.34.0",
|
|
108
|
+
"@tiptap/extension-collaboration-caret": "^3.34.0",
|
|
109
|
+
"@tiptap/extension-color": "^3.34.0",
|
|
110
|
+
"@tiptap/extension-image": "^3.34.0",
|
|
111
|
+
"@tiptap/extension-link": "^3.34.0",
|
|
112
|
+
"@tiptap/extension-placeholder": "^3.34.0",
|
|
113
|
+
"@tiptap/extension-subscript": "^3.34.0",
|
|
114
|
+
"@tiptap/extension-superscript": "^3.34.0",
|
|
115
|
+
"@tiptap/extension-table": "^3.34.0",
|
|
116
|
+
"@tiptap/extension-text-align": "^3.34.0",
|
|
117
|
+
"@tiptap/extension-text-style": "^3.34.0",
|
|
118
|
+
"@tiptap/extension-underline": "^3.34.0",
|
|
119
|
+
"@tiptap/pm": "^3.34.0",
|
|
120
|
+
"@tiptap/starter-kit": "^3.34.0",
|
|
121
121
|
"dayjs": "^1.11.23",
|
|
122
122
|
"svelte-sonner": "^1.2.3",
|
|
123
123
|
"yjs": "^13.6.33"
|