@aerogel/core 0.1.2-next.faf07b8323db56fdfa807f3b9ffa8af276fdf288 → 0.1.2
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/aerogel-core.css +1 -1
- package/dist/aerogel-core.d.ts +20 -20
- package/dist/aerogel-core.js +1432 -1432
- package/dist/aerogel-core.js.map +1 -1
- package/package.json +3 -7
- package/src/components/ui/Modal.vue +3 -8
- package/src/utils/composition/reactiveSet.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aerogel/core",
|
|
3
|
-
"version": "0.1.2
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"vue": "^3.5.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@noeldemartin/utils": "
|
|
32
|
+
"@noeldemartin/utils": "0.7.3",
|
|
33
33
|
"@noeldemartin/vue-modals": "0.1.1",
|
|
34
34
|
"class-variance-authority": "^0.7.1",
|
|
35
35
|
"clsx": "^2.1.1",
|
|
@@ -43,11 +43,7 @@
|
|
|
43
43
|
"vue-component-type-helpers": "^2.2.8"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@aerogel/vite": "
|
|
47
|
-
"@arethetypeswrong/cli": "catalog:",
|
|
48
|
-
"@noeldemartin/scripts": "catalog:",
|
|
49
|
-
"eslint": "catalog:",
|
|
50
|
-
"publint": "catalog:"
|
|
46
|
+
"@aerogel/vite": "*"
|
|
51
47
|
},
|
|
52
48
|
"eslintConfig": {
|
|
53
49
|
"extends": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<HeadlessModalContent v-bind="contentProps" :class="renderedWrapperClass">
|
|
19
19
|
<div
|
|
20
20
|
v-if="!persistent && !closeHidden"
|
|
21
|
-
class="absolute
|
|
21
|
+
class="absolute top-0 right-0 pt-3.5 pr-2.5"
|
|
22
22
|
:class="{ 'hidden sm:block': !renderFullscreen }"
|
|
23
23
|
>
|
|
24
24
|
<button
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
<HeadlessModalDescription
|
|
47
47
|
v-if="description"
|
|
48
|
-
class="px-4 pb-2
|
|
48
|
+
class="px-4 pt-1 pb-2"
|
|
49
49
|
:class="{ 'sr-only': descriptionHidden }"
|
|
50
50
|
>
|
|
51
51
|
<Markdown :text="description" class="text-sm leading-6 text-gray-500" />
|
|
@@ -115,12 +115,7 @@ const { id, visible } = useModal();
|
|
|
115
115
|
const $modal = currentRef as Ref<Nullable<HeadlessModalInstance>>;
|
|
116
116
|
const modal = injectModal();
|
|
117
117
|
const inForeground = computed(
|
|
118
|
-
() =>
|
|
119
|
-
visible.value &&
|
|
120
|
-
modals.value
|
|
121
|
-
.slice(0)
|
|
122
|
-
.reverse()
|
|
123
|
-
.find((modal) => modal.visible.value)?.id === id.value,
|
|
118
|
+
() => visible.value && modals.value.toReversed().find((modal) => modal.visible.value)?.id === id.value,
|
|
124
119
|
);
|
|
125
120
|
const firstVisibleModal = computed(() => modals.value.find((modal) => modal.visible.value));
|
|
126
121
|
const hasRenderedModals = computed(() => modals.value.some((modal) => renderedModals.has(modal)));
|
|
@@ -8,7 +8,7 @@ export function reactiveSet<T>(initial?: T[] | Set<T>, options: { equals?: (a: T
|
|
|
8
8
|
let track: () => void;
|
|
9
9
|
const equals = options?.equals;
|
|
10
10
|
const hasEqual = equals
|
|
11
|
-
? (item: T) =>
|
|
11
|
+
? (item: T) => ref.value.values().some((existingItem) => equals(item, existingItem))
|
|
12
12
|
: () => false;
|
|
13
13
|
const ref = customRef((_track, _trigger) => {
|
|
14
14
|
track = _track;
|