@plaidev/karte-action-sdk 1.0.42 → 1.0.43

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.
@@ -1,6 +1,3 @@
1
- /**
2
- * UIから選択できる関数
3
- */
4
1
  import { Writable } from "svelte/store";
5
2
  declare const PropTypes: readonly [
6
3
  "BooleanKeyword",
@@ -310,7 +307,6 @@ declare const moveTo: (to: string) => () => void;
310
307
  declare const linkTo: (to: string, targetBlank?: boolean) => () => void;
311
308
  declare const closeApp: () => () => void;
312
309
  declare const execOnClickOperation: (onClickOperation: OnClickOperation) => void;
313
- declare const _default: "dummy";
314
310
  declare const handleFocus: (node: HTMLElement | null) => (e: any) => void;
315
311
  declare const setPreviousFocus: () => void;
316
312
  declare const handleKeydown: (handlers: {
@@ -323,7 +319,6 @@ declare function onTime(fn: Function, time: number): () => void;
323
319
  declare function hasSuffix<Suffix extends "px" | "em" | "rem" | "%" | "fr" | "vw" | "vh" | "">(value: string, suffix: Suffix): value is `${number}${Suffix}`;
324
320
  declare function toBr(text: string): string;
325
321
  declare function randStr(digit?: number): string;
326
- declare const _default: "dummy";
327
322
  declare function hideOnScroll<Props extends {
328
323
  hide_on_scroll: boolean;
329
324
  hide_on_scroll_rate: number;
@@ -368,7 +363,7 @@ declare const collection: (config: {
368
363
  } | null | undefined, cb: (err: Error | null, items?: any) => void): void;
369
364
  set(key: string, value: string, cb: (err: Error | null) => void): void;
370
365
  };
371
- export { state, closed, maximumZindex, initialize, finalize, send_event, isPreview, setMiximumZindex, none, moveTo, linkTo, closeApp, execOnClickOperation, _default, 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 };
366
+ 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 };
372
367
  export { default as State } from './components/State.svelte';
373
368
  export { default as StateItem } from './components/StateItem.svelte';
374
369
  export { default as Modal } from './components/Modal.svelte';
package/dist/index.es.js CHANGED
@@ -104,6 +104,9 @@ function randStr(digit = 8) {
104
104
  return Math.random().toString(32).substring(digit);
105
105
  }
106
106
 
107
+ /**
108
+ * UIから選択できる関数
109
+ */
107
110
  const CONSTANTS = {
108
111
  ALL_ACTION_ID: 'KARTE_ALL_ACTION_ID',
109
112
  STATE_EVENT: 'KARTE-ACTION-CHANGE-STATE',
@@ -135,8 +138,7 @@ const send_event = (event_name, values) => {
135
138
  options?.send?.(event_name, values);
136
139
  };
137
140
  const isPreview = () => {
138
- const options = get(functionOptions);
139
- return !!options?.isPreview;
141
+ return typeof process !== 'undefined' && process.env.IS_PREVIEW === 'true';
140
142
  };
141
143
  const setMiximumZindex = (zindex) => {
142
144
  if (!zindex || zindex < get(maximumZindex))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",
@@ -70,7 +70,8 @@
70
70
  "prepare": "npm run setup:default && npm run setup:template && npm run setup:concat",
71
71
  "build": "rollup -c",
72
72
  "build:watch": "rollup -c -w",
73
- "check": "svelte-check --tsconfig ./tsconfig.json",
73
+ "check:svelte": "svelte-check --tsconfig ./tsconfig.json",
74
+ "check:type": "tsc --noEmit",
74
75
  "test": "vitest run test",
75
76
  "test:watch": "vitest test",
76
77
  "test:ui": "vitest test --ui",