@plaidev/karte-action-sdk 1.1.52 → 1.1.55
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/hydrate/index.es.d.ts +92 -1
- package/dist/hydrate/index.es.js +303 -222
- package/dist/index.es.d.ts +92 -1
- package/dist/index.es.js +291 -202
- package/package.json +2 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Writable } from "svelte/store";
|
|
2
|
+
import { SvelteComponentDev } from "svelte/internal";
|
|
2
3
|
declare const PropTypes: readonly [
|
|
3
4
|
"BooleanKeyword",
|
|
4
5
|
"NumberKeyword",
|
|
@@ -314,12 +315,56 @@ declare const handleKeydown: (handlers: {
|
|
|
314
315
|
[eventName: string]: (e: any) => void;
|
|
315
316
|
}) => (e: any) => void;
|
|
316
317
|
declare const getPositionStyle: (position: ModalPosition) => string;
|
|
318
|
+
declare const getTransform: (position: ModalPosition) => [
|
|
319
|
+
number,
|
|
320
|
+
number
|
|
321
|
+
];
|
|
317
322
|
declare const getMarginStyle: (margin: ModalMargin) => string;
|
|
318
323
|
declare function onScroll(fn: Function, rate: number): () => void;
|
|
319
324
|
declare function onTime(fn: Function, time: number): () => void;
|
|
320
325
|
declare function hasSuffix<Suffix extends "px" | "em" | "rem" | "%" | "fr" | "vw" | "vh" | "">(value: string, suffix: Suffix): value is `${number}${Suffix}`;
|
|
321
326
|
declare function toBr(text: string): string;
|
|
322
327
|
declare function randStr(digit?: number): string;
|
|
328
|
+
/**
|
|
329
|
+
* An option for svelte custom animation
|
|
330
|
+
*/
|
|
331
|
+
interface CustomAnimationOptions {
|
|
332
|
+
/**
|
|
333
|
+
* A Transform value in percent of target element
|
|
334
|
+
*/
|
|
335
|
+
transform: [
|
|
336
|
+
number,
|
|
337
|
+
number
|
|
338
|
+
];
|
|
339
|
+
/**
|
|
340
|
+
* A style of animation(e.g. fade, slide-in)
|
|
341
|
+
*/
|
|
342
|
+
animationStyle: AnimationStyle;
|
|
343
|
+
/**
|
|
344
|
+
* A waiting time in milliseconds before starting animation
|
|
345
|
+
*
|
|
346
|
+
* @default 0
|
|
347
|
+
*/
|
|
348
|
+
delay?: number;
|
|
349
|
+
/**
|
|
350
|
+
* A total duration time in milliseconds of the animation
|
|
351
|
+
*
|
|
352
|
+
* @default 1000
|
|
353
|
+
*/
|
|
354
|
+
duration?: number;
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* The function to activate svelte animation.
|
|
358
|
+
* @see {@link https://svelte.dev/docs#template-syntax-element-directives-transition-fn-custom-transition-functions| Custom transition functions} for detail documentation
|
|
359
|
+
* @param {Element} node A target node of animation. This argument is passed by svelte, by default.
|
|
360
|
+
* @param {CustomAnimationOptions} customAnimationOptions A custom animation option object
|
|
361
|
+
*/
|
|
362
|
+
declare function customAnimation(node: Element, { transform, animationStyle, delay, duration }: CustomAnimationOptions): {
|
|
363
|
+
delay: number;
|
|
364
|
+
duration: number;
|
|
365
|
+
easing: (t: any) => any;
|
|
366
|
+
css: (progress: number) => string;
|
|
367
|
+
};
|
|
323
368
|
declare function hideOnScroll<Props extends {
|
|
324
369
|
hide_on_scroll: boolean;
|
|
325
370
|
hide_on_scroll_rate: number;
|
|
@@ -338,6 +383,52 @@ declare function showOnTime<Props extends {
|
|
|
338
383
|
show_on_time: boolean;
|
|
339
384
|
show_on_time_count: number;
|
|
340
385
|
}>(props: Props, fn?: Function): () => void;
|
|
386
|
+
/**
|
|
387
|
+
* An options for {@link createApp}
|
|
388
|
+
*/
|
|
389
|
+
interface AppOptions<Props, Variables> {
|
|
390
|
+
/**
|
|
391
|
+
* {@link Send} function to receive events triggered in Karte action.
|
|
392
|
+
*
|
|
393
|
+
* @default () => {}
|
|
394
|
+
*/
|
|
395
|
+
send?: Function;
|
|
396
|
+
/**
|
|
397
|
+
* {@link Props} used in Karte action.
|
|
398
|
+
*
|
|
399
|
+
* @default {}
|
|
400
|
+
*/
|
|
401
|
+
props?: Props;
|
|
402
|
+
/**
|
|
403
|
+
* {@link Variables} in which user variables or action table used in Karte action.
|
|
404
|
+
*
|
|
405
|
+
* @default {}
|
|
406
|
+
*/
|
|
407
|
+
variables?: Variables;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* App application instance that is with {@link createApp}
|
|
411
|
+
*
|
|
412
|
+
* @description Currently, svelte component is supported only.
|
|
413
|
+
*/
|
|
414
|
+
interface App {
|
|
415
|
+
/**
|
|
416
|
+
* The method to destroy an app instance.
|
|
417
|
+
*/
|
|
418
|
+
close: () => void;
|
|
419
|
+
/**
|
|
420
|
+
* The method to show an app instance.
|
|
421
|
+
*/
|
|
422
|
+
show: () => void;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Create an application instance.
|
|
426
|
+
*
|
|
427
|
+
* @param App - An entry point of svelte component.
|
|
428
|
+
* @param options - An {@link AppOptions | options}
|
|
429
|
+
* @return An {@link App | app} instance
|
|
430
|
+
*/
|
|
431
|
+
declare const createApp: <Props, Variables>(App: typeof SvelteComponentDev, options?: AppOptions<Props, Variables>) => App;
|
|
341
432
|
declare function ensureModalRoot(useShadow?: boolean): ShadowRoot | HTMLElement;
|
|
342
433
|
declare const h: (type: string, props: any, ...children: Array<any>) => HTMLElement;
|
|
343
434
|
declare function createFog({ color, opacity, zIndex, onclick }: {
|
|
@@ -364,7 +455,7 @@ declare const collection: (config: {
|
|
|
364
455
|
} | null | undefined, cb: (err: Error | null, items?: any) => void): void;
|
|
365
456
|
set(key: string, value: string, cb: (err: Error | null) => void): void;
|
|
366
457
|
};
|
|
367
|
-
export { state, closed, maximumZindex, initialize, finalize, send_event, isPreview, setMiximumZindex, none, moveTo, linkTo, closeApp, execOnClickOperation, handleFocus, setPreviousFocus, handleKeydown, getPositionStyle, getMarginStyle, onScroll, onTime, hasSuffix, toBr, randStr, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, AnimationStyleTranslations, ModalPositions, ModalPosition, ModalPositionTranslations, ModalMarginTranslations, ModalMargin, ModalPlacement, DefaultModalPlacement, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, Repeats, Repeat, BackgroundSizes, BackgroundSize, Style, StateName, hideOnScroll, hideOnTime, showOnScroll, showOnTime, ensureModalRoot, h, createFog, EmbedLogic, embed, collection };
|
|
458
|
+
export { state, closed, maximumZindex, initialize, finalize, send_event, isPreview, setMiximumZindex, none, moveTo, linkTo, closeApp, execOnClickOperation, handleFocus, setPreviousFocus, handleKeydown, getPositionStyle, getTransform, getMarginStyle, onScroll, onTime, hasSuffix, toBr, randStr, customAnimation, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, AnimationStyleTranslations, ModalPositions, ModalPosition, ModalPositionTranslations, ModalMarginTranslations, ModalMargin, ModalPlacement, DefaultModalPlacement, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, Repeats, Repeat, BackgroundSizes, BackgroundSize, Style, StateName, hideOnScroll, hideOnTime, showOnScroll, showOnTime, AppOptions, App, createApp, ensureModalRoot, h, createFog, EmbedLogic, embed, collection };
|
|
368
459
|
export { default as State } from './components/State.svelte';
|
|
369
460
|
export { default as StateItem } from './components/StateItem.svelte';
|
|
370
461
|
export { default as Modal } from './components/Modal.svelte';
|