@plaidev/karte-action-sdk 1.0.42 → 1.0.45

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",
@@ -171,6 +168,7 @@ type OperationArgumentTypes = {
171
168
  BooleanKeyword: boolean;
172
169
  NumberKeyword: number;
173
170
  State: string;
171
+ Url: string;
174
172
  };
175
173
  type ConvertOperationOptions<O extends BaseOperationOptions> = ConvertOperationOption<O[number]>;
176
174
  type ConvertOperationOption<Option extends BaseOperationOptions[number]> = Option extends any ? {
@@ -203,7 +201,7 @@ declare const OnClickOperationOptions: readonly [
203
201
  readonly ja: "URL\u3092\u5165\u529B";
204
202
  readonly en: "Enter URL";
205
203
  };
206
- readonly type: "StringKeyword";
204
+ readonly type: "Url";
207
205
  readonly default: "";
208
206
  },
209
207
  {
@@ -310,7 +308,6 @@ declare const moveTo: (to: string) => () => void;
310
308
  declare const linkTo: (to: string, targetBlank?: boolean) => () => void;
311
309
  declare const closeApp: () => () => void;
312
310
  declare const execOnClickOperation: (onClickOperation: OnClickOperation) => void;
313
- declare const _default: "dummy";
314
311
  declare const handleFocus: (node: HTMLElement | null) => (e: any) => void;
315
312
  declare const setPreviousFocus: () => void;
316
313
  declare const handleKeydown: (handlers: {
@@ -323,7 +320,6 @@ declare function onTime(fn: Function, time: number): () => void;
323
320
  declare function hasSuffix<Suffix extends "px" | "em" | "rem" | "%" | "fr" | "vw" | "vh" | "">(value: string, suffix: Suffix): value is `${number}${Suffix}`;
324
321
  declare function toBr(text: string): string;
325
322
  declare function randStr(digit?: number): string;
326
- declare const _default: "dummy";
327
323
  declare function hideOnScroll<Props extends {
328
324
  hide_on_scroll: boolean;
329
325
  hide_on_scroll_rate: number;
@@ -368,7 +364,7 @@ declare const collection: (config: {
368
364
  } | null | undefined, cb: (err: Error | null, items?: any) => void): void;
369
365
  set(key: string, value: string, cb: (err: Error | null) => void): void;
370
366
  };
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 };
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 };
372
368
  export { default as State } from './components/State.svelte';
373
369
  export { default as StateItem } from './components/StateItem.svelte';
374
370
  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))
@@ -323,7 +325,7 @@ const OnClickOperationOptions = [
323
325
  name: { ja: 'リンク遷移', en: 'Link To' },
324
326
  operation: 'linkTo',
325
327
  args: [
326
- { name: { ja: 'URLを入力', en: 'Enter URL' }, type: 'StringKeyword', default: '' },
328
+ { name: { ja: 'URLを入力', en: 'Enter URL' }, type: 'Url', default: '' },
327
329
  {
328
330
  name: { ja: '新しいタブで開く', en: 'Open in new tab' },
329
331
  type: 'BooleanKeyword',
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.45",
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",