@repere/react 0.2.2 → 0.3.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/dist/components/Popover/Popover.d.ts +3 -4
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/RepereProvider.d.ts.map +1 -1
- package/dist/context/RepereContext.d.ts +5 -5
- package/dist/context/RepereContext.d.ts.map +1 -1
- package/dist/hooks/useBeaconAnchor.d.ts +17 -0
- package/dist/hooks/useBeaconAnchor.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +516 -451
- package/dist/styles.css +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/renderRepereComponents.d.ts +6 -6
- package/dist/utils/renderRepereComponents.d.ts.map +1 -1
- package/dist/utils/resolveBeaconConfig.d.ts +4 -3
- package/dist/utils/resolveBeaconConfig.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/hooks/useBeaconPosition.d.ts +0 -16
- package/dist/hooks/useBeaconPosition.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnchorPoint, Beacon } from '@repere/core';
|
|
2
2
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
export interface PopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, "style"> {
|
|
4
4
|
children: ReactNode;
|
|
@@ -6,10 +6,9 @@ export interface PopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, "styl
|
|
|
6
6
|
popover?: "auto" | "manual" | "hint" | "";
|
|
7
7
|
disableAnimation?: boolean;
|
|
8
8
|
beacon?: Beacon;
|
|
9
|
-
|
|
9
|
+
anchorPoint?: AnchorPoint;
|
|
10
10
|
onDismiss?: () => void;
|
|
11
11
|
onClose?: () => void;
|
|
12
12
|
}
|
|
13
|
-
declare const Popover: import('react').ForwardRefExoticComponent<PopoverProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
-
export default Popover;
|
|
13
|
+
export declare const Popover: import('react').ForwardRefExoticComponent<PopoverProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
15
14
|
//# sourceMappingURL=Popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAGf,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IACrD,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,EAAE,CAAC;IAC1C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,OAAO,yGAmEnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;;WAIQ,CAAC;;;;;;;WAG8K,CAAC;;;;;CADhN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RepereProvider.d.ts","sourceRoot":"","sources":["../../src/components/RepereProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"RepereProvider.d.ts","sourceRoot":"","sources":["../../src/components/RepereProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAGjB,MAAM,cAAc,CAAC;AAStB,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAO/D,UAAU,mBAAmB;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,MAAM,EACN,KAAK,EACL,SAAS,EACT,KAAK,GACN,EAAE,mBAAmB,kDA6HrB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnchorPoint, CalculatedBeaconAnchorPoint, Offset, ResolvedAnimationConfig } from '@repere/core';
|
|
2
2
|
export interface RepereContextValue {
|
|
3
3
|
beaconId: string;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
anchorPoint: AnchorPoint;
|
|
5
|
+
popoverAnchorPoint?: AnchorPoint;
|
|
6
6
|
popoverOffset?: Offset;
|
|
7
|
-
|
|
7
|
+
calculatedAnchorPoint: CalculatedBeaconAnchorPoint | null;
|
|
8
8
|
isOpen: boolean;
|
|
9
9
|
isDismissing: boolean;
|
|
10
10
|
toggle: () => void;
|
|
@@ -15,7 +15,7 @@ export interface RepereContextValue {
|
|
|
15
15
|
triggerDismissAnimation: ResolvedAnimationConfig | null;
|
|
16
16
|
popoverOpenAnimation: ResolvedAnimationConfig | null;
|
|
17
17
|
popoverCloseAnimation: ResolvedAnimationConfig | null;
|
|
18
|
-
popoverId
|
|
18
|
+
popoverId: string;
|
|
19
19
|
}
|
|
20
20
|
export declare const RepereContext: import('react').Context<RepereContextValue | null>;
|
|
21
21
|
export declare function useRepereContext(): RepereContextValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RepereContext.d.ts","sourceRoot":"","sources":["../../src/context/RepereContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"RepereContext.d.ts","sourceRoot":"","sources":["../../src/context/RepereContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,2BAA2B,EAC3B,MAAM,EACN,uBAAuB,EACxB,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,kBAAkB,CAAC,EAAE,WAAW,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAC1D,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACjD,uBAAuB,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACxD,oBAAoB,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACrD,qBAAqB,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACtD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,aAAa,oDAAiD,CAAC;AAE5E,wBAAgB,gBAAgB,uBAM/B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AnchorPoint, CalculatedBeaconAnchorPoint, Offset, PositioningStrategy } from '@repere/core';
|
|
2
|
+
interface UseBeaconAnchorParams {
|
|
3
|
+
targetSelector: string;
|
|
4
|
+
anchorPoint: AnchorPoint;
|
|
5
|
+
offset?: Offset;
|
|
6
|
+
zIndex?: number;
|
|
7
|
+
delay?: number;
|
|
8
|
+
positioningStrategy?: PositioningStrategy;
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
debug?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function useBeaconAnchor({ targetSelector, anchorPoint, offset, zIndex, delay, positioningStrategy, enabled, debug, }: UseBeaconAnchorParams): {
|
|
13
|
+
calculatedAnchorPoint: CalculatedBeaconAnchorPoint | null;
|
|
14
|
+
targetElement: HTMLElement | null;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=useBeaconAnchor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBeaconAnchor.d.ts","sourceRoot":"","sources":["../../src/hooks/useBeaconAnchor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,2BAA2B,EAC3B,MAAM,EACN,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAItB,UAAU,qBAAqB;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,eAAe,CAAC,EAC9B,cAAc,EACd,WAAW,EACX,MAAM,EACN,MAAa,EACb,KAAK,EACL,mBAAmB,EACnB,OAAc,EACd,KAAa,GACd,EAAE,qBAAqB;;;EA2CvB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type * from '@repere/core';
|
|
2
|
-
export { Animation,
|
|
2
|
+
export { AnchorPoint, Animation, PositioningStrategy } from '@repere/core';
|
|
3
3
|
export { Beacons, type BeaconsProps } from './components/Beacons';
|
|
4
4
|
export { ReperePopover } from './components/Popover';
|
|
5
5
|
export { RepereTrigger } from './components/RepereTrigger';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,cAAc,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,cAAc,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
|