@imaginario27/air-ui-ds 1.17.0 → 1.17.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ All notable changes to this package are documented in this file.
5
5
  Historical releases were reconstructed from git history (GitHub repository) and npm publish dates.
6
6
  Future releases will include detailed entries generated with Changesets.
7
7
 
8
+ ## 1.16.0 - 2026-07-07
9
+
10
+ Release type: minor.
11
+ Commits found in range: 1.
12
+
13
+ ### Added
14
+
15
+ 1. extract standalone Switch component and polish interaction transitions ([4c28c2d](https://github.com/imaginario27/air-ui/commit/4c28c2d34dc07f299f100e3badc491d67ebf8ca4))
16
+
17
+ - Package: @imaginario27/air-ui-ds.
18
+
8
19
  ## 1.15.3 - 2026-07-03
9
20
 
10
21
  Release type: patch.
@@ -184,6 +184,23 @@
184
184
  </div>
185
185
  </div>
186
186
  </template>
187
+
188
+ <!-- Trailing drop zone: lets an item be dragged into the last position -->
189
+ <div
190
+ v-if="sortingType === RepeatingFieldSortingType.DRAG && draggedIndex !== null && draggedIndex !== items.length - 1"
191
+ @dragover.prevent="handleDragOver(items.length, $event)"
192
+ @drop.prevent="handleDrop(items.length, $event)"
193
+ >
194
+ <DragPlaceholder
195
+ v-if="dragOverIndex === items.length"
196
+ aria-hidden="true"
197
+ :text="dragPlaceholderText"
198
+ :showText="showDragPlaceholderText"
199
+ :textClass="dragPlaceholderTextClass"
200
+ :class="['h-10', dragPlaceholderClass]"
201
+ />
202
+ <div v-else class="h-4" />
203
+ </div>
187
204
  </div>
188
205
 
189
206
  <!-- Help Text (bottom) -->
@@ -348,8 +348,6 @@ const normalizeRules = (list: RuleItem[]): RuleItem[] => {
348
348
  return list.length ? cloneRules(list) : [createEmptyRule()]
349
349
  }
350
350
 
351
- // Local draft state: edits to item/operator/value only sync to the parent
352
- // via emit on add, remove, or Enter — not on every keystroke/selection.
353
351
  const localRules = ref<RuleItem[]>(normalizeRules(props.modelValue))
354
352
 
355
353
  watch(
@@ -454,7 +452,7 @@ const resolveRuleTypeFromItem = (itemValue: RuleValue): AllowedInputType => {
454
452
  }
455
453
 
456
454
  const updateRule = (index: number, field: keyof RuleItem, value: RuleValue) => {
457
- localRules.value = localRules.value.map((rule, currentIndex) => {
455
+ const nextRules = localRules.value.map((rule, currentIndex) => {
458
456
  if (currentIndex !== index) return rule
459
457
 
460
458
  if (field === 'item') {
@@ -471,6 +469,14 @@ const updateRule = (index: number, field: keyof RuleItem, value: RuleValue) => {
471
469
  [field]: value,
472
470
  }
473
471
  })
472
+
473
+ localRules.value = nextRules
474
+
475
+ // The trailing row is the not-yet-added draft rule; only commit to the
476
+ // model once it's confirmed via the add action (button, +, or Enter).
477
+ if (index !== nextRules.length - 1) {
478
+ emit('update:modelValue', nextRules)
479
+ }
474
480
  }
475
481
 
476
482
  const addRule = () => {
@@ -571,7 +577,9 @@ const handleDragOver = (index: number, event: DragEvent) => {
571
577
 
572
578
  event.preventDefault()
573
579
 
574
- if (!isSortableRow(index)) {
580
+ // The add-row (last index) isn't itself sortable, but hovering it means
581
+ // "drop after the last sortable rule" — allow that position through.
582
+ if (!isSortableRow(index) && index !== rules.value.length - 1) {
575
583
  return
576
584
  }
577
585
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imaginario27/air-ui-ds",
3
- "version": "1.17.0",
3
+ "version": "1.17.1",
4
4
  "author": "imaginario27",
5
5
  "type": "module",
6
6
  "homepage": "https://air-ui.netlify.app/",