@plaidev/karte-action-sdk 1.0.23 → 1.0.24

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.
@@ -21,22 +21,6 @@ declare const moveTo: (to: string) => () => void;
21
21
  declare const linkTo: (to: string, targetBlank?: boolean) => () => void;
22
22
  declare const closeApp: () => () => void;
23
23
  declare const _default: "dummy";
24
- /**
25
- * 内部的に使われている、UIから選択できない関数
26
- */
27
- declare const handleFocus: (node: HTMLElement | null) => (e: any) => void;
28
- declare const setPreviousFocus: () => void;
29
- declare const handleKeydown: (handlers: {
30
- [eventName: string]: (e: any) => void;
31
- }) => (e: any) => void;
32
- type ModalPosition = "top-left" | "top-center" | "top-right" | "center-left" | "center" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right" | "none";
33
- declare const getPositionStyle: (position: ModalPosition) => string;
34
- declare function onScroll(fn: Function, rate: number): () => void;
35
- declare function onTime(fn: Function, time: number): () => void;
36
- declare function hasSuffix<Suffix extends "px" | "em" | "rem" | "%" | "fr" | "vw" | "vh" | "">(value: string, suffix: Suffix): value is `${number}${Suffix}`;
37
- declare function toBr(text: string): string;
38
- declare function randStr(digit?: number): string;
39
- declare const _default: "dummy";
40
24
  declare const PropTypes: readonly [
41
25
  "BooleanKeyword",
42
26
  "NumberKeyword",
@@ -75,6 +59,87 @@ declare const AnimationStyles: readonly [
75
59
  "slide-right"
76
60
  ];
77
61
  type AnimationStyle = typeof AnimationStyles[number];
62
+ declare const AnimationStyleTranslations: {
63
+ none: {
64
+ ja: string;
65
+ en: string;
66
+ };
67
+ fade: {
68
+ ja: string;
69
+ en: string;
70
+ };
71
+ bounce: {
72
+ ja: string;
73
+ en: string;
74
+ };
75
+ "slide-down": {
76
+ ja: string;
77
+ en: string;
78
+ };
79
+ "slide-up": {
80
+ ja: string;
81
+ en: string;
82
+ };
83
+ "slide-left": {
84
+ ja: string;
85
+ en: string;
86
+ };
87
+ "slide-right": {
88
+ ja: string;
89
+ en: string;
90
+ };
91
+ };
92
+ declare const ModalPositions: readonly [
93
+ "top-left",
94
+ "top-center",
95
+ "top-right",
96
+ "center-left",
97
+ "center",
98
+ "center-right",
99
+ "bottom-left",
100
+ "bottom-center",
101
+ "bottom-right",
102
+ "none"
103
+ ];
104
+ type ModalPosition = typeof ModalPositions[number];
105
+ declare const ModalPositionTranslations: {
106
+ "top-left": {
107
+ ja: string;
108
+ en: string;
109
+ };
110
+ "top-center": {
111
+ ja: string;
112
+ en: string;
113
+ };
114
+ "top-right": {
115
+ ja: string;
116
+ en: string;
117
+ };
118
+ "center-left": {
119
+ ja: string;
120
+ en: string;
121
+ };
122
+ center: {
123
+ ja: string;
124
+ en: string;
125
+ };
126
+ "center-right": {
127
+ ja: string;
128
+ en: string;
129
+ };
130
+ "bottom-left": {
131
+ ja: string;
132
+ en: string;
133
+ };
134
+ "bottom-center": {
135
+ ja: string;
136
+ en: string;
137
+ };
138
+ "bottom-right": {
139
+ ja: string;
140
+ en: string;
141
+ };
142
+ };
78
143
  type LongText = string;
79
144
  type Url = string;
80
145
  type Image = string;
@@ -116,7 +181,19 @@ declare const Repeats: readonly [
116
181
  type Repeat = typeof Repeats[number];
117
182
  type Style = string;
118
183
  type StateName = string;
119
- export { state, closed, maximumZindex, initialize, finalize, send_event, isPreview, setMiximumZindex, none, moveTo, linkTo, closeApp, _default, handleFocus, setPreviousFocus, handleKeydown, ModalPosition, getPositionStyle, onScroll, onTime, hasSuffix, toBr, randStr, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, Repeats, Repeat, Style, StateName };
184
+ declare const handleFocus: (node: HTMLElement | null) => (e: any) => void;
185
+ declare const setPreviousFocus: () => void;
186
+ declare const handleKeydown: (handlers: {
187
+ [eventName: string]: (e: any) => void;
188
+ }) => (e: any) => void;
189
+ declare const getPositionStyle: (position: ModalPosition) => string;
190
+ declare function onScroll(fn: Function, rate: number): () => void;
191
+ declare function onTime(fn: Function, time: number): () => void;
192
+ declare function hasSuffix<Suffix extends "px" | "em" | "rem" | "%" | "fr" | "vw" | "vh" | "">(value: string, suffix: Suffix): value is `${number}${Suffix}`;
193
+ declare function toBr(text: string): string;
194
+ declare function randStr(digit?: number): string;
195
+ declare const _default: "dummy";
196
+ export { state, closed, maximumZindex, initialize, finalize, send_event, isPreview, setMiximumZindex, none, moveTo, linkTo, closeApp, _default, handleFocus, setPreviousFocus, handleKeydown, getPositionStyle, onScroll, onTime, hasSuffix, toBr, randStr, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, AnimationStyleTranslations, ModalPositions, ModalPosition, ModalPositionTranslations, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, Repeats, Repeat, Style, StateName };
120
197
  export { default as State } from './State.svelte';
121
198
  export { default as GridModalState } from './GridModalState.svelte';
122
199
  export { default as GridItem } from './GridItem.svelte';
package/dist/index.es.js CHANGED
@@ -192,6 +192,86 @@ const AnimationStyles = [
192
192
  'slide-left',
193
193
  'slide-right',
194
194
  ];
195
+ const AnimationStyleTranslations = {
196
+ none: {
197
+ ja: 'なし',
198
+ en: 'None',
199
+ },
200
+ fade: {
201
+ ja: 'フェードイン',
202
+ en: 'Fade in',
203
+ },
204
+ bounce: {
205
+ ja: 'バウンス',
206
+ en: 'Bounce',
207
+ },
208
+ 'slide-down': {
209
+ ja: '上からスライド',
210
+ en: 'Slide down',
211
+ },
212
+ 'slide-up': {
213
+ ja: '下からスライド',
214
+ en: 'Slide up',
215
+ },
216
+ 'slide-left': {
217
+ ja: '左からスライド',
218
+ en: 'Slide left',
219
+ },
220
+ 'slide-right': {
221
+ ja: '右からスライド',
222
+ en: 'Slide right',
223
+ },
224
+ };
225
+ const ModalPositions = [
226
+ 'top-left',
227
+ 'top-center',
228
+ 'top-right',
229
+ 'center-left',
230
+ 'center',
231
+ 'center-right',
232
+ 'bottom-left',
233
+ 'bottom-center',
234
+ 'bottom-right',
235
+ 'none',
236
+ ];
237
+ const ModalPositionTranslations = {
238
+ 'top-left': {
239
+ ja: '画面の左上',
240
+ en: 'Top Left',
241
+ },
242
+ 'top-center': {
243
+ ja: '画面の中央上',
244
+ en: 'Top Center',
245
+ },
246
+ 'top-right': {
247
+ ja: '画面の右上',
248
+ en: 'Top Right',
249
+ },
250
+ 'center-left': {
251
+ ja: '画面の中央左',
252
+ en: 'Center Left',
253
+ },
254
+ center: {
255
+ ja: '画面の中央',
256
+ en: 'Center',
257
+ },
258
+ 'center-right': {
259
+ ja: '画面の中央右',
260
+ en: 'Center Right',
261
+ },
262
+ 'bottom-left': {
263
+ ja: '画面の左下',
264
+ en: 'Bottom Left',
265
+ },
266
+ 'bottom-center': {
267
+ ja: '画面の中央下',
268
+ en: 'Bottom Center',
269
+ },
270
+ 'bottom-right': {
271
+ ja: '画面の右下',
272
+ en: 'Bottom Right',
273
+ },
274
+ };
195
275
  const LengthUnits = ['px', 'em', 'rem', 'vw', 'fr', '%'];
196
276
  const Justifies = ['flex-start', 'center', 'flex-end'];
197
277
  const Alignments = ['flex-start', 'center', 'flex-end'];
@@ -1060,10 +1140,10 @@ function create_default_slot_1(ctx) {
1060
1140
 
1061
1141
  modal = new Modal({
1062
1142
  props: {
1063
- closable: /*closable*/ ctx[3],
1064
- closeButtonColor: /*closeButtonColor*/ ctx[4],
1143
+ closable: /*closable*/ ctx[4],
1144
+ closeButtonColor: /*closeButtonColor*/ ctx[5],
1065
1145
  _closeStyle: /*_closeStyle*/ ctx[8],
1066
- position: /*position*/ ctx[5],
1146
+ position: /*position*/ ctx[3],
1067
1147
  fixed: /*fixed*/ ctx[6],
1068
1148
  _style: /*_modalStyle*/ ctx[7],
1069
1149
  $$slots: { default: [create_default_slot_2] },
@@ -1083,10 +1163,10 @@ function create_default_slot_1(ctx) {
1083
1163
  },
1084
1164
  p(ctx, dirty) {
1085
1165
  const modal_changes = {};
1086
- if (dirty & /*closable*/ 8) modal_changes.closable = /*closable*/ ctx[3];
1087
- if (dirty & /*closeButtonColor*/ 16) modal_changes.closeButtonColor = /*closeButtonColor*/ ctx[4];
1166
+ if (dirty & /*closable*/ 16) modal_changes.closable = /*closable*/ ctx[4];
1167
+ if (dirty & /*closeButtonColor*/ 32) modal_changes.closeButtonColor = /*closeButtonColor*/ ctx[5];
1088
1168
  if (dirty & /*_closeStyle*/ 256) modal_changes._closeStyle = /*_closeStyle*/ ctx[8];
1089
- if (dirty & /*position*/ 32) modal_changes.position = /*position*/ ctx[5];
1169
+ if (dirty & /*position*/ 8) modal_changes.position = /*position*/ ctx[3];
1090
1170
  if (dirty & /*fixed*/ 64) modal_changes.fixed = /*fixed*/ ctx[6];
1091
1171
  if (dirty & /*_modalStyle*/ 128) modal_changes._style = /*_modalStyle*/ ctx[7];
1092
1172
 
@@ -1228,11 +1308,11 @@ function instance$3($$self, $$props, $$invalidate) {
1228
1308
  let { path } = $$props;
1229
1309
  let { animation = 'none' } = $$props;
1230
1310
  let { backgroundOverray = false } = $$props;
1311
+ let { position = 'center' } = $$props;
1231
1312
  let { closable = true } = $$props;
1232
1313
  let { closeButtonColor = '#000000' } = $$props;
1233
1314
  let { eventName = '' } = $$props;
1234
1315
  let { eventValue = null } = $$props;
1235
- let { position = 'center' } = $$props;
1236
1316
  let { fixed = false } = $$props;
1237
1317
  let { _modalStyle = '' } = $$props;
1238
1318
  let { _closeStyle = '' } = $$props;
@@ -1260,11 +1340,11 @@ function instance$3($$self, $$props, $$invalidate) {
1260
1340
  if ('path' in $$props) $$invalidate(0, path = $$props.path);
1261
1341
  if ('animation' in $$props) $$invalidate(1, animation = $$props.animation);
1262
1342
  if ('backgroundOverray' in $$props) $$invalidate(2, backgroundOverray = $$props.backgroundOverray);
1263
- if ('closable' in $$props) $$invalidate(3, closable = $$props.closable);
1264
- if ('closeButtonColor' in $$props) $$invalidate(4, closeButtonColor = $$props.closeButtonColor);
1343
+ if ('position' in $$props) $$invalidate(3, position = $$props.position);
1344
+ if ('closable' in $$props) $$invalidate(4, closable = $$props.closable);
1345
+ if ('closeButtonColor' in $$props) $$invalidate(5, closeButtonColor = $$props.closeButtonColor);
1265
1346
  if ('eventName' in $$props) $$invalidate(16, eventName = $$props.eventName);
1266
1347
  if ('eventValue' in $$props) $$invalidate(17, eventValue = $$props.eventValue);
1267
- if ('position' in $$props) $$invalidate(5, position = $$props.position);
1268
1348
  if ('fixed' in $$props) $$invalidate(6, fixed = $$props.fixed);
1269
1349
  if ('_modalStyle' in $$props) $$invalidate(7, _modalStyle = $$props._modalStyle);
1270
1350
  if ('_closeStyle' in $$props) $$invalidate(8, _closeStyle = $$props._closeStyle);
@@ -1281,9 +1361,9 @@ function instance$3($$self, $$props, $$invalidate) {
1281
1361
  path,
1282
1362
  animation,
1283
1363
  backgroundOverray,
1364
+ position,
1284
1365
  closable,
1285
1366
  closeButtonColor,
1286
- position,
1287
1367
  fixed,
1288
1368
  _modalStyle,
1289
1369
  _closeStyle,
@@ -1309,11 +1389,11 @@ class GridModalState extends SvelteComponent {
1309
1389
  path: 0,
1310
1390
  animation: 1,
1311
1391
  backgroundOverray: 2,
1312
- closable: 3,
1313
- closeButtonColor: 4,
1392
+ position: 3,
1393
+ closable: 4,
1394
+ closeButtonColor: 5,
1314
1395
  eventName: 16,
1315
1396
  eventValue: 17,
1316
- position: 5,
1317
1397
  fixed: 6,
1318
1398
  _modalStyle: 7,
1319
1399
  _closeStyle: 8,
@@ -1675,4 +1755,4 @@ class FlexItem extends SvelteComponent {
1675
1755
  }
1676
1756
  }
1677
1757
 
1678
- export { Alignments, AnimationStyles, Directions, Flex, FlexItem, GridItem, GridModalState, Justifies, LengthUnits, MediaQueries, Modal, ObjectFits, PropTypes, Repeats, State, closeApp, closed, finalize, getPositionStyle, handleFocus, handleKeydown, hasSuffix, initialize, isPreview, linkTo, maximumZindex, moveTo, none, onScroll, onTime, randStr, send_event, setMiximumZindex, setPreviousFocus, state, toBr };
1758
+ export { Alignments, AnimationStyleTranslations, AnimationStyles, Directions, Flex, FlexItem, GridItem, GridModalState, Justifies, LengthUnits, MediaQueries, Modal, ModalPositionTranslations, ModalPositions, ObjectFits, PropTypes, Repeats, State, closeApp, closed, finalize, getPositionStyle, handleFocus, handleKeydown, hasSuffix, initialize, isPreview, linkTo, maximumZindex, moveTo, none, onScroll, onTime, randStr, send_event, setMiximumZindex, setPreviousFocus, state, toBr };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",