@thisway/next
Advanced tools
Comparing version 0.1.0 to 0.2.0-beta.0
export * from './lib/context'; | ||
export * from './lib/steps.controller'; | ||
export * from './lib/steps.store'; | ||
export * from './lib/theme'; | ||
export * from './lib/tour'; | ||
export * from './lib/types'; | ||
export * from './lib/thisway'; | ||
@@ -14,1 +12,2 @@ export * from './lib/step-options'; | ||
export { default as PopoverMode3 } from './lib/components/popover.mode-3.svelte'; | ||
export * from '@thisway/base'; |
/// <reference types="svelte" /> | ||
import type { Size } from '../../../utils/src/index.ts'; | ||
import type { HighlightOptionsWithDefaultValues, IComputePlacementState, IForeignViewContext, ITourDelegate, NoElement, PopoverOptionsWithDefaultValues, Step, ThemeOptions, TourOptions } from '@thisway/base'; | ||
import type { Size } from '@thisway/utils'; | ||
import type { Readable, Writable } from 'svelte/store'; | ||
import type { HighlightOptionsWithDefaultValues, PopoverOptionsWithDefaultValues } from './step-options'; | ||
import type { ThemeOptions } from './theme'; | ||
import type { Tour } from './tour'; | ||
import type { IComputePlacementState, IForeignViewContext, ITourDelegate, NoElement, Step, TourOptions } from './types'; | ||
export type ContextType<T> = symbol & { | ||
@@ -23,3 +21,3 @@ readonly phantomData: T; | ||
export declare const OptionsContext: ContextType<Readable<TourOptions>>; | ||
export declare const ElementBoundingContext: ContextType<Readable<Readable<DOMRect | typeof import("./types").NO_ELEMENT> | undefined>>; | ||
export declare const ElementBoundingContext: ContextType<Readable<Readable<typeof import("@thisway/base").NO_ELEMENT | DOMRect> | undefined>>; | ||
export declare const PopoverContainerContext: ContextType<Writable<HTMLElement | undefined>>; | ||
@@ -26,0 +24,0 @@ export declare const PopoverSizeContext: ContextType<Readable<Size>>; |
@@ -1,2 +0,2 @@ | ||
import type { Rect } from './types'; | ||
import type { Rect } from '@thisway/base'; | ||
export declare const calculateMaskCommand: (bounding: Rect | undefined, borderWidth: number, padding: number, showBorder: boolean) => string; |
@@ -1,4 +0,4 @@ | ||
import { type Size } from '../../../utils/src/index.ts'; | ||
import type { Alignment, IComputePlacementState, NoElement, Orientation, PopoverPlacement, PopoverPosition, PopoverPositionParsed } from '@thisway/base'; | ||
import { type Size } from '@thisway/utils'; | ||
import type { Readable } from 'svelte/store'; | ||
import type { Alignment, IComputePlacementState, NoElement, Orientation, PopoverPlacement, PopoverPosition, PopoverPositionParsed } from './types'; | ||
export declare const parsePlacement: (position: PopoverPosition | PopoverPositionParsed | string | undefined) => PopoverPositionParsed | undefined; | ||
@@ -5,0 +5,0 @@ export declare const getOrientation: (elementRect: DOMRect, popoverRect: Size, preferredOrientation: Orientation | undefined, offset: number, viewport: Size) => Orientation; |
@@ -1,2 +0,2 @@ | ||
import { type Size } from '../../../utils/src/index.ts'; | ||
import { type Size } from '@thisway/utils'; | ||
import { type Readable } from 'svelte/store'; | ||
@@ -3,0 +3,0 @@ import type { IStepOptionsContext, RenderState } from './context'; |
/// <reference types="svelte" /> | ||
import type { SetRequired } from 'type-fest'; | ||
import { type ThemeOptions } from './theme'; | ||
import type { CommonOptions, HighlightOptions, PopoverOptions } from './types'; | ||
export type PopoverOptionsWithDefaultValues = SetRequired<PopoverOptions, 'prevBtnText' | 'nextBtnText' | 'doneBtnText' | 'startBtnText' | 'offset' | 'showCloseBtn' | 'showCtrlBtns' | 'title' | 'description'>; | ||
export type HighlightOptionsWithDefaultValues = SetRequired<HighlightOptions, 'showMask' | 'showBorder' | 'showHeartbeat' | 'padding' | 'maskOpacity' | 'borderWidth'>; | ||
export declare const popoverDefaultValues: PopoverOptionsWithDefaultValues; | ||
import type { CommonOptions, PopoverOptions, ThemeOptions } from '@thisway/base'; | ||
export type MergeStepOptionSource = CommonOptions<PopoverOptions>; | ||
export declare const mergeStepOption: <K extends keyof MergeStepOptionSource, D extends NonNullable<MergeStepOptionSource[K]>, R extends D>(defaultValues: D, optionsValueRaw: MergeStepOptionSource[K], stepValueRaw: MergeStepOptionSource[K]) => R; | ||
export declare const getRenderIndex: () => import("svelte/store").Readable<number | undefined>; | ||
export declare const highlightDefaultValues: HighlightOptionsWithDefaultValues; | ||
export declare const getPopoverOptions: () => import("svelte/store").Readable<{ | ||
position?: import("./types").PopoverPositionParsed | import("./types").PopoverPosition | undefined; | ||
position?: import("@thisway/base").PopoverPositionParsed | import("@thisway/base").PopoverPosition | undefined; | ||
animateClass?: string | undefined; | ||
@@ -28,3 +22,3 @@ showProgress?: boolean | undefined; | ||
borderColor?: string | undefined; | ||
clickMask?: import("./types").ClickMaskAction | undefined; | ||
clickMask?: import("@thisway/base").ClickMaskAction | undefined; | ||
borderWidth: number; | ||
@@ -39,3 +33,3 @@ padding: number; | ||
export declare const getTheme: () => import("svelte/store").Readable<Required<ThemeOptions>>; | ||
export declare const getNextStep: () => import("svelte/store").Readable<import("./types").Step | undefined>; | ||
export declare const getRenderStep: () => import("svelte/store").Readable<import("./types").Step | undefined>; | ||
export declare const getNextStep: () => import("svelte/store").Readable<import("@thisway/base").Step | undefined>; | ||
export declare const getRenderStep: () => import("svelte/store").Readable<import("@thisway/base").Step | undefined>; |
@@ -1,2 +0,2 @@ | ||
import type { IStepsStore, ITourController, Step, StepIdType } from './types'; | ||
import type { IStepsStore, ITourController, Step, StepIdType } from '@thisway/base'; | ||
export interface GetActiveStepReturnValue<T extends Step = Step> { | ||
@@ -3,0 +3,0 @@ step: T | undefined; |
@@ -1,3 +0,3 @@ | ||
import type { Step, StepIdType, IStepsStore } from './types'; | ||
import type { IStepsStore, Step, StepIdType } from '@thisway/base'; | ||
export declare function findStepIndex([steps, id]: [Step[], StepIdType | null | undefined]): number | undefined; | ||
export declare const createStepsStore: <T extends Step = Step>(initialSteps: T[], defaultActive: StepIdType | null | undefined) => IStepsStore<T>; |
@@ -0,5 +1,5 @@ | ||
import type { IStepsStore, ITourDelegate, Step, ThisOptions, TourOptions } from '@thisway/base'; | ||
import type { ComponentType } from 'svelte'; | ||
import { type Readable } from 'svelte/store'; | ||
import { Tour } from './tour'; | ||
import type { IStepsStore, ITourDelegate, Step, ThisOptions, TourOptions } from './types'; | ||
export declare class ThisWayDefaultDelegate<T extends Step = Step, Options extends TourOptions = TourOptions> implements ITourDelegate<T> { | ||
@@ -6,0 +6,0 @@ protected readonly options$: Readable<Options>; |
@@ -0,1 +1,2 @@ | ||
import type { IStepsStore, ITourDelegate, NoElement, Step, TourOptions } from '@thisway/base'; | ||
import type { SvelteComponent } from 'svelte'; | ||
@@ -6,3 +7,2 @@ import type { Readable, Unsubscriber } from 'svelte/store'; | ||
import { StepsController } from './steps.controller'; | ||
import type { IStepsStore, ITourDelegate, NoElement, Step, TourOptions } from './types'; | ||
export declare function observeElementBounding(scroll$: Readable<Scroll>, renderState$: Readable<RenderState>, enabled$: Readable<boolean>): Readable<Readable<DOMRect | NoElement> | undefined>; | ||
@@ -9,0 +9,0 @@ export declare class Tour<T extends Step = Step> extends StepsController<T> { |
@@ -1,3 +0,3 @@ | ||
import type { Size } from '../../../utils/src/index.ts'; | ||
import type { PopoverPlacement } from './types'; | ||
import type { PopoverPlacement } from '@thisway/base'; | ||
import type { Size } from '@thisway/utils'; | ||
export declare const getViewportSize: (win: Window) => Size; | ||
@@ -4,0 +4,0 @@ export declare const styleFromPlacement: ({ x, y, ...others }: PopoverPlacement) => { |
{ | ||
"name": "@thisway/next", | ||
"version": "0.1.0", | ||
"version": "0.2.0-beta.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
122834
25
2935