@threadlabs/looma 0.23.5 → 0.23.7
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 +1 -0
- package/components/ui-badge/ui-badge.html +34 -3
- package/components/ui-icon/ui-icon.html +1 -0
- package/components/ui-list-item/ui-list-item.html +8 -0
- package/dist/index.js +1 -1
- package/editor/icons.d.ts +1 -0
- package/editor/index.js +2 -1
- package/package.json +1 -1
- package/styles/ui-badge.css +31 -0
- package/styles/ui-list-item.css +6 -0
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +1 -1
- package/vanilla/UiIcon.js +1 -1
- package/vanilla/UiListItem.d.ts +1 -0
- package/vanilla/UiListItem.js +2 -0
- package/vue/UiBadge.d.ts +3 -3
- package/vue/UiBadge.vue +38 -6
- package/vue/UiIcon.vue +4 -0
- package/vue/UiListItem.d.ts +9 -0
- package/vue/UiListItem.vue +25 -0
- package/vue/chunks/UiBadge.js +5 -4
- package/vue/chunks/UiIcon.js +8 -1
- package/vue/chunks/UiListItem.js +26 -4
- package/vue/components.css +91 -59
package/editor/icons.d.ts
CHANGED
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
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";
|
|
4
|
+
import { AlignCenter, AlignLeft, AlignRight, ArrowLeft, Bell, 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 = {
|
|
@@ -9,6 +9,7 @@ var LOOMA_ICONS = {
|
|
|
9
9
|
"align-left": AlignLeft,
|
|
10
10
|
"align-right": AlignRight,
|
|
11
11
|
"arrow-left": ArrowLeft,
|
|
12
|
+
bell: Bell,
|
|
12
13
|
bold: Bold,
|
|
13
14
|
"book-user": BookUser,
|
|
14
15
|
"search": Search,
|
package/package.json
CHANGED
package/styles/ui-badge.css
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
syntax: "*";
|
|
4
4
|
inherits: false;
|
|
5
5
|
}
|
|
6
|
+
@property --ui-badge-square-size {
|
|
7
|
+
syntax: "*";
|
|
8
|
+
inherits: false;
|
|
9
|
+
}
|
|
6
10
|
@property --ui-badge-dot-size {
|
|
7
11
|
syntax: "*";
|
|
8
12
|
inherits: false;
|
|
@@ -207,6 +211,31 @@
|
|
|
207
211
|
--_badge-text: var(--ui-info-subtle-text, var(--ui-info-solid));
|
|
208
212
|
}
|
|
209
213
|
|
|
214
|
+
/* An icon mark keeps the existing tone recipe and follows the global spacing and radius. */
|
|
215
|
+
:scope[data-ui-badge-state~="shape=square"] {
|
|
216
|
+
--_badge-square-size: var(--ui-badge-square-size, calc(var(--ui-space-4) * 2));
|
|
217
|
+
display: inline-flex;
|
|
218
|
+
box-sizing: border-box;
|
|
219
|
+
flex: none;
|
|
220
|
+
inline-size: var(--_badge-square-size);
|
|
221
|
+
block-size: var(--_badge-square-size);
|
|
222
|
+
min-inline-size: var(--_badge-square-size);
|
|
223
|
+
min-block-size: var(--_badge-square-size);
|
|
224
|
+
padding: 0;
|
|
225
|
+
border-radius: var(--ui-radius-md);
|
|
226
|
+
text-box-trim: none;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
:scope[data-ui-badge-state~="shape=square"][data-ui-badge-state~="size=xs"] {
|
|
230
|
+
--_badge-square-size: var(--ui-badge-square-size, calc(var(--ui-space-3) * 2));
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
:scope[data-ui-badge-state~="shape=square"] .label {
|
|
234
|
+
display: inline-flex;
|
|
235
|
+
align-items: center;
|
|
236
|
+
justify-content: center;
|
|
237
|
+
}
|
|
238
|
+
|
|
210
239
|
/* A dot uses the badge's tone recipe; only its silhouette and visible label change. */
|
|
211
240
|
:scope[data-ui-badge-state~="shape=dot"] {
|
|
212
241
|
position: relative;
|
|
@@ -299,6 +328,8 @@
|
|
|
299
328
|
/* A solid colour fills with the ink. Its text is the page surface, mixed at 0% only so that it too is
|
|
300
329
|
invalid while the hook is unset. */
|
|
301
330
|
|
|
331
|
+
/* An icon mark keeps the existing tone recipe and follows the global spacing and radius. */
|
|
332
|
+
|
|
302
333
|
/* A dot uses the badge's tone recipe; only its silhouette and visible label change. */
|
|
303
334
|
|
|
304
335
|
/* The clipped point needs an inset surface over an outer border-colour shape: a native border
|
package/styles/ui-list-item.css
CHANGED
|
@@ -116,6 +116,12 @@
|
|
|
116
116
|
white-space: nowrap;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
:scope[data-ui-list-item-state~="wrap"] .title,
|
|
120
|
+
:scope[data-ui-list-item-state~="wrap"] .description {
|
|
121
|
+
white-space: normal;
|
|
122
|
+
overflow-wrap: anywhere;
|
|
123
|
+
}
|
|
124
|
+
|
|
119
125
|
.title {
|
|
120
126
|
font-size: var(--ui-font-size-md);
|
|
121
127
|
font-weight: var(--_ui-list-item-title-weight, var(--ui-font-medium));
|
package/vanilla/UiBadge.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface UiBadgeElement extends HTMLSpanElement {
|
|
|
6
6
|
removeEventListener<K extends keyof UiBadgeEventMap>(type: K, listener: (this: UiBadgeElement, event: UiBadgeEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
7
7
|
}
|
|
8
8
|
export interface UiBadgeProps {
|
|
9
|
-
shape?: "pill" | "tag" | "dot" | null;
|
|
9
|
+
shape?: "pill" | "tag" | "dot" | "square" | null;
|
|
10
10
|
size?: "xs" | "md" | null;
|
|
11
11
|
tone?: "neutral" | "accent" | "info" | "success" | "warning" | "danger" | null;
|
|
12
12
|
variant?: "solid" | "subtle" | "outline" | null;
|
package/vanilla/UiBadge.js
CHANGED
|
@@ -28,7 +28,7 @@ export function createUiBadge(options = {}) {
|
|
|
28
28
|
}
|
|
29
29
|
element.append(element0);
|
|
30
30
|
manageGeneratedProps(element, [
|
|
31
|
-
{ name: "shape", attribute: "data-shape", value: componentProps["shape"], default: "pill", type: ["pill","tag","dot"], required: false },
|
|
31
|
+
{ name: "shape", attribute: "data-shape", value: componentProps["shape"], default: "pill", type: ["pill","tag","dot","square"], required: false },
|
|
32
32
|
{ name: "size", attribute: "data-size", value: componentProps["size"], default: "md", type: ["xs","md"], required: false },
|
|
33
33
|
{ name: "tone", attribute: "data-tone", value: componentProps["tone"], default: "neutral", type: ["neutral","accent","info","success","warning","danger"], required: false },
|
|
34
34
|
{ name: "variant", attribute: "data-variant", value: componentProps["variant"], default: "subtle", type: ["solid","subtle","outline"], required: false },
|