Skip to content

Commit

Permalink
feat: update to pion
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Update to @pionjs/pion.
  • Loading branch information
megheaiulian committed Jan 13, 2024
1 parent b51c774 commit 64955a1
Show file tree
Hide file tree
Showing 16 changed files with 1,917 additions and 2,333 deletions.
2 changes: 1 addition & 1 deletion cosmoz-image-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import './lib/haunted-pan-zoom';

import { _ } from '@neovici/cosmoz-i18next';
import { portal } from '@neovici/cosmoz-utils/directives/portal';
import { component, html } from 'haunted';
import { component, html } from '@pionjs/pion';
import { nothing } from 'lit-html';
import { when } from 'lit-html/directives/when.js';
import { style } from './cosmoz-image-viewer.style';
Expand Down
2 changes: 1 addition & 1 deletion lib/haunted-pan-zoom.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable multiline-ternary */
import { useImperativeApi } from '@neovici/cosmoz-utils/hooks/use-imperative-api';
import { component, useCallback, useEffect } from 'haunted';
import { component, useCallback, useEffect } from '@pionjs/pion';
import { html, nothing } from 'lit-html';
import { ref } from 'lit-html/directives/ref.js';
import { styleMap } from 'lit-html/directives/style-map.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/hooks/use-cosmoz-image-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '@neovici/cosmoz-utils/elements/cz-spinner';
import { useSlideList } from '@neovici/cosmoz-slider';
import { useImperativeApi } from '@neovici/cosmoz-utils/hooks/use-imperative-api';
import { useNotifyProperty } from '@neovici/cosmoz-utils/hooks/use-notify-property';
import { useCallback, useEffect, useMemo, useState } from 'haunted';
import { useCallback, useEffect, useMemo, useState } from '@pionjs/pion';
import { html, nothing } from 'lit-html';
import { download } from '../pdf';
import { popout, hasWindow } from '../popout';
Expand Down
2 changes: 1 addition & 1 deletion lib/hooks/use-dispatch-event.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
hook, Hook
} from 'haunted';
} from '@pionjs/pion';

/**
* Returns the host element's dispatchEvent function.
Expand Down
2 changes: 1 addition & 1 deletion lib/hooks/use-mouse-pan.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useHost } from '@neovici/cosmoz-utils/hooks/use-host';
import { useCallback, useEffect, useReducer } from 'haunted';
import { useCallback, useEffect, useReducer } from '@pionjs/pion';
import { DRAGGING, initState, panReducer } from '../reducers/mouse-pan.js';

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/hooks/use-pan-zoom.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
useMemo, useCallback, useReducer, useEffect, useRef
} from 'haunted';
} from '@pionjs/pion';
import { useSpring } from './use-spring';
import { usePan } from './use-pan';
import { useResize } from './use-resize';
Expand Down
2 changes: 1 addition & 1 deletion lib/hooks/use-pan.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
useState, useEffect, useMemo
} from 'haunted';
} from '@pionjs/pion';
import { getBounded } from '../utils';
import {
useMousePan, DRAGGING
Expand Down
2 changes: 1 addition & 1 deletion lib/hooks/use-pinch.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
useEffect, useCallback, useReducer
} from 'haunted';
} from '@pionjs/pion';
import {
pinchReducer, initState, PINCHING
} from '../reducers/pinch';
Expand Down
2 changes: 1 addition & 1 deletion lib/hooks/use-resize.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect } from 'haunted';
import { useEffect } from '@pionjs/pion';

/**
* Reacts to size changes of an element.
Expand Down
2 changes: 1 addition & 1 deletion lib/hooks/use-spring.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
useState, useEffect
} from 'haunted';
} from '@pionjs/pion';

/**
* Returns a value a bit closer to the target value after each animation frame.
Expand Down
2 changes: 1 addition & 1 deletion lib/hooks/use-touch-pan.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
useEffect, useCallback, useReducer
} from 'haunted';
} from '@pionjs/pion';
import { center } from '../utils';
import {
panReducer, initState, DRAGGING
Expand Down
Loading

0 comments on commit 64955a1

Please sign in to comment.