@threadlabs/looma 0.22.13 → 0.23.0
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/components/shared/icons.js +6 -0
- package/components/ui-avatar/ui-avatar.html +3 -3
- package/components/ui-avatar-group/ui-avatar-group.html +1 -1
- package/components/ui-badge/ui-badge.html +1 -1
- package/components/ui-button/ui-button.html +3 -3
- package/components/ui-callout/ui-callout.html +3 -2
- package/components/ui-card/ui-card.html +23 -4
- package/components/ui-checkbox/ui-checkbox.html +3 -3
- package/components/ui-combobox/ui-combobox.html +8 -8
- package/components/ui-context-menu/ui-context-menu.html +2 -2
- package/components/ui-description-list/ui-description-list.html +1 -1
- package/components/ui-dialog/ui-dialog.html +3 -3
- package/components/ui-disclosure/ui-disclosure.html +43 -3
- package/components/ui-editable/ui-editable.html +2 -2
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +5 -5
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +2 -2
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +6 -6
- package/components/ui-editor-slash-menu-item/ui-editor-slash-menu-item.html +1 -1
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +2 -2
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +11 -11
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +5 -5
- package/components/ui-editor-toolbar/ui-editor-toolbar.html +4 -4
- package/components/ui-floating-action-button/ui-floating-action-button.html +2 -2
- package/components/ui-icon/ui-icon.html +6 -0
- package/components/ui-icon-button/ui-icon-button.html +1 -1
- package/components/ui-input/ui-input.html +9 -4
- package/components/ui-input-group/ui-input-group.html +21 -6
- package/components/ui-list/ui-list.html +1 -1
- package/components/ui-list-item/ui-list-item.html +20 -4
- package/components/ui-listbox/ui-listbox.html +3 -3
- package/components/ui-menu/ui-menu.html +2 -2
- package/components/ui-menu-item/ui-menu-item.html +4 -4
- package/components/ui-meter/ui-meter.html +1 -1
- package/components/ui-nav-item/ui-nav-item.html +46 -14
- package/components/ui-popover/ui-popover.html +16 -1
- package/components/ui-radio/ui-radio.html +2 -2
- package/components/ui-scroll-area/ui-scroll-area.html +12 -0
- package/components/ui-search-result-row/ui-search-result-row.html +24 -5
- package/components/ui-search-shell/ui-search-shell.html +4 -4
- package/components/ui-section/ui-section.html +3 -3
- package/components/ui-select/ui-select.html +6 -2
- package/components/ui-separator/ui-separator.html +2 -2
- package/components/ui-sidebar/ui-sidebar.html +3 -3
- package/components/ui-stack/ui-stack.html +6 -3
- package/components/ui-status-message/ui-status-message.html +1 -1
- package/components/ui-switch/ui-switch.html +3 -3
- package/components/ui-table/ui-table.html +3 -3
- package/components/ui-tabs/ui-tabs.html +7 -7
- package/components/ui-text/ui-text.html +12 -0
- package/components/ui-textarea/ui-textarea.html +6 -2
- package/components/ui-toast/ui-toast.html +2 -2
- package/components/ui-toast-region/ui-toast-region.html +5 -5
- package/components/ui-tooltip/ui-tooltip.html +15 -15
- package/components/ui-top-bar/ui-top-bar.html +1 -1
- package/components/ui-tree-item/ui-tree-item.html +27 -8
- package/dist/index.js +1 -1
- package/editor/chunks/extensions.js +55 -2
- package/editor/extensions/index.d.ts +1 -0
- package/editor/extensions/index.js +2 -2
- package/editor/extensions/preset.d.ts +2 -0
- package/editor/extensions/relative-links.d.ts +8 -0
- package/editor/icons.d.ts +6 -0
- package/editor/index.js +9 -3
- package/package.json +1 -1
- package/styles/ui-avatar-group.css +1 -1
- package/styles/ui-avatar.css +3 -3
- package/styles/ui-badge.css +1 -1
- package/styles/ui-button.css +3 -3
- package/styles/ui-callout.css +3 -2
- package/styles/ui-card.css +19 -2
- package/styles/ui-checkbox.css +3 -3
- package/styles/ui-combobox.css +8 -8
- package/styles/ui-context-menu.css +2 -2
- package/styles/ui-description-list.css +1 -1
- package/styles/ui-dialog.css +3 -3
- package/styles/ui-disclosure.css +42 -2
- package/styles/ui-editable.css +2 -2
- package/styles/ui-editor-insert-table-grid.css +5 -5
- package/styles/ui-editor-mention-menu.css +2 -2
- package/styles/ui-editor-slash-menu-item.css +1 -1
- package/styles/ui-editor-slash-menu.css +6 -6
- package/styles/ui-editor-table-context-menu.css +2 -2
- package/styles/ui-editor-table-overlay.css +11 -11
- package/styles/ui-editor-table-toolbar.css +5 -5
- package/styles/ui-editor-toolbar.css +4 -4
- package/styles/ui-floating-action-button.css +2 -2
- package/styles/ui-icon-button.css +1 -1
- package/styles/ui-input-group.css +19 -6
- package/styles/ui-input.css +9 -4
- package/styles/ui-list-item.css +23 -4
- package/styles/ui-list.css +1 -1
- package/styles/ui-listbox.css +3 -3
- package/styles/ui-menu-item.css +4 -4
- package/styles/ui-menu.css +2 -2
- package/styles/ui-meter.css +1 -1
- package/styles/ui-nav-item.css +46 -12
- package/styles/ui-popover.css +14 -1
- package/styles/ui-radio.css +2 -2
- package/styles/ui-scroll-area.css +10 -0
- package/styles/ui-search-result-row.css +25 -5
- package/styles/ui-search-shell.css +4 -4
- package/styles/ui-section.css +3 -3
- package/styles/ui-select.css +6 -2
- package/styles/ui-separator.css +2 -2
- package/styles/ui-sidebar.css +3 -3
- package/styles/ui-stack.css +3 -0
- package/styles/ui-status-message.css +1 -1
- package/styles/ui-switch.css +3 -3
- package/styles/ui-table.css +3 -3
- package/styles/ui-tabs.css +7 -7
- package/styles/ui-text.css +8 -0
- package/styles/ui-textarea.css +6 -2
- package/styles/ui-toast-region.css +5 -5
- package/styles/ui-toast.css +2 -2
- package/styles/ui-tooltip.css +15 -15
- package/styles/ui-top-bar.css +1 -1
- package/styles/ui-tree-item.css +32 -8
- package/tokens.css +30 -9
- package/vanilla/UiCard.d.ts +2 -1
- package/vanilla/UiCard.js +1 -1
- package/vanilla/UiDisclosure.d.ts +1 -0
- package/vanilla/UiDisclosure.js +10 -1
- package/vanilla/UiIcon.js +1 -1
- package/vanilla/UiInputGroup.d.ts +1 -0
- package/vanilla/UiInputGroup.js +1 -1
- package/vanilla/UiNavItem.d.ts +2 -0
- package/vanilla/UiNavItem.js +1 -1
- package/vanilla/UiPopover.d.ts +1 -0
- package/vanilla/UiPopover.js +1 -1
- package/vanilla/UiScrollArea.d.ts +1 -0
- package/vanilla/UiScrollArea.js +1 -1
- package/vanilla/UiSearchResultRow.d.ts +1 -0
- package/vanilla/UiSearchResultRow.js +1 -1
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +1 -1
- package/vanilla/UiText.d.ts +2 -0
- package/vanilla/UiText.js +1 -1
- package/vue/UiAvatar.vue +3 -3
- package/vue/UiAvatarGroup.vue +1 -1
- package/vue/UiBadge.vue +2 -1
- package/vue/UiButton.vue +3 -3
- package/vue/UiCallout.vue +2 -2
- package/vue/UiCard.d.ts +12 -3
- package/vue/UiCard.vue +51 -7
- package/vue/UiCheckbox.vue +3 -3
- package/vue/UiCombobox.vue +11 -8
- package/vue/UiContextMenu.vue +2 -2
- package/vue/UiDescriptionList.vue +1 -1
- package/vue/UiDialog.vue +4 -3
- package/vue/UiDisclosure.d.ts +13 -2
- package/vue/UiDisclosure.vue +61 -4
- package/vue/UiEditable.vue +2 -2
- package/vue/UiEditorInsertTableGrid.vue +5 -5
- package/vue/UiEditorMentionMenu.vue +2 -2
- package/vue/UiEditorSlashMenu.vue +6 -6
- package/vue/UiEditorSlashMenuItem.vue +1 -1
- package/vue/UiEditorTableContextMenu.vue +2 -2
- package/vue/UiEditorTableOverlay.vue +11 -11
- package/vue/UiEditorTableToolbar.vue +5 -5
- package/vue/UiEditorToolbar.vue +6 -4
- package/vue/UiFloatingActionButton.vue +2 -2
- package/vue/UiIcon.vue +31 -0
- package/vue/UiIconButton.vue +1 -1
- package/vue/UiInput.vue +8 -4
- package/vue/UiInputGroup.d.ts +9 -0
- package/vue/UiInputGroup.vue +39 -8
- package/vue/UiList.vue +1 -1
- package/vue/UiListItem.vue +20 -4
- package/vue/UiListbox.vue +3 -3
- package/vue/UiMenu.vue +3 -2
- package/vue/UiMenuItem.vue +4 -4
- package/vue/UiMeter.vue +1 -1
- package/vue/UiNavItem.d.ts +18 -0
- package/vue/UiNavItem.vue +96 -12
- package/vue/UiPopover.d.ts +9 -0
- package/vue/UiPopover.vue +45 -3
- package/vue/UiRadio.vue +2 -2
- package/vue/UiScrollArea.d.ts +9 -0
- package/vue/UiScrollArea.vue +35 -2
- package/vue/UiSearchResultRow.d.ts +9 -0
- package/vue/UiSearchResultRow.vue +51 -6
- package/vue/UiSearchShell.vue +4 -4
- package/vue/UiSection.vue +3 -3
- package/vue/UiSelect.vue +3 -2
- package/vue/UiSeparator.vue +4 -2
- package/vue/UiSidebar.vue +5 -3
- package/vue/UiStack.d.ts +3 -3
- package/vue/UiStack.vue +10 -4
- package/vue/UiStatusMessage.vue +1 -1
- package/vue/UiSwitch.vue +3 -3
- package/vue/UiTable.vue +3 -3
- package/vue/UiTabs.vue +8 -7
- package/vue/UiText.d.ts +18 -0
- package/vue/UiText.vue +70 -0
- package/vue/UiTextarea.vue +2 -2
- package/vue/UiToast.vue +4 -2
- package/vue/UiToastRegion.vue +5 -5
- package/vue/UiTooltip.vue +19 -15
- package/vue/UiTopBar.vue +1 -1
- package/vue/UiTreeItem.vue +31 -8
- package/vue/chunks/UiAvatar.js +1 -1
- package/vue/chunks/UiAvatarGroup.js +1 -1
- package/vue/chunks/UiBadge.js +1 -1
- package/vue/chunks/UiButton.js +1 -1
- package/vue/chunks/UiCallout.js +1 -1
- package/vue/chunks/UiCard.js +39 -3
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiCombobox.js +1 -1
- package/vue/chunks/UiContextMenu.js +1 -1
- package/vue/chunks/UiDescriptionList.js +1 -1
- package/vue/chunks/UiDialog.js +1 -1
- package/vue/chunks/UiDisclosure.js +27 -4
- package/vue/chunks/UiEditable.js +1 -1
- package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
- package/vue/chunks/UiEditorMentionMenu.js +1 -1
- package/vue/chunks/UiEditorSlashMenu.js +1 -1
- package/vue/chunks/UiEditorSlashMenuItem.js +1 -1
- package/vue/chunks/UiEditorTableContextMenu.js +1 -1
- package/vue/chunks/UiEditorTableOverlay.js +1 -1
- package/vue/chunks/UiEditorTableToolbar.js +1 -1
- package/vue/chunks/UiEditorToolbar.js +1 -1
- package/vue/chunks/UiFloatingActionButton.js +1 -1
- package/vue/chunks/UiIcon.js +92 -1
- package/vue/chunks/UiIconButton.js +1 -1
- package/vue/chunks/UiInput.js +1 -1
- package/vue/chunks/UiInputGroup.js +59 -22
- package/vue/chunks/UiList.js +1 -1
- package/vue/chunks/UiListItem.js +1 -1
- package/vue/chunks/UiListbox.js +1 -1
- package/vue/chunks/UiMenu.js +1 -1
- package/vue/chunks/UiMenuItem.js +1 -1
- package/vue/chunks/UiMeter.js +1 -1
- package/vue/chunks/UiNavItem.js +65 -6
- package/vue/chunks/UiPopover.js +37 -5
- package/vue/chunks/UiRadio.js +1 -1
- package/vue/chunks/UiScrollArea.js +66 -23
- package/vue/chunks/UiSearchResultRow.js +28 -2
- package/vue/chunks/UiSearchShell.js +1 -1
- package/vue/chunks/UiSection.js +1 -1
- package/vue/chunks/UiSelect.js +1 -1
- package/vue/chunks/UiSeparator.js +1 -1
- package/vue/chunks/UiSidebar.js +1 -1
- package/vue/chunks/UiStack.js +3 -2
- package/vue/chunks/UiStatusMessage.js +1 -1
- package/vue/chunks/UiSwitch.js +1 -1
- package/vue/chunks/UiTable.js +1 -1
- package/vue/chunks/UiTabs.js +1 -1
- package/vue/chunks/UiText.js +92 -4
- package/vue/chunks/UiTextarea.js +1 -1
- package/vue/chunks/UiToast.js +1 -1
- package/vue/chunks/UiToastRegion.js +1 -1
- package/vue/chunks/UiTooltip.js +1 -1
- package/vue/chunks/UiTopBar.js +1 -1
- package/vue/chunks/UiTreeItem.js +1 -1
- package/vue/components.css +1431 -1429
- package/vue/editor/LoomaEditor.d.ts +11 -0
- package/vue/editor/index.js +261 -145
|
@@ -7,6 +7,7 @@ import { dropCursor } from "@tiptap/pm/dropcursor";
|
|
|
7
7
|
import { gapCursor } from "@tiptap/pm/gapcursor";
|
|
8
8
|
import { createLowlight } from "lowlight";
|
|
9
9
|
import { DOMParser, Node as Node$2, Slice } from "@tiptap/pm/model";
|
|
10
|
+
import { Mapping } from "@tiptap/pm/transform";
|
|
10
11
|
import MarkdownIt from "markdown-it";
|
|
11
12
|
import { CellSelection, TableMap, addColumn, addColumnAfter, addColumnBefore, addRow, addRowAfter, addRowBefore, cellAround, columnResizing, deleteCellSelection, deleteColumn, deleteRow, deleteTable, fixTables, goToNextCell, mergeCells, moveTableColumn, moveTableRow, setCellAttr, splitCell, tableEditing, toggleHeader, toggleHeaderCell } from "@tiptap/pm/tables";
|
|
12
13
|
//#region src/editor/extensions/active-block.ts
|
|
@@ -6198,6 +6199,57 @@ function createLoomaMentionExtension(options = {}) {
|
|
|
6198
6199
|
});
|
|
6199
6200
|
}
|
|
6200
6201
|
//#endregion
|
|
6202
|
+
//#region src/editor/extensions/relative-links.ts
|
|
6203
|
+
/** Keep other origins and non-web schemes intact; same-origin links retain path, query, and fragment. */
|
|
6204
|
+
function siteRelativeHref(href, baseUrl) {
|
|
6205
|
+
if (!/^(https?:\/\/|\/\/)/i.test(href.trim())) return href;
|
|
6206
|
+
try {
|
|
6207
|
+
const base = new URL(baseUrl);
|
|
6208
|
+
const url = new URL(href, base);
|
|
6209
|
+
if (!/^https?:$/.test(base.protocol) || url.origin !== base.origin || url.username || url.password) return href;
|
|
6210
|
+
return `${url.pathname}${url.search}${url.hash}`;
|
|
6211
|
+
} catch {
|
|
6212
|
+
return href;
|
|
6213
|
+
}
|
|
6214
|
+
}
|
|
6215
|
+
/** Normalize newly created links in the same transaction batch, including paste rules and the picker.
|
|
6216
|
+
* @contract Existing document links are preserved until replaced; undo/redo keeps the original editing step.
|
|
6217
|
+
* @ownership The editor owns normalization; callers supply a site URL rather than a host callback.
|
|
6218
|
+
*/
|
|
6219
|
+
function createSiteRelativeLinks(baseUrl) {
|
|
6220
|
+
const key = new PluginKey("looma-site-relative-links");
|
|
6221
|
+
return Extension.create({
|
|
6222
|
+
name: "loomaSiteRelativeLinks",
|
|
6223
|
+
addProseMirrorPlugins() {
|
|
6224
|
+
const editor = this.editor;
|
|
6225
|
+
return [new Plugin({
|
|
6226
|
+
key,
|
|
6227
|
+
appendTransaction(transactions, oldState, newState) {
|
|
6228
|
+
if (!editor.isEditable || !transactions.some((transaction) => transaction.docChanged) || transactions.some((transaction) => transaction.getMeta(key))) return null;
|
|
6229
|
+
const mapping = new Mapping();
|
|
6230
|
+
for (const transaction of transactions) mapping.appendMapping(transaction.mapping);
|
|
6231
|
+
const inverse = mapping.invert();
|
|
6232
|
+
const tr = newState.tr;
|
|
6233
|
+
newState.doc.descendants((node, position) => {
|
|
6234
|
+
if (!node.isText) return;
|
|
6235
|
+
const mark = node.marks.find((candidate) => candidate.type.name === "link");
|
|
6236
|
+
if (!mark || typeof mark.attrs.href !== "string") return;
|
|
6237
|
+
const href = siteRelativeHref(mark.attrs.href, baseUrl);
|
|
6238
|
+
if (href === mark.attrs.href) return;
|
|
6239
|
+
const before = inverse.mapResult(position, 1);
|
|
6240
|
+
if ((before.deleted ? null : oldState.doc.nodeAt(before.pos)?.marks.find((candidate) => candidate.type.name === "link"))?.attrs.href === mark.attrs.href) return;
|
|
6241
|
+
tr.addMark(position, position + node.nodeSize, mark.type.create({
|
|
6242
|
+
...mark.attrs,
|
|
6243
|
+
href
|
|
6244
|
+
}));
|
|
6245
|
+
});
|
|
6246
|
+
return tr.docChanged ? tr.setMeta(key, true) : null;
|
|
6247
|
+
}
|
|
6248
|
+
})];
|
|
6249
|
+
}
|
|
6250
|
+
});
|
|
6251
|
+
}
|
|
6252
|
+
//#endregion
|
|
6201
6253
|
//#region ../../node_modules/.pnpm/dompurify@3.4.15/node_modules/dompurify/dist/purify.es.mjs
|
|
6202
6254
|
/*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */
|
|
6203
6255
|
function _arrayLikeToArray(r, a) {
|
|
@@ -9290,7 +9342,7 @@ function getLoomaTableExtensions() {
|
|
|
9290
9342
|
* the code and explicit language stay in the document schema.
|
|
9291
9343
|
*/
|
|
9292
9344
|
function getDefaultEditorExtensions(options = {}) {
|
|
9293
|
-
const { placeholder = "Type “/” for commands, or start writing…", linkOpenOnClick = false, imageInline = false, mention = createLoomaMentionExtension(), disableHighlight = false, codeLanguages, codeLowlight, codeBlockNodeView } = options;
|
|
9345
|
+
const { placeholder = "Type “/” for commands, or start writing…", linkOpenOnClick = false, linkBaseUrl, imageInline = false, mention = createLoomaMentionExtension(), disableHighlight = false, codeLanguages, codeLowlight, codeBlockNodeView } = options;
|
|
9294
9346
|
const codeBlock = LoomaCodeBlock.configure({ lowlight: codeLowlight ?? createLowlight(codeLanguages) });
|
|
9295
9347
|
return [
|
|
9296
9348
|
Document,
|
|
@@ -9325,6 +9377,7 @@ function getDefaultEditorExtensions(options = {}) {
|
|
|
9325
9377
|
target: "_blank"
|
|
9326
9378
|
}
|
|
9327
9379
|
}),
|
|
9380
|
+
...linkBaseUrl ? [createSiteRelativeLinks(linkBaseUrl)] : [],
|
|
9328
9381
|
Image.configure({ inline: imageInline }),
|
|
9329
9382
|
(disableHighlight ? StoredOnlyHighlight : Highlight).configure({ multicolor: false }),
|
|
9330
9383
|
Code,
|
|
@@ -10103,4 +10156,4 @@ function createLoomaSlashCommandExtension(options = {}) {
|
|
|
10103
10156
|
});
|
|
10104
10157
|
}
|
|
10105
10158
|
//#endregion
|
|
10106
|
-
export {
|
|
10159
|
+
export { LoomaChip as A, LoomaMentionSuggestionPluginKey as C, filterLoomaMentionItems as D, MAX_MENTION_RESULT_LIMIT as E, LOOMA_ACTIVE_BLOCK_CLASS as F, LOOMA_ACTIVE_BLOCK_TYPING_IDLE_MS as I, LoomaActiveBlock as L, LOOMA_CALLOUT_TONES as M, LoomaCallout as N, normalizeMentionResultLimit as O, LOOMA_ACTIVE_BLOCK_BLUR_GRACE_MS as P, LoomaActiveBlockPluginKey as R, siteRelativeHref as S, DEFAULT_MENTION_RESULT_LIMIT as T, getActiveTableCellBackground as _, handleTableAction as a, LoomaSmartPaste as b, normalizeActiveTableColumnWidths as c, getDefaultEditorExtensions as d, getLoomaTableExtensions as f, getActiveTableCellAlignment as g, LoomaTableHeader as h, getActiveTableUiState as i, normalizeLoomaChipColor as j, LOOMA_CHIP_COLORS as k, shouldShowTextFormattingToolbar as l, LoomaTableCell as m, createLoomaSlashCommandExtension as n, handleTableOverlayAction as o, LoomaTable as p, getDefaultSlashCommands as r, insertTableAtRange as s, LoomaSlashCommand as t, LoomaTableKit as u, setActiveTableCellAlignment as v, createLoomaMentionExtension as w, createSiteRelativeLinks as x, setActiveTableCellBackground as y };
|
|
@@ -15,3 +15,4 @@ export { getActiveTableUiState, handleTableAction, handleTableOverlayAction, ins
|
|
|
15
15
|
export { LoomaTable, getActiveTableCellAlignment, getActiveTableCellBackground, LoomaTableCell, LoomaTableHeader, setActiveTableCellAlignment, setActiveTableCellBackground, TABLE_CELL_BACKGROUND_PRESETS, type TableCellAlignment, type TableCellBackground, } from "./table-formatting.js";
|
|
16
16
|
export { createLoomaMentionExtension, DEFAULT_MENTION_RESULT_LIMIT, filterLoomaMentionItems, LoomaMentionSuggestionPluginKey, MAX_MENTION_RESULT_LIMIT, normalizeMentionResultLimit, type LoomaMentionItem, type LoomaMentionMenuSnapshot, type LoomaMentionOptions, type LoomaMentionProvider, type LoomaMentionProviderContext, } from "./mention.js";
|
|
17
17
|
export { createLoomaSlashCommandExtension, getDefaultSlashCommands, LoomaSlashCommand, type LoomaSlashCommand as LoomaSlashCommandItem, type LoomaSlashCommandContext, type LoomaSlashCommandOptions, type LoomaSlashMenuSnapshot, } from "./slash-command.js";
|
|
18
|
+
export { siteRelativeHref, createSiteRelativeLinks } from "./relative-links.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as TABLE_CELL_BACKGROUND_PRESETS } from "../chunks/table-backgrounds.js";
|
|
2
|
-
import { A as
|
|
3
|
-
export { DEFAULT_MENTION_RESULT_LIMIT, LOOMA_ACTIVE_BLOCK_BLUR_GRACE_MS, LOOMA_ACTIVE_BLOCK_CLASS, LOOMA_ACTIVE_BLOCK_TYPING_IDLE_MS, LOOMA_CALLOUT_TONES, LOOMA_CHIP_COLORS, LoomaActiveBlock, LoomaActiveBlockPluginKey, LoomaCallout, LoomaChip, LoomaMentionSuggestionPluginKey, LoomaSlashCommand, LoomaSmartPaste, LoomaTable, LoomaTableCell, LoomaTableHeader, LoomaTableKit, MAX_MENTION_RESULT_LIMIT, TABLE_CELL_BACKGROUND_PRESETS, createLoomaMentionExtension, createLoomaSlashCommandExtension, filterLoomaMentionItems, getActiveTableCellAlignment, getActiveTableCellBackground, getActiveTableUiState, getDefaultEditorExtensions, getDefaultSlashCommands, getLoomaTableExtensions, handleTableAction, handleTableOverlayAction, insertTableAtRange, normalizeActiveTableColumnWidths, normalizeLoomaChipColor, normalizeMentionResultLimit, setActiveTableCellAlignment, setActiveTableCellBackground, shouldShowTextFormattingToolbar };
|
|
2
|
+
import { A as LoomaChip, C as LoomaMentionSuggestionPluginKey, D as filterLoomaMentionItems, E as MAX_MENTION_RESULT_LIMIT, F as LOOMA_ACTIVE_BLOCK_CLASS, I as LOOMA_ACTIVE_BLOCK_TYPING_IDLE_MS, L as LoomaActiveBlock, M as LOOMA_CALLOUT_TONES, N as LoomaCallout, O as normalizeMentionResultLimit, P as LOOMA_ACTIVE_BLOCK_BLUR_GRACE_MS, R as LoomaActiveBlockPluginKey, S as siteRelativeHref, T as DEFAULT_MENTION_RESULT_LIMIT, _ as getActiveTableCellBackground, a as handleTableAction, b as LoomaSmartPaste, c as normalizeActiveTableColumnWidths, d as getDefaultEditorExtensions, f as getLoomaTableExtensions, g as getActiveTableCellAlignment, h as LoomaTableHeader, i as getActiveTableUiState, j as normalizeLoomaChipColor, k as LOOMA_CHIP_COLORS, l as shouldShowTextFormattingToolbar, m as LoomaTableCell, n as createLoomaSlashCommandExtension, o as handleTableOverlayAction, p as LoomaTable, r as getDefaultSlashCommands, s as insertTableAtRange, t as LoomaSlashCommand, u as LoomaTableKit, v as setActiveTableCellAlignment, w as createLoomaMentionExtension, x as createSiteRelativeLinks, y as setActiveTableCellBackground } from "../chunks/extensions.js";
|
|
3
|
+
export { DEFAULT_MENTION_RESULT_LIMIT, LOOMA_ACTIVE_BLOCK_BLUR_GRACE_MS, LOOMA_ACTIVE_BLOCK_CLASS, LOOMA_ACTIVE_BLOCK_TYPING_IDLE_MS, LOOMA_CALLOUT_TONES, LOOMA_CHIP_COLORS, LoomaActiveBlock, LoomaActiveBlockPluginKey, LoomaCallout, LoomaChip, LoomaMentionSuggestionPluginKey, LoomaSlashCommand, LoomaSmartPaste, LoomaTable, LoomaTableCell, LoomaTableHeader, LoomaTableKit, MAX_MENTION_RESULT_LIMIT, TABLE_CELL_BACKGROUND_PRESETS, createLoomaMentionExtension, createLoomaSlashCommandExtension, createSiteRelativeLinks, filterLoomaMentionItems, getActiveTableCellAlignment, getActiveTableCellBackground, getActiveTableUiState, getDefaultEditorExtensions, getDefaultSlashCommands, getLoomaTableExtensions, handleTableAction, handleTableOverlayAction, insertTableAtRange, normalizeActiveTableColumnWidths, normalizeLoomaChipColor, normalizeMentionResultLimit, setActiveTableCellAlignment, setActiveTableCellBackground, shouldShowTextFormattingToolbar, siteRelativeHref };
|
|
@@ -16,6 +16,8 @@ export interface DefaultEditorExtensionsOptions {
|
|
|
16
16
|
placeholder?: string;
|
|
17
17
|
/** Passed to Tiptap Link; defaults false to keep editing clicks in the editor. */
|
|
18
18
|
linkOpenOnClick?: boolean;
|
|
19
|
+
/** Site origin whose newly inserted links become relative, across paste and editor commands. */
|
|
20
|
+
linkBaseUrl?: string;
|
|
19
21
|
/** Passed to Tiptap Image; block images are the default document policy. */
|
|
20
22
|
imageInline?: boolean;
|
|
21
23
|
/** Custom mention extension, the Looma default, or false to omit mentions. */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
/** Keep other origins and non-web schemes intact; same-origin links retain path, query, and fragment. */
|
|
3
|
+
export declare function siteRelativeHref(href: string, baseUrl: string): string;
|
|
4
|
+
/** Normalize newly created links in the same transaction batch, including paste rules and the picker.
|
|
5
|
+
* @contract Existing document links are preserved until replaced; undo/redo keeps the original editing step.
|
|
6
|
+
* @ownership The editor owns normalization; callers supply a site URL rather than a host callback.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createSiteRelativeLinks(baseUrl: string): Extension<any, any>;
|
package/editor/icons.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ export declare const LOOMA_ICONS: {
|
|
|
7
7
|
'arrow-left': IconNode;
|
|
8
8
|
bold: IconNode;
|
|
9
9
|
'book-user': IconNode;
|
|
10
|
+
search: IconNode;
|
|
11
|
+
'external-link': IconNode;
|
|
12
|
+
pencil: IconNode;
|
|
13
|
+
unlink: IconNode;
|
|
10
14
|
braces: IconNode;
|
|
11
15
|
calculator: IconNode;
|
|
12
16
|
check: IconNode;
|
|
@@ -18,6 +22,7 @@ export declare const LOOMA_ICONS: {
|
|
|
18
22
|
'chevron-right': IconNode;
|
|
19
23
|
'code-xml': IconNode;
|
|
20
24
|
columns: IconNode;
|
|
25
|
+
compass: IconNode;
|
|
21
26
|
'credit-card': IconNode;
|
|
22
27
|
ellipsis: IconNode;
|
|
23
28
|
eraser: IconNode;
|
|
@@ -30,6 +35,7 @@ export declare const LOOMA_ICONS: {
|
|
|
30
35
|
'heading-3': IconNode;
|
|
31
36
|
help: IconNode;
|
|
32
37
|
highlighter: IconNode;
|
|
38
|
+
history: IconNode;
|
|
33
39
|
image: IconNode;
|
|
34
40
|
info: IconNode;
|
|
35
41
|
italic: IconNode;
|
package/editor/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as TABLE_CELL_BACKGROUND_PRESETS, t as TABLE_CELL_BACKGROUND_OPTIONS } from "./chunks/table-backgrounds.js";
|
|
2
2
|
import { n as resolveTableCellAt, t as measureTableOverlayGeometry } from "./chunks/ui.js";
|
|
3
|
-
import { A as
|
|
4
|
-
import { AlignCenter, AlignLeft, AlignRight, ArrowLeft, Bold, BookUser, Braces, Calculator, Check, ChevronDown, ChevronLeft, ChevronRight, CircleCheck, CircleDot, CircleQuestionMark, CircleX, CodeXml, Columns3, CreditCard, Ellipsis, Eraser, FileText, Folder, GripHorizontal, GripVertical, Heading1, Heading2, Heading3, Highlighter, Image, Info, Italic, LayoutDashboard, Link, List, ListOrdered, ListTodo, LoaderCircle, Merge, Minus, NotebookPen, PaintBucket, PanelBottom, PanelLeft, PanelRight, PanelTop, Pilcrow, Plus, Quote, Receipt, Redo2, Rows3, Settings, Split, Strikethrough, Table2, Tag, Trash2, TriangleAlert, Truck, Underline, Undo2, UserRound, Users, X } from "lucide";
|
|
3
|
+
import { A as LoomaChip, C as LoomaMentionSuggestionPluginKey, D as filterLoomaMentionItems, E as MAX_MENTION_RESULT_LIMIT, F as LOOMA_ACTIVE_BLOCK_CLASS, I as LOOMA_ACTIVE_BLOCK_TYPING_IDLE_MS, L as LoomaActiveBlock, M as LOOMA_CALLOUT_TONES, N as LoomaCallout, O as normalizeMentionResultLimit, P as LOOMA_ACTIVE_BLOCK_BLUR_GRACE_MS, R as LoomaActiveBlockPluginKey, S as siteRelativeHref, T as DEFAULT_MENTION_RESULT_LIMIT, _ as getActiveTableCellBackground, a as handleTableAction, b as LoomaSmartPaste, c as normalizeActiveTableColumnWidths, d as getDefaultEditorExtensions, f as getLoomaTableExtensions, g as getActiveTableCellAlignment, h as LoomaTableHeader, i as getActiveTableUiState, j as normalizeLoomaChipColor, k as LOOMA_CHIP_COLORS, l as shouldShowTextFormattingToolbar, m as LoomaTableCell, n as createLoomaSlashCommandExtension, o as handleTableOverlayAction, p as LoomaTable, r as getDefaultSlashCommands, s as insertTableAtRange, t as LoomaSlashCommand, u as LoomaTableKit, v as setActiveTableCellAlignment, w as createLoomaMentionExtension, x as createSiteRelativeLinks, y as setActiveTableCellBackground } from "./chunks/extensions.js";
|
|
4
|
+
import { AlignCenter, AlignLeft, AlignRight, ArrowLeft, Bold, BookUser, Braces, Calculator, Check, ChevronDown, ChevronLeft, ChevronRight, CircleCheck, CircleDot, CircleQuestionMark, CircleX, CodeXml, Columns3, Compass, CreditCard, Ellipsis, Eraser, ExternalLink, FileText, Folder, GripHorizontal, GripVertical, Heading1, Heading2, Heading3, Highlighter, History, Image, Info, Italic, LayoutDashboard, Link, List, ListOrdered, ListTodo, LoaderCircle, Merge, Minus, NotebookPen, PaintBucket, PanelBottom, PanelLeft, PanelRight, PanelTop, Pencil, Pilcrow, Plus, Quote, Receipt, Redo2, Rows3, Search, Settings, Split, Strikethrough, Table2, Tag, Trash2, TriangleAlert, Truck, Underline, Undo2, Unlink, UserRound, Users, X } from "lucide";
|
|
5
5
|
//#region src/editor/icons.ts
|
|
6
6
|
/** The opinionated Lucide set used by Looma's shipped interaction surfaces. */
|
|
7
7
|
var LOOMA_ICONS = {
|
|
@@ -11,6 +11,10 @@ var LOOMA_ICONS = {
|
|
|
11
11
|
"arrow-left": ArrowLeft,
|
|
12
12
|
bold: Bold,
|
|
13
13
|
"book-user": BookUser,
|
|
14
|
+
"search": Search,
|
|
15
|
+
"external-link": ExternalLink,
|
|
16
|
+
"pencil": Pencil,
|
|
17
|
+
"unlink": Unlink,
|
|
14
18
|
braces: Braces,
|
|
15
19
|
calculator: Calculator,
|
|
16
20
|
check: Check,
|
|
@@ -22,6 +26,7 @@ var LOOMA_ICONS = {
|
|
|
22
26
|
"chevron-right": ChevronRight,
|
|
23
27
|
"code-xml": CodeXml,
|
|
24
28
|
columns: Columns3,
|
|
29
|
+
compass: Compass,
|
|
25
30
|
"credit-card": CreditCard,
|
|
26
31
|
ellipsis: Ellipsis,
|
|
27
32
|
eraser: Eraser,
|
|
@@ -34,6 +39,7 @@ var LOOMA_ICONS = {
|
|
|
34
39
|
"heading-3": Heading3,
|
|
35
40
|
help: CircleQuestionMark,
|
|
36
41
|
highlighter: Highlighter,
|
|
42
|
+
history: History,
|
|
37
43
|
image: Image,
|
|
38
44
|
info: Info,
|
|
39
45
|
italic: Italic,
|
|
@@ -114,4 +120,4 @@ function getVisualViewportRect(owner = window) {
|
|
|
114
120
|
};
|
|
115
121
|
}
|
|
116
122
|
//#endregion
|
|
117
|
-
export { DEFAULT_MENTION_RESULT_LIMIT, LOOMA_ACTIVE_BLOCK_BLUR_GRACE_MS, LOOMA_ACTIVE_BLOCK_CLASS, LOOMA_ACTIVE_BLOCK_TYPING_IDLE_MS, LOOMA_CALLOUT_TONES, LOOMA_CHIP_COLORS, LOOMA_ICONS, LoomaActiveBlock, LoomaActiveBlockPluginKey, LoomaCallout, LoomaChip, LoomaMentionSuggestionPluginKey, LoomaSlashCommand, LoomaSmartPaste, LoomaTable, LoomaTableCell, LoomaTableHeader, LoomaTableKit, MAX_MENTION_RESULT_LIMIT, TABLE_CELL_BACKGROUND_OPTIONS, TABLE_CELL_BACKGROUND_PRESETS, createLoomaMentionExtension, createLoomaSlashCommandExtension, filterLoomaMentionItems, getActiveTableCellAlignment, getActiveTableCellBackground, getActiveTableUiState, getDefaultEditorExtensions, getDefaultSlashCommands, getLoomaTableExtensions, getVisualViewportRect, handleTableAction, handleTableOverlayAction, insertTableAtRange, loomaIconMarkup, measureTableOverlayGeometry, normalizeActiveTableColumnWidths, normalizeLoomaChipColor, normalizeMentionResultLimit, resolveTableCellAt, setActiveTableCellAlignment, setActiveTableCellBackground, shouldShowTextFormattingToolbar };
|
|
123
|
+
export { DEFAULT_MENTION_RESULT_LIMIT, LOOMA_ACTIVE_BLOCK_BLUR_GRACE_MS, LOOMA_ACTIVE_BLOCK_CLASS, LOOMA_ACTIVE_BLOCK_TYPING_IDLE_MS, LOOMA_CALLOUT_TONES, LOOMA_CHIP_COLORS, LOOMA_ICONS, LoomaActiveBlock, LoomaActiveBlockPluginKey, LoomaCallout, LoomaChip, LoomaMentionSuggestionPluginKey, LoomaSlashCommand, LoomaSmartPaste, LoomaTable, LoomaTableCell, LoomaTableHeader, LoomaTableKit, MAX_MENTION_RESULT_LIMIT, TABLE_CELL_BACKGROUND_OPTIONS, TABLE_CELL_BACKGROUND_PRESETS, createLoomaMentionExtension, createLoomaSlashCommandExtension, createSiteRelativeLinks, filterLoomaMentionItems, getActiveTableCellAlignment, getActiveTableCellBackground, getActiveTableUiState, getDefaultEditorExtensions, getDefaultSlashCommands, getLoomaTableExtensions, getVisualViewportRect, handleTableAction, handleTableOverlayAction, insertTableAtRange, loomaIconMarkup, measureTableOverlayGeometry, normalizeActiveTableColumnWidths, normalizeLoomaChipColor, normalizeMentionResultLimit, resolveTableCellAt, setActiveTableCellAlignment, setActiveTableCellBackground, shouldShowTextFormattingToolbar, siteRelativeHref };
|
package/package.json
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
inline-size: 2.5rem;
|
|
41
41
|
block-size: 2.5rem;
|
|
42
42
|
border-radius: var(--ui-radius-round);
|
|
43
|
-
border:
|
|
43
|
+
border: var(--ui-border-width) solid var(--ui-border-strong);
|
|
44
44
|
background: var(--ui-surface-elevated);
|
|
45
45
|
color: var(--ui-text-primary);
|
|
46
46
|
box-shadow:
|
package/styles/ui-avatar.css
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
inline-size: 2.5rem;
|
|
31
31
|
block-size: 2.5rem;
|
|
32
32
|
border-radius: var(--ui-avatar-radius, var(--ui-radius-round));
|
|
33
|
-
border:
|
|
33
|
+
border: var(--ui-border-width) solid var(--ui-avatar-border, color-mix(in srgb, var(--ui-accent-solid) 35%, var(--ui-surface-default)));
|
|
34
34
|
background: var(--ui-avatar-surface, var(--ui-accent-soft));
|
|
35
35
|
color: var(--ui-avatar-text, var(--ui-accent-subtle-text, var(--ui-accent-solid)));
|
|
36
36
|
font: inherit;
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
/* An outline, not a dot: the avatar clips its content to the circle, and an outline is drawn
|
|
69
69
|
outside the box, so the ring survives the clip and the overlap in an Avatar Group. */
|
|
70
70
|
:scope[data-ui-avatar-state~="active"] {
|
|
71
|
-
outline:
|
|
72
|
-
outline-offset:
|
|
71
|
+
outline: var(--ui-border-width) solid var(--ui-avatar-active-ring, var(--ui-accent-solid));
|
|
72
|
+
outline-offset: var(--ui-border-width);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.fallback {
|
package/styles/ui-badge.css
CHANGED
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
justify-content: center;
|
|
68
68
|
max-width: 100%;
|
|
69
69
|
padding: var(--ui-badge-padding-block, var(--ui-space-0-5)) var(--ui-badge-padding-inline, var(--ui-space-2));
|
|
70
|
-
border:
|
|
70
|
+
border: var(--ui-border-width) solid var(--ui-badge-border, var(--_badge-color-border, var(--_badge-border)));
|
|
71
71
|
border-radius: var(--ui-radius-round);
|
|
72
72
|
background: var(--_badge-outline-surface);
|
|
73
73
|
color: var(--ui-badge-text, var(--_badge-color-text, var(--_badge-text)));
|
package/styles/ui-button.css
CHANGED
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
appearance: none;
|
|
109
109
|
min-block-size: var(--ui-button-min-block-size, var(--ui-control-size-md));
|
|
110
110
|
border-style: solid;
|
|
111
|
-
border-width:
|
|
111
|
+
border-width: var(--ui-border-width);
|
|
112
112
|
border-color: var(--ui-button-border, var(--_tone));
|
|
113
113
|
border-radius: var(--ui-button-radius, var(--ui-action-radius, var(--ui-radius-md)));
|
|
114
114
|
background-color: var(--ui-button-surface, oklch(from var(--_tone) l c h / 5%));
|
|
@@ -371,8 +371,8 @@
|
|
|
371
371
|
:scope[data-ui-button-state~="variant=link"]:focus-visible {
|
|
372
372
|
box-shadow: none;
|
|
373
373
|
/* Fallback keeps the ring if the token is missing: an unresolved var() would void the outline. */
|
|
374
|
-
outline:
|
|
375
|
-
outline-offset:
|
|
374
|
+
outline: var(--ui-focus-width) solid var(--ui-focus-ring);
|
|
375
|
+
outline-offset: var(--ui-focus-width);
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
package/styles/ui-callout.css
CHANGED
|
@@ -64,8 +64,9 @@
|
|
|
64
64
|
padding-block: var(--ui-callout-padding-block, var(--ui-space-2));
|
|
65
65
|
padding-inline-start: var(--ui-callout-padding-inline, var(--ui-space-2));
|
|
66
66
|
padding-inline-end: var(--ui-callout-padding-inline, var(--ui-space-3));
|
|
67
|
-
border: var(--ui-callout-border-width,
|
|
68
|
-
|
|
67
|
+
border: var(--ui-callout-border-width, var(--ui-border-width)) solid
|
|
68
|
+
color-mix(in srgb, var(--ui-callout-border, var(--_callout-border)) 35%, transparent);
|
|
69
|
+
border-inline-start: var(--ui-callout-leading-border-width, var(--ui-accent-line-width)) solid var(--ui-callout-border, var(--_callout-border));
|
|
69
70
|
border-radius: var(--ui-radius-md);
|
|
70
71
|
background: var(--ui-callout-surface, var(--_callout-surface));
|
|
71
72
|
color: var(--ui-callout-text, var(--ui-text-primary));
|
package/styles/ui-card.css
CHANGED
|
@@ -9,12 +9,16 @@
|
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
min-inline-size: 0;
|
|
11
11
|
padding: var(--ui-space-5);
|
|
12
|
-
border:
|
|
12
|
+
border: var(--ui-border-width) solid var(--ui-border-strong);
|
|
13
13
|
border-radius: var(--ui-radius-lg);
|
|
14
14
|
background: var(--ui-surface-raised);
|
|
15
15
|
color: var(--ui-text-primary);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
:scope[data-ui-card-state~="padding=xs"] {
|
|
19
|
+
gap: var(--ui-space-1);
|
|
20
|
+
padding: var(--ui-space-2);
|
|
21
|
+
}
|
|
18
22
|
:scope[data-ui-card-state~="padding=sm"] {
|
|
19
23
|
gap: var(--ui-space-2);
|
|
20
24
|
padding: var(--ui-space-3);
|
|
@@ -36,10 +40,23 @@
|
|
|
36
40
|
|
|
37
41
|
:scope[data-ui-card-state~="tone=danger"] {
|
|
38
42
|
border-color: color-mix(in srgb, var(--ui-danger) 45%, var(--ui-border-default));
|
|
39
|
-
border-inline-start:
|
|
43
|
+
border-inline-start: var(--ui-accent-line-width) solid var(--ui-danger);
|
|
40
44
|
background: var(--ui-danger-soft);
|
|
41
45
|
}
|
|
42
46
|
|
|
47
|
+
:scope[data-ui-card-state~="size=sm"] {
|
|
48
|
+
inline-size: min(22rem, calc(100vw - var(--ui-space-2) * 2));
|
|
49
|
+
max-inline-size: min(22rem, calc(100vw - var(--ui-space-2) * 2));
|
|
50
|
+
}
|
|
51
|
+
:scope[data-ui-card-state~="size=md"] {
|
|
52
|
+
inline-size: min(28rem, calc(100vw - var(--ui-space-2) * 2));
|
|
53
|
+
max-inline-size: min(28rem, calc(100vw - var(--ui-space-2) * 2));
|
|
54
|
+
}
|
|
55
|
+
:scope[data-ui-card-state~="size=lg"] {
|
|
56
|
+
inline-size: min(36rem, calc(100vw - var(--ui-space-2) * 2));
|
|
57
|
+
max-inline-size: min(36rem, calc(100vw - var(--ui-space-2) * 2));
|
|
58
|
+
}
|
|
59
|
+
|
|
43
60
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
44
61
|
:scope[hidden] {
|
|
45
62
|
display: none;
|
package/styles/ui-checkbox.css
CHANGED
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
inline-size: var(--_ui-checkbox-size, 1.125rem);
|
|
73
73
|
block-size: var(--_ui-checkbox-size, 1.125rem);
|
|
74
74
|
margin: 0.125em 0 0;
|
|
75
|
-
border:
|
|
75
|
+
border: var(--ui-border-width) solid var(--ui-control-border, var(--ui-border-strong));
|
|
76
76
|
border-radius: var(--ui-radius-sm);
|
|
77
77
|
background: var(--ui-control-surface, var(--ui-surface-default));
|
|
78
78
|
box-shadow: var(--ui-control-inset);
|
|
@@ -134,8 +134,8 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
input:focus-visible {
|
|
137
|
-
outline:
|
|
138
|
-
outline-offset:
|
|
137
|
+
outline: var(--ui-focus-width) solid var(--ui-focus-ring, var(--ui-accent-solid));
|
|
138
|
+
outline-offset: var(--ui-focus-width);
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
:scope[data-ui-checkbox-state~="invalid"] input {
|
package/styles/ui-combobox.css
CHANGED
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
flex: 1 1 auto;
|
|
110
110
|
display: flex;
|
|
111
111
|
min-inline-size: 0;
|
|
112
|
-
border:
|
|
112
|
+
border: var(--ui-border-width) solid var(--ui-control-border, var(--ui-border-default));
|
|
113
113
|
border-radius: var(--_ui-combobox-radius, var(--ui-field-radius, var(--ui-radius-md)));
|
|
114
114
|
background: var(--ui-control-surface, var(--ui-surface-default));
|
|
115
115
|
box-shadow: var(--ui-control-inset);
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
button:focus-visible {
|
|
225
225
|
outline: none;
|
|
226
226
|
background: var(--ui-surface-muted);
|
|
227
|
-
box-shadow: inset 0 0 0
|
|
227
|
+
box-shadow: inset 0 0 0 var(--ui-focus-width) color-mix(in srgb, var(--ui-focus-ring) 45%, transparent);
|
|
228
228
|
}
|
|
229
229
|
input:disabled, button:disabled {
|
|
230
230
|
color: var(--ui-disabled-text);
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
overflow: auto;
|
|
246
246
|
margin: 0;
|
|
247
247
|
padding: var(--ui-space-1);
|
|
248
|
-
border:
|
|
248
|
+
border: var(--ui-border-width) solid var(--_ui-combobox-popup-border, var(--ui-overlay-border, var(--ui-border-strong)));
|
|
249
249
|
border-radius: var(--_ui-combobox-popup-radius, var(--ui-overlay-radius, var(--ui-radius-md)));
|
|
250
250
|
background: var(--_ui-combobox-popup-surface, var(--ui-overlay-surface, var(--ui-surface-elevated)));
|
|
251
251
|
color: var(--ui-text-primary);
|
|
@@ -260,7 +260,7 @@
|
|
|
260
260
|
}
|
|
261
261
|
.primary {
|
|
262
262
|
display: block;
|
|
263
|
-
color: var(--_ui-combobox-option-text,
|
|
263
|
+
color: var(--_ui-combobox-option-text, inherit);
|
|
264
264
|
font-weight: 500;
|
|
265
265
|
}
|
|
266
266
|
/* A row with a tag or a description: the label and its tag on one line, the description under them. */
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
padding: var(--ui-space-0-5);
|
|
350
350
|
}
|
|
351
351
|
:scope[data-ui-combobox-state~="multiple"]:scope[data-ui-combobox-state~="size=sm"] input {
|
|
352
|
-
min-block-size: calc(var(--_row) -
|
|
352
|
+
min-block-size: calc(var(--_row) - 2 * var(--ui-border-width) - 2 * var(--ui-space-0-5));
|
|
353
353
|
padding: 0 var(--ui-space-1);
|
|
354
354
|
}
|
|
355
355
|
/* A large multiple field starts at the large control height, as sm starts at the small one. */
|
|
@@ -357,7 +357,7 @@
|
|
|
357
357
|
min-block-size: 0;
|
|
358
358
|
}
|
|
359
359
|
:scope[data-ui-combobox-state~="multiple"]:scope[data-ui-combobox-state~="size=lg"] input {
|
|
360
|
-
min-block-size: calc(var(--ui-control-size-lg) -
|
|
360
|
+
min-block-size: calc(var(--ui-control-size-lg) - 2 * var(--ui-border-width) - 2 * var(--ui-space-1));
|
|
361
361
|
}
|
|
362
362
|
.item {
|
|
363
363
|
appearance: none;
|
|
@@ -375,8 +375,8 @@
|
|
|
375
375
|
cursor: default;
|
|
376
376
|
}
|
|
377
377
|
.item:focus-visible {
|
|
378
|
-
outline:
|
|
379
|
-
outline-offset:
|
|
378
|
+
outline: var(--ui-focus-width) solid var(--ui-focus-ring);
|
|
379
|
+
outline-offset: var(--ui-border-width);
|
|
380
380
|
}
|
|
381
381
|
.item:disabled {
|
|
382
382
|
color: var(--ui-disabled-text);
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
box-sizing: border-box;
|
|
43
43
|
padding: var(--ui-space-1);
|
|
44
44
|
background: var(--_ui-context-menu-surface, var(--ui-overlay-surface, var(--ui-surface-elevated)));
|
|
45
|
-
border:
|
|
45
|
+
border: var(--ui-border-width) solid var(--_ui-context-menu-border, var(--ui-overlay-border, var(--ui-border-strong)));
|
|
46
46
|
border-radius: var(--_ui-context-menu-radius, var(--ui-overlay-radius, var(--ui-radius-lg)));
|
|
47
47
|
box-shadow: var(--_ui-context-menu-shadow, var(--ui-overlay-shadow, var(--ui-elevation-overlay, var(--ui-shadow-lg))));
|
|
48
48
|
outline: 0;
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
block-size: 0;
|
|
64
64
|
margin: var(--ui-space-1) 0;
|
|
65
65
|
border: 0;
|
|
66
|
-
border-block-start:
|
|
66
|
+
border-block-start: var(--ui-border-width) solid var(--ui-border-divider);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.menu:popover-open {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
--_ui-description-align: flex-start;
|
|
42
42
|
--_ui-description-value-size: var(--ui-font-size-lg);
|
|
43
43
|
--_ui-description-padding: var(--_tile-padding);
|
|
44
|
-
--_ui-description-border-width:
|
|
44
|
+
--_ui-description-border-width: var(--ui-border-width);
|
|
45
45
|
--_ui-description-border-color: var(--ui-border-strong);
|
|
46
46
|
--_gap: var(--ui-space-3);
|
|
47
47
|
--_gap-compact: var(--ui-space-2);
|
package/styles/ui-dialog.css
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
overflow: hidden;
|
|
60
60
|
flex-direction: column;
|
|
61
61
|
background: var(--ui-dialog-surface, var(--ui-overlay-surface, var(--ui-surface-elevated)));
|
|
62
|
-
border:
|
|
62
|
+
border: var(--ui-border-width) solid var(--ui-dialog-border, var(--ui-overlay-border, var(--ui-border-strong)));
|
|
63
63
|
border-radius: var(--ui-dialog-radius, var(--ui-overlay-radius, var(--ui-radius-dialog)));
|
|
64
64
|
box-shadow: var(--ui-dialog-shadow, var(--ui-overlay-shadow, var(--ui-elevation-dialog, var(--ui-shadow-xl))));
|
|
65
65
|
visibility: hidden;
|
|
@@ -165,8 +165,8 @@
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
.close:focus-visible {
|
|
168
|
-
outline:
|
|
169
|
-
outline-offset:
|
|
168
|
+
outline: var(--ui-focus-width) solid var(--ui-focus-ring);
|
|
169
|
+
outline-offset: var(--ui-focus-width);
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
/* A touch target, like Button on coarse pointers. */
|
package/styles/ui-disclosure.css
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
display: block;
|
|
39
39
|
inline-size: 100%;
|
|
40
40
|
overflow: clip;
|
|
41
|
-
border-block-end:
|
|
41
|
+
border-block-end: var(--ui-border-width) solid var(--ui-border-divider);
|
|
42
42
|
color: var(--ui-text-primary);
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
}
|
|
68
68
|
.trigger:focus-visible {
|
|
69
69
|
outline: none;
|
|
70
|
-
box-shadow: inset 0 0 0
|
|
70
|
+
box-shadow: inset 0 0 0 var(--ui-focus-width) color-mix(in srgb, var(--ui-focus-ring) 45%, transparent);
|
|
71
71
|
}
|
|
72
72
|
.trigger:disabled {
|
|
73
73
|
color: var(--ui-disabled-text);
|
|
@@ -105,6 +105,43 @@
|
|
|
105
105
|
transform: rotate(225deg) translate(-1px, -1px);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
/* A bounded accordion owns one flexible body, so its trigger never scrolls away. The
|
|
109
|
+
* normal content-sized layout and its animation remain unchanged when fill is omitted. */
|
|
110
|
+
:scope[data-ui-disclosure-state~="fill"] {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
flex: none;
|
|
114
|
+
min-block-size: 0;
|
|
115
|
+
border-block-end: 0;
|
|
116
|
+
border-block-start: var(--ui-border-width) solid var(--ui-border-divider);
|
|
117
|
+
}
|
|
118
|
+
:scope[data-ui-disclosure-state~="fill"][data-ui-disclosure-state~="internalOpen"] {
|
|
119
|
+
flex: 1;
|
|
120
|
+
}
|
|
121
|
+
:scope[data-ui-disclosure-state~="fill"] .heading {
|
|
122
|
+
flex: none;
|
|
123
|
+
}
|
|
124
|
+
:scope[data-ui-disclosure-state~="fill"] .trigger {
|
|
125
|
+
border-radius: 0;
|
|
126
|
+
}
|
|
127
|
+
:scope[data-ui-disclosure-state~="fill"] .panel {
|
|
128
|
+
display: flex;
|
|
129
|
+
flex: 1;
|
|
130
|
+
min-block-size: 0;
|
|
131
|
+
transition: none;
|
|
132
|
+
}
|
|
133
|
+
:scope[data-ui-disclosure-state~="fill"] .panel[hidden] {
|
|
134
|
+
flex: none;
|
|
135
|
+
block-size: 0;
|
|
136
|
+
}
|
|
137
|
+
:scope[data-ui-disclosure-state~="fill"] .panel-inner {
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
flex: 1;
|
|
141
|
+
min-block-size: 0;
|
|
142
|
+
padding: 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
108
145
|
@media (prefers-reduced-motion: reduce) {
|
|
109
146
|
.panel,
|
|
110
147
|
.chevron {
|
|
@@ -125,6 +162,9 @@
|
|
|
125
162
|
/* An accordion row, not a field: no enclosing box, just a divider, so it never reads as a
|
|
126
163
|
* select or combobox. Stacked disclosures share their dividers. */
|
|
127
164
|
|
|
165
|
+
/* A bounded accordion owns one flexible body, so its trigger never scrolls away. The
|
|
166
|
+
* normal content-sized layout and its animation remain unchanged when fill is omitted. */
|
|
167
|
+
|
|
128
168
|
@media (prefers-reduced-motion: reduce) {
|
|
129
169
|
}
|
|
130
170
|
|
package/styles/ui-editable.css
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
min-block-size: var(--ui-control-size-sm);
|
|
25
25
|
margin: 0;
|
|
26
26
|
padding: var(--ui-space-1) var(--ui-space-2);
|
|
27
|
-
border:
|
|
27
|
+
border: var(--ui-border-width) solid transparent;
|
|
28
28
|
border-radius: var(--ui-radius-md);
|
|
29
29
|
font: inherit;
|
|
30
30
|
line-height: var(--ui-line-height-md);
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
.actions button {
|
|
98
98
|
min-block-size: var(--ui-control-size-sm);
|
|
99
99
|
padding: 0 var(--ui-space-3);
|
|
100
|
-
border:
|
|
100
|
+
border: var(--ui-border-width) solid var(--ui-border-strong);
|
|
101
101
|
border-radius: var(--ui-radius-md);
|
|
102
102
|
background: var(--ui-surface-elevated);
|
|
103
103
|
background-image: var(--ui-raised-highlight);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
:scope {
|
|
4
4
|
padding: var(--ui-space-3);
|
|
5
5
|
background: var(--ui-surface);
|
|
6
|
-
border:
|
|
6
|
+
border: var(--ui-border-width) solid var(--ui-border-strong);
|
|
7
7
|
border-radius: var(--ui-radius-md);
|
|
8
8
|
box-shadow: var(--ui-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
|
|
9
9
|
}
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
width: 1.25rem;
|
|
49
49
|
height: 1.25rem;
|
|
50
50
|
padding: 0;
|
|
51
|
-
border:
|
|
52
|
-
border-radius:
|
|
51
|
+
border: var(--ui-border-width) solid var(--ui-control-border);
|
|
52
|
+
border-radius: var(--ui-radius-sm);
|
|
53
53
|
background: var(--ui-surface);
|
|
54
54
|
cursor: pointer;
|
|
55
55
|
}
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.cell:focus-visible {
|
|
63
|
-
outline:
|
|
64
|
-
outline-offset: -
|
|
63
|
+
outline: var(--ui-focus-width) solid var(--ui-focus-ring);
|
|
64
|
+
outline-offset: calc(-1 * var(--ui-focus-width));
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.header {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
background: var(--ui-surface);
|
|
12
|
-
border:
|
|
12
|
+
border: var(--ui-border-width) solid var(--ui-border-strong);
|
|
13
13
|
border-radius: var(--ui-radius-dialog);
|
|
14
14
|
box-shadow: var(--ui-shadow-lg, 0 8px 24px rgb(0 0 0 / 0.12));
|
|
15
15
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
gap: var(--ui-space-3);
|
|
22
22
|
padding: var(--ui-space-2) var(--ui-space-3);
|
|
23
23
|
color: var(--ui-text-secondary);
|
|
24
|
-
border-bottom:
|
|
24
|
+
border-bottom: var(--ui-border-width) solid var(--ui-border-divider);
|
|
25
25
|
font-size: var(--ui-font-size-xs);
|
|
26
26
|
font-weight: var(--ui-font-semibold);
|
|
27
27
|
}
|