@placeholderco/placeholder-ui 3.3.7 → 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.
@@ -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 codeBlockLanguages.ts,
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';
@@ -293,10 +293,14 @@
293
293
  margin-left: auto;
294
294
  }
295
295
 
296
- header.site .primary.links-container ~ .secondary,
297
- header.site .primary.links-container ~ .right,
298
- header.site .primary.links-container ~ :global(.theme-switcher) {
299
- margin-left: 0;
296
+ /* Wide screens only: on phones the links are hidden and the max-width rules below must
297
+ push the first visible right-hand element to the edge (this selector would outrank them) */
298
+ @media (min-width: 768px) {
299
+ header.site .primary.links-container ~ .secondary,
300
+ header.site .primary.links-container ~ .right,
301
+ header.site .primary.links-container ~ :global(.theme-switcher) {
302
+ margin-left: 0;
303
+ }
300
304
  }
301
305
 
302
306
  @media (max-width: 767px) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@placeholderco/placeholder-ui",
3
- "version": "3.3.7",
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.0",
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.7",
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.33.1",
105
- "@tiptap/extension-bubble-menu": "^3.33.1",
106
- "@tiptap/extension-code-block": "^3.33.1",
107
- "@tiptap/extension-collaboration": "^3.33.1",
108
- "@tiptap/extension-collaboration-caret": "^3.33.1",
109
- "@tiptap/extension-color": "^3.33.1",
110
- "@tiptap/extension-image": "^3.33.1",
111
- "@tiptap/extension-link": "^3.33.1",
112
- "@tiptap/extension-placeholder": "^3.33.1",
113
- "@tiptap/extension-subscript": "^3.33.1",
114
- "@tiptap/extension-superscript": "^3.33.1",
115
- "@tiptap/extension-table": "^3.33.1",
116
- "@tiptap/extension-text-align": "^3.33.1",
117
- "@tiptap/extension-text-style": "^3.33.1",
118
- "@tiptap/extension-underline": "^3.33.1",
119
- "@tiptap/pm": "^3.33.1",
120
- "@tiptap/starter-kit": "^3.33.1",
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"