@tableslayer/ui 0.2.7 → 0.2.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.
@@ -2,7 +2,6 @@
2
2
  import { onMount, onDestroy } from 'svelte';
3
3
  import { Editor, type JSONContent } from '@tiptap/core';
4
4
  import StarterKit from '@tiptap/starter-kit';
5
- import { Link } from '@tiptap/extension-link';
6
5
  import Typography from '@tiptap/extension-typography';
7
6
  import {
8
7
  IconBold,
@@ -114,8 +113,10 @@
114
113
 
115
114
  // Only update if content actually changed (avoid infinite loops)
116
115
  if (JSON.stringify(currentContent) !== JSON.stringify(content)) {
117
- // Update editor with new content from outside
118
- editor.commands.setContent(content || { type: 'doc', content: [{ type: 'paragraph' }] });
116
+ // External content is not a user edit, so don't echo it through onUpdate/onChange
117
+ editor.commands.setContent(content || { type: 'doc', content: [{ type: 'paragraph' }] }, {
118
+ emitUpdate: false
119
+ });
119
120
  }
120
121
  }
121
122
  });
@@ -158,14 +159,16 @@
158
159
  editable,
159
160
  element: element,
160
161
  extensions: [
161
- StarterKit,
162
- Typography,
163
- Link.configure({
164
- openOnClick: false,
165
- HTMLAttributes: {
166
- class: 'editor-link'
162
+ // StarterKit already bundles Link; registering it twice duplicates its plugins
163
+ StarterKit.configure({
164
+ link: {
165
+ openOnClick: false,
166
+ HTMLAttributes: {
167
+ class: 'editor-link'
168
+ }
167
169
  }
168
- })
170
+ }),
171
+ Typography
169
172
  ],
170
173
  content: initialContent, // Pass content with fallback for null/undefined
171
174
  onSelectionUpdate: () => {
@@ -567,7 +570,7 @@
567
570
  <div class="editor__toolbarTextOptions">
568
571
  <button
569
572
  onclick={() => editor?.chain().focus().setParagraph().run()}
570
- class:active={['editor__toolbarTextP', isParagraph && 'isActive']}
573
+ class={['editor__toolbarTextP', isParagraph && 'isActive']}
571
574
  >
572
575
  Normal
573
576
  </button>
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1 @@
1
- "use strict";
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tableslayer/ui",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "license": "FSL-1.1-ALv2",
5
5
  "repository": {
6
6
  "type": "git",
@@ -49,20 +49,20 @@
49
49
  "!dist/**/*.spec.*"
50
50
  ],
51
51
  "peerDependencies": {
52
- "@sveltejs/kit": "^2.16.0",
52
+ "@sveltejs/kit": "^2.16.0 || ^3.0.0",
53
53
  "svelte": "^5.19.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@magidoc/plugin-svelte-marked": "^7.0.0",
57
- "@sveltejs/adapter-auto": "^7.0.1",
58
- "@sveltejs/kit": "^2.70.3",
59
- "@sveltejs/package": "^2.5.8",
57
+ "@sveltejs/adapter-auto": "^8.0.0",
58
+ "@sveltejs/kit": "^3.0.0",
59
+ "@sveltejs/package": "^3.0.0",
60
60
  "@sveltejs/vite-plugin-svelte": "^7.3.1",
61
61
  "@tableslayer/eslint-config": "workspace:*",
62
62
  "@tableslayer/tsconfig": "workspace:*",
63
63
  "@types/chroma-js": "^3.1.2",
64
- "@types/node": "^26.6.3",
65
64
  "@types/marked": "^6.0.0",
65
+ "@types/node": "^26.6.3",
66
66
  "marked": "^18.0.14",
67
67
  "svelte": "5.57.1",
68
68
  "svelte-check": "^4.7.6",
@@ -74,7 +74,6 @@
74
74
  "@floating-ui/dom": "^1.8.0",
75
75
  "@tabler/icons-svelte": "^3.48.0",
76
76
  "@tiptap/core": "^3.31.3",
77
- "@tiptap/extension-link": "^3.31.3",
78
77
  "@tiptap/extension-typography": "^3.31.3",
79
78
  "@tiptap/pm": "^3.31.3",
80
79
  "@tiptap/starter-kit": "^3.31.3",
@@ -86,5 +85,9 @@
86
85
  },
87
86
  "svelte": "./dist/index.js",
88
87
  "types": "./dist/index.d.ts",
89
- "type": "module"
88
+ "type": "module",
89
+ "imports": {
90
+ "#lib": "./src/lib/index.js",
91
+ "#lib/*": "./src/lib/*"
92
+ }
90
93
  }