astro-tractstack 2.0.21 → 2.0.23
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/package.json
CHANGED
|
@@ -202,7 +202,10 @@ export const NodeAnchorComponent = (props: NodeProps, tagName: string) => {
|
|
|
202
202
|
onDoubleClick={handleDoubleClick}
|
|
203
203
|
data-editable-link="true"
|
|
204
204
|
// Preserve display mode
|
|
205
|
-
style={{
|
|
205
|
+
style={{
|
|
206
|
+
display: 'inline',
|
|
207
|
+
cursor: isEditMode ? 'text' : 'pointer',
|
|
208
|
+
}}
|
|
206
209
|
>
|
|
207
210
|
<RenderChildren
|
|
208
211
|
children={ctx.getChildNodeIDs(nodeId)}
|
|
@@ -147,7 +147,9 @@ function extractNodesFromDOM(
|
|
|
147
147
|
if (text !== null && text !== undefined) {
|
|
148
148
|
// Remove zero-width spaces
|
|
149
149
|
text = text.replace(/\u200B/g, '');
|
|
150
|
-
|
|
150
|
+
if (text.trim() === '') {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
151
153
|
result.push({
|
|
152
154
|
id: ulid(),
|
|
153
155
|
parentId,
|
|
@@ -361,16 +363,16 @@ export function processRichTextToNodes(
|
|
|
361
363
|
if (['a', 'button', 'span'].includes(node.tagName)) {
|
|
362
364
|
const matchingOriginalNode = findMatchingNode(node, originalNodes);
|
|
363
365
|
if (matchingOriginalNode) {
|
|
364
|
-
if (node.tagName
|
|
366
|
+
if (['a', 'button'].includes(node.tagName)) {
|
|
365
367
|
if (matchingOriginalNode.href) {
|
|
366
368
|
node.href = matchingOriginalNode.href;
|
|
367
369
|
}
|
|
368
|
-
} else if (node.tagName === 'button') {
|
|
369
370
|
node.buttonPayload = matchingOriginalNode.buttonPayload;
|
|
370
371
|
} else if (node.tagName === 'span') {
|
|
371
372
|
node.elementCss = matchingOriginalNode.elementCss;
|
|
372
373
|
node.overrideClasses = matchingOriginalNode.overrideClasses;
|
|
373
374
|
}
|
|
375
|
+
console.log(node);
|
|
374
376
|
} else if (onInsertSignal) {
|
|
375
377
|
// New interactive element detected, trigger insert signal
|
|
376
378
|
onInsertSignal(node.tagName, node.id);
|
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
} from '@/types/compositorTypes';
|
|
7
7
|
|
|
8
8
|
const tailwindModifier = ['', 'md:', 'xl:'];
|
|
9
|
-
const tailwindCoreModifier = ['
|
|
9
|
+
const tailwindCoreModifier = ['', 'md:', 'xl:'];
|
|
10
10
|
|
|
11
11
|
const stripViewportPrefixes = (classes: string[]): string[] => {
|
|
12
12
|
return classes.map((classStr) =>
|