@placeholderco/placeholder-ui 3.2.7 → 3.2.8

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.
@@ -1,6 +1,5 @@
1
1
  import { type CodeBlockOptions } from '@tiptap/extension-code-block';
2
2
  import { type CodeBlockLanguageId } from './codeBlockLanguages.js';
3
- import './codeBlockEditor.css';
4
3
  /** Configuration accepted by the `codeBlocks` prop on TipTap / TipTapBubble */
5
4
  export interface CodeBlocksOptions {
6
5
  /** Languages offered in the code block language picker (default: all registered) */
@@ -8,7 +8,6 @@ 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';
12
11
  /**
13
12
  * Renders each code block as an embedded CodeMirror editor, following the
14
13
  * ProseMirror codemirror node view pattern: CodeMirror owns the block's text and
@@ -1,4 +1,6 @@
1
- /* Styles for the CodeBlockEditor TipTap extension (CodeMirror-powered code blocks).
1
+ /* Styles for CodeMirror-powered code blocks (the CodeBlockEditor TipTap extension and
2
+ read-only renderers built on resolveCodeBlockLanguage). Loaded via codeBlockLanguages.ts,
3
+ or import '@placeholderco/placeholder-ui/code-block.css' directly.
2
4
  Syntax colors target the stable tok-* classes emitted by @lezer/highlight's
3
5
  classHighlighter: light palette follows CodeMirror's default highlight style,
4
6
  dark palette follows One Dark. Dark mode uses the library's `.dark` root class. */
@@ -1,4 +1,5 @@
1
1
  import type { Extension } from '@codemirror/state';
2
+ import './codeBlockEditor.css';
2
3
  /** Language identifiers supported by the rich code block editor */
3
4
  export type CodeBlockLanguageId = 'plaintext' | 'javascript' | 'typescript' | 'html' | 'css' | 'json' | 'markdown' | 'sql' | 'csharp' | 'powershell';
4
5
  export interface CodeBlockLanguageDef {
@@ -8,6 +8,10 @@ import { LanguageSupport, StreamLanguage } from '@codemirror/language';
8
8
  import { completeAnyWord, completeFromList } from '@codemirror/autocomplete';
9
9
  import { csharp } from '@codemirror/legacy-modes/mode/clike';
10
10
  import { powerShell } from '@codemirror/legacy-modes/mode/powershell';
11
+ // Code block styles are imported here rather than in CodeBlockEditor so that read-only
12
+ // renderers using only resolveCodeBlockLanguage still load them. Production builds split
13
+ // CSS per chunk, so an import that lives only in the editor would not reach those routes.
14
+ import './codeBlockEditor.css';
11
15
  // C# and PowerShell have no native CodeMirror 6 packages, so they use legacy stream
12
16
  // parsers. Those provide highlighting only, so keyword/cmdlet lists plus word matching
13
17
  // stand in for the scope-aware completions the native language packages ship with.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@placeholderco/placeholder-ui",
3
- "version": "3.2.7",
3
+ "version": "3.2.8",
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",
@@ -61,7 +61,8 @@
61
61
  "default": "./dist/codemirror/highlight.js"
62
62
  },
63
63
  "./app.css": "./dist/app.css",
64
- "./styles.css": "./dist/styles.css"
64
+ "./styles.css": "./dist/styles.css",
65
+ "./code-block.css": "./dist/editors/tiptap/extensions/codeBlockEditor.css"
65
66
  },
66
67
  "peerDependencies": {
67
68
  "@sveltejs/kit": "^2.26.0 || ^3.0.0",