@immich/ui 0.23.1 → 0.23.3

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.
@@ -1,5 +1,11 @@
1
1
  <script lang="ts">
2
- import { Button, HStack, Modal, ModalBody, ModalFooter, t, type Color } from '../index.ts';
2
+ import Button from '../Button/Button.svelte';
3
+ import Modal from '../Modal/Modal.svelte';
4
+ import ModalBody from '../Modal/ModalBody.svelte';
5
+ import ModalFooter from '../Modal/ModalFooter.svelte';
6
+ import HStack from '../Stack/HStack.svelte';
7
+ import type { Color } from '../../types.js';
8
+ import { t } from '../../services/translation.svelte.js';
3
9
  import type { Snippet } from 'svelte';
4
10
 
5
11
  interface Props {
@@ -1,4 +1,4 @@
1
- import { type Color } from '../index.ts';
1
+ import type { Color } from '../../types.js';
2
2
  import type { Snippet } from 'svelte';
3
3
  interface Props {
4
4
  title?: string;
@@ -1,5 +1,5 @@
1
1
  import { type Component, type ComponentProps } from 'svelte';
2
- import ConfirmModal from '../internal/ConfirmModal.svelte';
2
+ import ConfirmModal from '../components/ConfirmModal/ConfirmModal.svelte';
3
3
  type OnCloseData<T> = T extends {
4
4
  onClose: (data?: infer R) => void;
5
5
  } ? R | undefined : T extends {
@@ -1,5 +1,5 @@
1
1
  import { mount, unmount } from 'svelte';
2
- import ConfirmModal from '../internal/ConfirmModal.svelte';
2
+ import ConfirmModal from '../components/ConfirmModal/ConfirmModal.svelte';
3
3
  class ModalManager {
4
4
  show(Component, ...props) {
5
5
  return this.open(Component, ...props).onClose;
@@ -10,7 +10,8 @@ class ModalManager {
10
10
  const deferred = new Promise((resolve) => {
11
11
  onClose = async (...args) => {
12
12
  await unmount(modal);
13
- resolve(args?.[0]);
13
+ // make sure bits-ui clean up finishes before resolving
14
+ setTimeout(() => resolve(args?.[0]), 0);
14
15
  };
15
16
  modal = mount(Component, {
16
17
  target: document.body,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@immich/ui",
3
- "version": "0.23.1",
3
+ "version": "0.23.3",
4
4
  "license": "GNU Affero General Public License version 3",
5
5
  "scripts": {
6
6
  "create": "node scripts/create.js",
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@mdi/js": "^7.4.47",
71
- "bits-ui": "^1.5.3",
71
+ "bits-ui": "^2.0.0",
72
72
  "tailwind-merge": "^3.0.0",
73
73
  "tailwind-variants": "^1.0.0"
74
74
  },