@threadlabs/looma 0.26.18 → 0.26.20

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.
@@ -4041,39 +4041,39 @@ ul[data-v-516afff1] {
4041
4041
  display: none;
4042
4042
  }
4043
4043
 
4044
- [data-component~="ui-editor-table-overlay"][data-v-57feae5c] {
4044
+ [data-component~="ui-editor-table-overlay"][data-v-0e632fe0] {
4045
4045
  display: block;
4046
4046
  width: 100%;
4047
4047
  height: 100%;
4048
4048
  overflow: visible;
4049
4049
  pointer-events: none;
4050
4050
  }
4051
- [data-component~="ui-editor-table-overlay"][data-v-57feae5c] {
4051
+ [data-component~="ui-editor-table-overlay"][data-v-0e632fe0] {
4052
4052
  position: relative;
4053
4053
  width: 100%;
4054
4054
  height: 100%;
4055
4055
  overflow: visible;
4056
4056
  pointer-events: none;
4057
4057
  }
4058
- .rows[data-v-57feae5c],
4059
- .cols[data-v-57feae5c] {
4058
+ .rows[data-v-0e632fe0],
4059
+ .cols[data-v-0e632fe0] {
4060
4060
  pointer-events: none;
4061
4061
  position: absolute;
4062
4062
  }
4063
- .rows[data-v-57feae5c] {
4063
+ .rows[data-v-0e632fe0] {
4064
4064
  inset: 0;
4065
4065
  width: 100%;
4066
4066
  }
4067
- .cols[data-v-57feae5c] {
4067
+ .cols[data-v-0e632fe0] {
4068
4068
  inset: 0;
4069
4069
  height: 100%;
4070
4070
  }
4071
- .control[data-v-57feae5c] {
4071
+ .control[data-v-0e632fe0] {
4072
4072
  position: absolute;
4073
4073
  z-index: 1;
4074
4074
  pointer-events: none;
4075
4075
  }
4076
- .handle[data-v-57feae5c] {
4076
+ .handle[data-v-0e632fe0] {
4077
4077
  position: absolute;
4078
4078
  display: inline-flex;
4079
4079
  align-items: center;
@@ -4100,65 +4100,65 @@ ul[data-v-516afff1] {
4100
4100
  pointer-events: auto;
4101
4101
  cursor: pointer;
4102
4102
  }
4103
- .handle[data-v-57feae5c] {
4103
+ .handle[data-v-0e632fe0] {
4104
4104
  --_ui-default-icon-size: 14px;
4105
4105
  --_ui-default-icon-stroke-width: 2;
4106
4106
  }
4107
- .handle[data-ui-proximity="near"][data-v-57feae5c],
4108
- .control.active .handle[data-v-57feae5c],
4109
- .handle[data-v-57feae5c]:focus-visible {
4107
+ .handle[data-ui-proximity="near"][data-v-0e632fe0],
4108
+ .control.active .handle[data-v-0e632fe0],
4109
+ .handle[data-v-0e632fe0]:focus-visible {
4110
4110
  opacity: 1;
4111
4111
  scale: 1;
4112
4112
  }
4113
- .control.active .handle[data-v-57feae5c],
4114
- .handle[data-v-57feae5c]:focus-visible {
4113
+ .control.active .handle[data-v-0e632fe0],
4114
+ .handle[data-v-0e632fe0]:focus-visible {
4115
4115
  border-color: var(--ui-affordance-direct-color, var(--ui-accent-solid));
4116
4116
  background: var(--ui-affordance-direct-color, var(--ui-accent-solid));
4117
4117
  color: var(--ui-text-on-accent);
4118
4118
  box-shadow: var(--ui-shadow-sm, 0 1px 3px rgb(0 0 0 / 0.1));
4119
4119
  }
4120
- .handle[data-v-57feae5c]:focus-visible,
4121
- .selector[data-v-57feae5c]:focus-visible,
4122
- .cell-menu[data-v-57feae5c]:focus-visible {
4120
+ .handle[data-v-0e632fe0]:focus-visible,
4121
+ .selector[data-v-0e632fe0]:focus-visible,
4122
+ .cell-menu[data-v-0e632fe0]:focus-visible {
4123
4123
  outline: var(--ui-focus-width) solid var(--ui-focus-ring);
4124
4124
  outline-offset: var(--ui-focus-width);
4125
4125
  }
4126
- .control.row[data-v-57feae5c] {
4126
+ .control.row[data-v-0e632fe0] {
4127
4127
  left: 0;
4128
4128
  width: 100%;
4129
4129
  height: 0;
4130
4130
  }
4131
- .control.row .handle[data-v-57feae5c] {
4131
+ .control.row .handle[data-v-0e632fe0] {
4132
4132
  top: -12px;
4133
4133
  left: -30px;
4134
4134
  }
4135
- .control.col[data-v-57feae5c] {
4135
+ .control.col[data-v-0e632fe0] {
4136
4136
  top: 0;
4137
4137
  width: 0;
4138
4138
  height: 100%;
4139
4139
  }
4140
- .control.col .handle[data-v-57feae5c] {
4140
+ .control.col .handle[data-v-0e632fe0] {
4141
4141
  top: -30px;
4142
4142
  left: -12px;
4143
4143
  }
4144
- .line[data-v-57feae5c] {
4144
+ .line[data-v-0e632fe0] {
4145
4145
  position: absolute;
4146
4146
  background: var(--ui-affordance-direct-color, var(--ui-accent-solid));
4147
4147
  opacity: 0;
4148
4148
  transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
4149
4149
  }
4150
- .control.row .line[data-v-57feae5c] {
4150
+ .control.row .line[data-v-0e632fe0] {
4151
4151
  inset: calc(-0.5 * var(--ui-accent-line-width)) 0 auto;
4152
4152
  height: var(--ui-accent-line-width);
4153
4153
  }
4154
- .control.col .line[data-v-57feae5c] {
4154
+ .control.col .line[data-v-0e632fe0] {
4155
4155
  inset: 0 auto 0 calc(-0.5 * var(--ui-accent-line-width));
4156
4156
  width: var(--ui-accent-line-width);
4157
4157
  }
4158
- .control.active .line[data-v-57feae5c] {
4158
+ .control.active .line[data-v-0e632fe0] {
4159
4159
  opacity: 0.8;
4160
4160
  }
4161
- .guide[data-v-57feae5c] {
4161
+ .guide[data-v-0e632fe0] {
4162
4162
  position: absolute;
4163
4163
  width: var(--ui-affordance-guide-size);
4164
4164
  height: var(--ui-affordance-guide-size);
@@ -4167,19 +4167,19 @@ ul[data-v-516afff1] {
4167
4167
  opacity: calc(var(--ui-affordance-guide-opacity) * var(--ui-affordance-scope-guide, 1));
4168
4168
  transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
4169
4169
  }
4170
- .control.row .guide[data-v-57feae5c] {
4170
+ .control.row .guide[data-v-0e632fe0] {
4171
4171
  left: -10px;
4172
4172
  top: -2px;
4173
4173
  }
4174
- .control.col .guide[data-v-57feae5c] {
4174
+ .control.col .guide[data-v-0e632fe0] {
4175
4175
  left: -2px;
4176
4176
  top: -10px;
4177
4177
  }
4178
- .control:has(.handle[data-ui-proximity="near"]) .guide[data-v-57feae5c],
4179
- .control.active .guide[data-v-57feae5c] {
4178
+ .control:has(.handle[data-ui-proximity="near"]) .guide[data-v-0e632fe0],
4179
+ .control.active .guide[data-v-0e632fe0] {
4180
4180
  opacity: 0;
4181
4181
  }
4182
- .tooltip[data-v-57feae5c] {
4182
+ .tooltip[data-v-0e632fe0] {
4183
4183
  position: absolute;
4184
4184
  z-index: 2;
4185
4185
  top: calc(100% + 6px);
@@ -4198,18 +4198,18 @@ ul[data-v-516afff1] {
4198
4198
  transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
4199
4199
  pointer-events: none;
4200
4200
  }
4201
- .control.row .tooltip[data-v-57feae5c] {
4201
+ .control.row .tooltip[data-v-0e632fe0] {
4202
4202
  top: 50%;
4203
4203
  left: auto;
4204
4204
  right: calc(100% + 8px);
4205
4205
  transform: translateY(-50%);
4206
4206
  }
4207
- .control.active .tooltip[data-v-57feae5c],
4208
- .handle:focus-visible .tooltip[data-v-57feae5c] {
4207
+ .control.active .tooltip[data-v-0e632fe0],
4208
+ .handle:focus-visible .tooltip[data-v-0e632fe0] {
4209
4209
  opacity: 1;
4210
4210
  }
4211
- .selector[data-v-57feae5c],
4212
- .cell-menu[data-v-57feae5c] {
4211
+ .selector[data-v-0e632fe0],
4212
+ .cell-menu[data-v-0e632fe0] {
4213
4213
  position: absolute;
4214
4214
  z-index: 2;
4215
4215
  display: inline-flex;
@@ -4228,21 +4228,21 @@ ul[data-v-516afff1] {
4228
4228
  border-color var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease),
4229
4229
  box-shadow var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
4230
4230
  }
4231
- .selector[data-v-57feae5c]:hover,
4232
- .cell-menu[data-v-57feae5c]:hover {
4231
+ .selector[data-v-0e632fe0]:hover,
4232
+ .cell-menu[data-v-0e632fe0]:hover {
4233
4233
  background: var(--ui-surface-muted);
4234
4234
  color: var(--ui-text-primary);
4235
4235
  box-shadow: var(--ui-shadow-xs, 0 1px 2px rgb(0 0 0 / 0.05));
4236
4236
  }
4237
- .selector[data-v-57feae5c] {
4237
+ .selector[data-v-0e632fe0] {
4238
4238
  border-radius: var(--ui-radius-round);
4239
4239
  touch-action: none;
4240
4240
  cursor: grab;
4241
4241
  }
4242
- .selector[data-v-57feae5c]:active {
4242
+ .selector[data-v-0e632fe0]:active {
4243
4243
  cursor: grabbing;
4244
4244
  }
4245
- .selector[data-v-57feae5c]::before {
4245
+ .selector[data-v-0e632fe0]::before {
4246
4246
  content: "";
4247
4247
  position: absolute;
4248
4248
  inset: 50% auto auto 50%;
@@ -4253,7 +4253,7 @@ ul[data-v-516afff1] {
4253
4253
  transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
4254
4254
  pointer-events: none;
4255
4255
  }
4256
- .selector .glyph[data-v-57feae5c] {
4256
+ .selector .glyph[data-v-0e632fe0] {
4257
4257
  display: block;
4258
4258
  width: 14px;
4259
4259
  height: 14px;
@@ -4265,75 +4265,75 @@ ul[data-v-516afff1] {
4265
4265
  opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease),
4266
4266
  transform var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
4267
4267
  }
4268
- .selector[data-v-57feae5c]:hover::before,
4269
- .selector[data-v-57feae5c]:focus-visible::before {
4268
+ .selector[data-v-0e632fe0]:hover::before,
4269
+ .selector[data-v-0e632fe0]:focus-visible::before {
4270
4270
  opacity: 0;
4271
4271
  }
4272
- .selector:hover .glyph[data-v-57feae5c],
4273
- .selector:focus-visible .glyph[data-v-57feae5c] {
4272
+ .selector:hover .glyph[data-v-0e632fe0],
4273
+ .selector:focus-visible .glyph[data-v-0e632fe0] {
4274
4274
  opacity: 1;
4275
4275
  transform: scale(1);
4276
4276
  }
4277
- .selector.row[data-v-57feae5c] {
4277
+ .selector.row[data-v-0e632fe0] {
4278
4278
  left: -9px;
4279
4279
  width: 18px;
4280
4280
  height: 32px;
4281
4281
  transform: translateY(-50%);
4282
4282
  }
4283
- .selector.row[data-v-57feae5c]::before {
4283
+ .selector.row[data-v-0e632fe0]::before {
4284
4284
  width: 2px;
4285
4285
  height: 16px;
4286
4286
  }
4287
- .selector.column[data-v-57feae5c] {
4287
+ .selector.column[data-v-0e632fe0] {
4288
4288
  top: -9px;
4289
4289
  width: 32px;
4290
4290
  height: 18px;
4291
4291
  transform: translateX(-50%);
4292
4292
  }
4293
- .selector.column[data-v-57feae5c]::before {
4293
+ .selector.column[data-v-0e632fe0]::before {
4294
4294
  width: 16px;
4295
4295
  height: 2px;
4296
4296
  }
4297
4297
  @media (hover: none), (pointer: coarse) {
4298
- .selector[data-v-57feae5c]::before {
4298
+ .selector[data-v-0e632fe0]::before {
4299
4299
  opacity: 0;
4300
4300
  }
4301
- .selector .glyph[data-v-57feae5c] {
4301
+ .selector .glyph[data-v-0e632fe0] {
4302
4302
  opacity: 1;
4303
4303
  transform: none;
4304
4304
  }
4305
4305
  }
4306
- .cell-menu[data-v-57feae5c] {
4306
+ .cell-menu[data-v-0e632fe0] {
4307
4307
  width: 24px;
4308
4308
  height: 24px;
4309
4309
  border-radius: var(--ui-radius-sm);
4310
4310
  background: color-mix(in srgb, var(--ui-surface-muted) 78%, transparent);
4311
4311
  }
4312
- .cell-menu[data-v-57feae5c] {
4312
+ .cell-menu[data-v-0e632fe0] {
4313
4313
  --_ui-default-icon-size: 15px;
4314
4314
  --_ui-default-icon-stroke-width: 2;
4315
4315
  }
4316
- .drop-indicator[data-v-57feae5c] {
4316
+ .drop-indicator[data-v-0e632fe0] {
4317
4317
  position: absolute;
4318
4318
  z-index: 3;
4319
4319
  background: var(--ui-accent-solid);
4320
4320
  box-shadow: 0 0 0 var(--ui-border-width) var(--ui-surface);
4321
4321
  pointer-events: none;
4322
4322
  }
4323
- .drop-indicator.row[data-v-57feae5c] {
4323
+ .drop-indicator.row[data-v-0e632fe0] {
4324
4324
  left: 0;
4325
4325
  width: 100%;
4326
4326
  height: var(--ui-accent-line-width);
4327
4327
  }
4328
- .drop-indicator.column[data-v-57feae5c] {
4328
+ .drop-indicator.column[data-v-0e632fe0] {
4329
4329
  top: 0;
4330
4330
  width: var(--ui-accent-line-width);
4331
4331
  height: 100%;
4332
4332
  }
4333
- .drop-indicator[hidden][data-v-57feae5c] {
4333
+ .drop-indicator[hidden][data-v-0e632fe0] {
4334
4334
  display: none;
4335
4335
  }
4336
- [data-component~="ui-editor-table-overlay"][hidden][data-v-57feae5c] {
4336
+ [data-component~="ui-editor-table-overlay"][hidden][data-v-0e632fe0] {
4337
4337
  display: none;
4338
4338
  }
4339
4339
 
@@ -10082,6 +10082,21 @@ html[data-ui-input-modality="touch"]
10082
10082
 
10083
10083
  [data-component~="ui-editor-surface"][data-density="compact"] .ProseMirror > :first-child { margin-block-start: 0; }
10084
10084
  [data-component~="ui-editor-surface"][data-density="compact"] .ProseMirror > :last-child { margin-block-end: 0; }
10085
+
10086
+ /* List items own their small inter-item gap; paragraphs must not add another one. */
10087
+ .looma-editor .ProseMirror li > p:last-of-type,
10088
+ .looma-editor .ProseMirror li > div > p:last-of-type {
10089
+ margin-block-end: 0;
10090
+ }
10091
+
10092
+ /* A list ending a cell needs no document-level gap before the cell's padding. */
10093
+ .looma-editor .ProseMirror :is(th, td) > :is(ul, ol):not(:has(~ :not(.column-resize-handle))) {
10094
+ margin-block-end: 0;
10095
+ }
10096
+
10097
+ .looma-editor .ProseMirror li > :is(ul, ol) {
10098
+ margin-block: var(--ui-space-1) 0;
10099
+ }
10085
10100
  /**
10086
10101
  * Looma editor styles (tokens-based).
10087
10102
  * Tables, context menu, insert-table grid, slash menu. Use with ProseMirror/Tiptap content.
@@ -2655,10 +2655,12 @@ var LoomaEditor = defineComponent({
2655
2655
  onBeforeUnmount(() => clearTimeout(codeBlurTimer));
2656
2656
  const updateTableUi = () => {
2657
2657
  const instance = editor.value;
2658
+ if (hoveredTableCell && (!instance || instance.isDestroyed || !instance.view.dom.contains(hoveredTableCell))) hoveredTableCell = null;
2658
2659
  const focusInTableUi = [
2659
2660
  tableToolbarShell.value,
2660
2661
  tableOverlayShell.value,
2661
- tableMenuShell.value
2662
+ tableMenuShell.value,
2663
+ mobileToolbarShell.value
2662
2664
  ].some((shell) => shell?.contains(document.activeElement));
2663
2665
  if (!instance || instance.isDestroyed || !props.editable || !instance.isFocused && !tableInteractionActive && !hoveredTableCell && !focusInTableUi) {
2664
2666
  closeTableUi();
@@ -2712,7 +2714,7 @@ var LoomaEditor = defineComponent({
2712
2714
  queueMicrotask(updateTableUi);
2713
2715
  updateCodeUi();
2714
2716
  setTimeout(() => {
2715
- if (!tableInteractionActive && !editor.value?.isFocused) editorFocused.value = false;
2717
+ if (!tableInteractionActive && !editor.value?.isFocused && !mobileToolbarShell.value?.contains(document.activeElement)) editorFocused.value = false;
2716
2718
  if (!editor.value?.isFocused && !formattingPickerOpen() && !formattingPopup?.popper.contains(document.activeElement)) heldFormattingSelection = null;
2717
2719
  }, 0);
2718
2720
  };