@agnos-ui/svelte-headless 0.1.0 → 0.2.0

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/Slot.svelte CHANGED
@@ -1,7 +1,8 @@
1
1
  <script lang="ts">
2
+ import {BROWSER} from 'esm-env';
2
3
  import type {SlotContent, SlotSvelteComponent} from './types';
3
- import {isSvelteComponent} from './utils/widget';
4
4
  import {useSvelteSlot} from './types';
5
+ import {isSvelteComponent} from './utils/widget';
5
6
  type Props = $$Generic<object>; // eslint-disable-line no-undef
6
7
  // cf https://github.com/ota-meshi/eslint-plugin-svelte/issues/348
7
8
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -11,6 +12,13 @@
11
12
  };
12
13
  export let slotContent: SlotContent<Props> = null;
13
14
  export let props: Props;
15
+
16
+ // Workaround for a svelte issue that prevents code generation for SSR/slot
17
+ // To be removed when https://github.com/sveltejs/svelte/issues/9137 is fixed
18
+ if (!BROWSER) {
19
+ // @ts-expect-error Setting the global variable `props`, which is not defined in the SSR Svelte-kit compilation
20
+ globalThis['props'] = props;
21
+ }
14
22
  </script>
15
23
 
16
24
  {#if slotContent === useSvelteSlot}
@@ -1,3 +1,3 @@
1
- export * from '@agnos-ui/core/components/pagination';
2
1
  import { createPagination as coreCreatePagination } from '@agnos-ui/core/components/pagination';
2
+ export * from '@agnos-ui/core/components/pagination';
3
3
  export const createPagination = coreCreatePagination;
@@ -1 +1,7 @@
1
+ import type { AdaptWidgetSlots, WidgetPropsSlots, WidgetFactory, WidgetProps, WidgetState } from '../../types';
1
2
  export * from '@agnos-ui/core/components/slider';
3
+ export type SliderWidget = AdaptWidgetSlots<import('@agnos-ui/core/components/slider').SliderWidget>;
4
+ export type SliderProps = WidgetProps<SliderWidget>;
5
+ export type SliderState = WidgetState<SliderWidget>;
6
+ export type SliderSlots = WidgetPropsSlots<SliderProps>;
7
+ export declare const createSlider: WidgetFactory<SliderWidget>;
@@ -1 +1,3 @@
1
1
  export * from '@agnos-ui/core/components/slider';
2
+ import { createSlider as coreCreateSlider } from '@agnos-ui/core/components/slider';
3
+ export const createSlider = coreCreateSlider;
@@ -0,0 +1 @@
1
+ export * from './toast';
@@ -0,0 +1 @@
1
+ export * from './toast';
@@ -0,0 +1,7 @@
1
+ import type { AdaptWidgetSlots, WidgetPropsSlots, WidgetFactory, WidgetProps, WidgetState } from '../../types';
2
+ export * from '@agnos-ui/core/components/toast';
3
+ export type ToastWidget = AdaptWidgetSlots<import('@agnos-ui/core/components/toast').ToastWidget>;
4
+ export type ToastProps = WidgetProps<ToastWidget>;
5
+ export type ToastState = WidgetState<ToastWidget>;
6
+ export type ToastSlots = WidgetPropsSlots<ToastProps>;
7
+ export declare const createToast: WidgetFactory<ToastWidget>;
@@ -0,0 +1,3 @@
1
+ export * from '@agnos-ui/core/components/toast';
2
+ import { createToast as coreCreateToast } from '@agnos-ui/core/components/toast';
3
+ export const createToast = coreCreateToast;
@@ -1,7 +1,9 @@
1
1
  export * from './services/siblingsInert';
2
+ export * from './services/resizeObserver';
2
3
  export * from './services/portal';
3
4
  export * from './services/navManager';
4
5
  export * from './services/intersection';
6
+ export * from './services/hash';
5
7
  export * from './services/focustrack';
6
8
  export * from './services/floatingUI';
7
9
  export * from './services/extendWidget';
@@ -1,7 +1,9 @@
1
1
  export * from './services/siblingsInert';
2
+ export * from './services/resizeObserver';
2
3
  export * from './services/portal';
3
4
  export * from './services/navManager';
4
5
  export * from './services/intersection';
6
+ export * from './services/hash';
5
7
  export * from './services/focustrack';
6
8
  export * from './services/floatingUI';
7
9
  export * from './services/extendWidget';
@@ -0,0 +1 @@
1
+ export * from '@agnos-ui/core/services/hash';
@@ -0,0 +1 @@
1
+ export * from '@agnos-ui/core/services/hash';
@@ -0,0 +1 @@
1
+ export * from '@agnos-ui/core/services/resizeObserver';
@@ -0,0 +1 @@
1
+ export * from '@agnos-ui/core/services/resizeObserver';
package/index.d.ts CHANGED
@@ -6,4 +6,5 @@ export * from './components/progressbar/progressbar';
6
6
  export * from './components/rating/rating';
7
7
  export * from './components/select/select';
8
8
  export * from './components/slider/slider';
9
+ export * from './components/toast/toast';
9
10
  export * from './generated';
package/index.js CHANGED
@@ -6,4 +6,5 @@ export * from './components/progressbar/progressbar';
6
6
  export * from './components/rating/rating';
7
7
  export * from './components/select/select';
8
8
  export * from './components/slider/slider';
9
+ export * from './components/toast/toast';
9
10
  export * from './generated';
package/package.json CHANGED
@@ -48,14 +48,15 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@agnos-ui/core": "0.1.0",
52
- "@amadeus-it-group/tansu": "1.0.0"
51
+ "@agnos-ui/core": "0.2.0",
52
+ "esm-env": "^1.0.0"
53
53
  },
54
54
  "peerDependencies": {
55
+ "@amadeus-it-group/tansu": "*",
55
56
  "svelte": "*"
56
57
  },
57
58
  "sideEffects": false,
58
- "version": "0.1.0",
59
+ "version": "0.2.0",
59
60
  "homepage": "https://amadeusitgroup.github.io/AgnosUI/latest/",
60
61
  "bugs": "https://github.com/AmadeusITGroup/AgnosUI/issues",
61
62
  "license": "MIT",