@dxos/react-ui-editor 0.8.1-main.ba2dec9 → 0.8.1-staging.5be625a
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/lib/browser/index.mjs +10 -10
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +10 -10
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +10 -10
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/extensions/factories.d.ts +1 -0
- package/dist/types/src/extensions/factories.d.ts.map +1 -1
- package/dist/types/src/hooks/useTextEditor.d.ts +3 -3
- package/dist/types/src/hooks/useTextEditor.d.ts.map +1 -1
- package/dist/types/src/styles/theme.d.ts.map +1 -1
- package/package.json +28 -28
- package/src/extensions/factories.ts +1 -0
- package/src/hooks/useTextEditor.ts +17 -8
- package/src/styles/stack-item-content-class-names.ts +1 -1
- package/src/styles/theme.ts +1 -0
- package/src/util/debug.ts +1 -1
@@ -313,7 +313,7 @@ var createViewMode = (state) => {
|
|
313
313
|
|
314
314
|
// packages/ui/react-ui-editor/src/styles/stack-item-content-class-names.ts
|
315
315
|
import { mx } from "@dxos/react-ui-theme";
|
316
|
-
var stackItemContentEditorClassNames = (role) => mx("dx-focus-ring-inset data-[toolbar=disabled]:pbs-2 attention-surface", role === "
|
316
|
+
var stackItemContentEditorClassNames = (role) => mx("dx-focus-ring-inset data-[toolbar=disabled]:pbs-2 attention-surface", role === "section" ? "[&_.cm-scroller]:overflow-hidden [&_.cm-scroller]:min-bs-24" : "min-bs-0");
|
317
317
|
var stackItemContentToolbarClassNames = (role) => mx("attention-surface is-full border-be !border-separator", role === "section" && "sticky block-start-0 z-[1] -mbe-px min-is-0");
|
318
318
|
|
319
319
|
// packages/ui/react-ui-editor/src/components/EditorToolbar/EditorToolbar.tsx
|
@@ -520,6 +520,7 @@ var defaultTheme = {
|
|
520
520
|
".cm-link": {
|
521
521
|
textDecorationLine: "underline",
|
522
522
|
textDecorationThickness: "1px",
|
523
|
+
textDecorationColor: "var(--dx-separator)",
|
523
524
|
textUnderlineOffset: "2px",
|
524
525
|
borderRadius: ".125rem"
|
525
526
|
},
|
@@ -747,7 +748,7 @@ var logChanges = (trs) => {
|
|
747
748
|
return changes2;
|
748
749
|
}).filter(Boolean);
|
749
750
|
if (changes.length) {
|
750
|
-
log
|
751
|
+
log("changes", {
|
751
752
|
changes
|
752
753
|
}, {
|
753
754
|
F: __dxlog_file,
|
@@ -2726,7 +2727,7 @@ var createBasicExtensions = (_props) => {
|
|
2726
2727
|
EditorView12.exceptionSink.of((err) => {
|
2727
2728
|
log5.catch(err, void 0, {
|
2728
2729
|
F: __dxlog_file8,
|
2729
|
-
L:
|
2730
|
+
L: 97,
|
2730
2731
|
S: void 0,
|
2731
2732
|
C: (f, a) => f(...a)
|
2732
2733
|
});
|
@@ -5498,7 +5499,7 @@ var useTextEditor = (props = {}, deps = []) => {
|
|
5498
5499
|
autoFocus,
|
5499
5500
|
view
|
5500
5501
|
]);
|
5501
|
-
const
|
5502
|
+
const focusableGroupAttrs = useFocusableGroup({
|
5502
5503
|
tabBehavior: "limited",
|
5503
5504
|
ignoreDefaultKeydown: {
|
5504
5505
|
Escape: view?.state.facet(editorInputMode).noTabster
|
@@ -5517,15 +5518,14 @@ var useTextEditor = (props = {}, deps = []) => {
|
|
5517
5518
|
}, [
|
5518
5519
|
view
|
5519
5520
|
]);
|
5520
|
-
const focusAttributes = {
|
5521
|
-
tabIndex: 0,
|
5522
|
-
...focusableGroup,
|
5523
|
-
onKeyUp: handleKeyUp
|
5524
|
-
};
|
5525
5521
|
return {
|
5526
5522
|
parentRef,
|
5527
5523
|
view,
|
5528
|
-
focusAttributes
|
5524
|
+
focusAttributes: {
|
5525
|
+
tabIndex: 0,
|
5526
|
+
...focusableGroupAttrs,
|
5527
|
+
onKeyUp: handleKeyUp
|
5528
|
+
}
|
5529
5529
|
};
|
5530
5530
|
};
|
5531
5531
|
export {
|