@plaidev/karte-action-sdk 1.0.24 → 1.0.27

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.
@@ -140,6 +140,36 @@ declare const ModalPositionTranslations: {
140
140
  en: string;
141
141
  };
142
142
  };
143
+ declare const ModalMarginTranslations: {
144
+ left: {
145
+ ja: string;
146
+ en: string;
147
+ };
148
+ right: {
149
+ ja: string;
150
+ en: string;
151
+ };
152
+ top: {
153
+ ja: string;
154
+ en: string;
155
+ };
156
+ bottom: {
157
+ ja: string;
158
+ en: string;
159
+ };
160
+ };
161
+ type ModalMargin = {
162
+ left: string;
163
+ right: string;
164
+ top: string;
165
+ bottom: string;
166
+ };
167
+ type ModalPlacement = {
168
+ position: ModalPosition;
169
+ margin: ModalMargin;
170
+ backgroundOverlay: boolean;
171
+ };
172
+ declare const DefaultModalPlacement: ModalPlacement;
143
173
  type LongText = string;
144
174
  type Url = string;
145
175
  type Image = string;
@@ -179,6 +209,12 @@ declare const Repeats: readonly [
179
209
  "no-repeat"
180
210
  ];
181
211
  type Repeat = typeof Repeats[number];
212
+ declare const BackgroundSizes: readonly [
213
+ "cover",
214
+ "contain",
215
+ "auto"
216
+ ];
217
+ type BackgroundSize = typeof BackgroundSizes[number];
182
218
  type Style = string;
183
219
  type StateName = string;
184
220
  declare const handleFocus: (node: HTMLElement | null) => (e: any) => void;
@@ -187,16 +223,20 @@ declare const handleKeydown: (handlers: {
187
223
  [eventName: string]: (e: any) => void;
188
224
  }) => (e: any) => void;
189
225
  declare const getPositionStyle: (position: ModalPosition) => string;
226
+ declare const getMarginStyle: (margin: ModalMargin) => string;
190
227
  declare function onScroll(fn: Function, rate: number): () => void;
191
228
  declare function onTime(fn: Function, time: number): () => void;
192
229
  declare function hasSuffix<Suffix extends "px" | "em" | "rem" | "%" | "fr" | "vw" | "vh" | "">(value: string, suffix: Suffix): value is `${number}${Suffix}`;
193
230
  declare function toBr(text: string): string;
194
231
  declare function randStr(digit?: number): string;
195
232
  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 };
233
+ export { state, closed, maximumZindex, initialize, finalize, send_event, isPreview, setMiximumZindex, none, moveTo, linkTo, closeApp, _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, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, Repeats, Repeat, BackgroundSizes, BackgroundSize, Style, StateName };
197
234
  export { default as State } from './State.svelte';
198
235
  export { default as GridModalState } from './GridModalState.svelte';
199
236
  export { default as GridItem } from './GridItem.svelte';
200
237
  export { default as Flex } from './components/Flex.svelte';
201
238
  export { default as FlexItem } from './components/FlexItem.svelte';
202
239
  export { default as Modal } from './components/Modal.svelte';
240
+ export { default as TextBlock } from './components/TextBlock.svelte';
241
+ export { default as TextButtonBlock } from './components/TextButtonBlock.svelte';
242
+ export { default as ImageBlock } from './components/ImageBlock.svelte';
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { writable, get } from 'svelte/store';
2
- import { SvelteComponent, init, safe_not_equal, append_styles, create_slot, create_component, space, mount_component, insert, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, destroy_component, detach, empty, group_outros, check_outros, component_subscribe, element, attr, listen, noop, null_to_empty, svg_element, append, binding_callbacks } from 'svelte/internal';
2
+ import { SvelteComponent, init, safe_not_equal, append_styles, create_slot, create_component, space, mount_component, insert, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, destroy_component, detach, empty, group_outros, check_outros, component_subscribe, noop, element, attr, listen, null_to_empty, append, svg_element, binding_callbacks, src_url_equal } from 'svelte/internal';
3
3
  import { createEventDispatcher, onDestroy, onMount, setContext, getContext } from 'svelte';
4
4
 
5
5
  /**
@@ -66,6 +66,9 @@ const getPositionStyle = (position) => {
66
66
  }, '')
67
67
  .trimStart();
68
68
  };
69
+ const getMarginStyle = (margin) => {
70
+ return `margin: ${margin.top} ${margin.right} ${margin.bottom} ${margin.left};`;
71
+ };
69
72
  function onScroll(fn, rate) {
70
73
  const target = document.querySelector('body');
71
74
  // TBD ページが長いときの対策
@@ -272,28 +275,57 @@ const ModalPositionTranslations = {
272
275
  en: 'Bottom Right',
273
276
  },
274
277
  };
278
+ const ModalMarginTranslations = {
279
+ left: {
280
+ ja: '左側からの距離',
281
+ en: 'Left',
282
+ },
283
+ right: {
284
+ ja: '右側からの距離',
285
+ en: 'Right',
286
+ },
287
+ top: {
288
+ ja: '上側からの距離',
289
+ en: 'Top',
290
+ },
291
+ bottom: {
292
+ ja: '下側からの距離',
293
+ en: 'Bottom',
294
+ },
295
+ };
296
+ const DefaultModalPlacement = {
297
+ position: 'center',
298
+ margin: {
299
+ left: '0px',
300
+ right: '0px',
301
+ top: '0px',
302
+ bottom: '0px',
303
+ },
304
+ backgroundOverlay: true,
305
+ };
275
306
  const LengthUnits = ['px', 'em', 'rem', 'vw', 'fr', '%'];
276
307
  const Justifies = ['flex-start', 'center', 'flex-end'];
277
308
  const Alignments = ['flex-start', 'center', 'flex-end'];
278
309
  const ObjectFits = ['fill', 'contain', 'cover'];
279
310
  const Repeats = ['repeat', 'space', 'round', 'no-repeat'];
311
+ const BackgroundSizes = ['cover', 'contain', 'auto'];
280
312
 
281
313
  /* src/components/Normalize.svelte generated by Svelte v3.44.1 */
282
314
 
283
- function add_css$6(target) {
315
+ function add_css$9(target) {
284
316
  append_styles(target, "svelte-zmz1k7", "@import 'https://cdn.skypack.dev/normalize.css';");
285
317
  }
286
318
 
287
319
  class Normalize extends SvelteComponent {
288
320
  constructor(options) {
289
321
  super();
290
- init(this, options, null, null, safe_not_equal, {}, add_css$6);
322
+ init(this, options, null, null, safe_not_equal, {}, add_css$9);
291
323
  }
292
324
  }
293
325
 
294
326
  /* src/State.svelte generated by Svelte v3.44.1 */
295
327
 
296
- function create_fragment$9(ctx) {
328
+ function create_fragment$c(ctx) {
297
329
  let normalize;
298
330
  let t;
299
331
  let current;
@@ -352,7 +384,7 @@ function create_fragment$9(ctx) {
352
384
  };
353
385
  }
354
386
 
355
- function instance$9($$self, $$props, $$invalidate) {
387
+ function instance$c($$self, $$props, $$invalidate) {
356
388
  let { $$slots: slots = {}, $$scope } = $$props;
357
389
 
358
390
  $$self.$$set = $$props => {
@@ -365,7 +397,7 @@ function instance$9($$self, $$props, $$invalidate) {
365
397
  class State extends SvelteComponent {
366
398
  constructor(options) {
367
399
  super();
368
- init(this, options, instance$9, create_fragment$9, safe_not_equal, {});
400
+ init(this, options, instance$c, create_fragment$c, safe_not_equal, {});
369
401
  }
370
402
  }
371
403
 
@@ -418,7 +450,7 @@ function create_if_block$2(ctx) {
418
450
  };
419
451
  }
420
452
 
421
- function create_fragment$8(ctx) {
453
+ function create_fragment$b(ctx) {
422
454
  let if_block_anchor;
423
455
  let current;
424
456
  let if_block = /*$state*/ ctx[1] === /*path*/ ctx[0] && create_if_block$2(ctx);
@@ -473,7 +505,7 @@ function create_fragment$8(ctx) {
473
505
  };
474
506
  }
475
507
 
476
- function instance$8($$self, $$props, $$invalidate) {
508
+ function instance$b($$self, $$props, $$invalidate) {
477
509
  let $state;
478
510
  component_subscribe($$self, state, $$value => $$invalidate(1, $state = $$value));
479
511
  let { $$slots: slots = {}, $$scope } = $$props;
@@ -490,13 +522,13 @@ function instance$8($$self, $$props, $$invalidate) {
490
522
  class StateItem extends SvelteComponent {
491
523
  constructor(options) {
492
524
  super();
493
- init(this, options, instance$8, create_fragment$8, safe_not_equal, { path: 0 });
525
+ init(this, options, instance$b, create_fragment$b, safe_not_equal, { path: 0 });
494
526
  }
495
527
  }
496
528
 
497
529
  /* src/components/BackgroundOverray.svelte generated by Svelte v3.44.1 */
498
530
 
499
- function add_css$5(target) {
531
+ function add_css$8(target) {
500
532
  append_styles(target, "svelte-1h4b6e3", ".background.svelte-1h4b6e3{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.3)}");
501
533
  }
502
534
 
@@ -528,7 +560,7 @@ function create_if_block$1(ctx) {
528
560
  };
529
561
  }
530
562
 
531
- function create_fragment$7(ctx) {
563
+ function create_fragment$a(ctx) {
532
564
  let if_block_anchor;
533
565
  let if_block = /*backgroundOverray*/ ctx[0] && create_if_block$1(ctx);
534
566
 
@@ -564,7 +596,7 @@ function create_fragment$7(ctx) {
564
596
  };
565
597
  }
566
598
 
567
- function instance$7($$self, $$props, $$invalidate) {
599
+ function instance$a($$self, $$props, $$invalidate) {
568
600
  let { backgroundOverray = false } = $$props;
569
601
  const dispatch = createEventDispatcher();
570
602
  const click_handler = () => dispatch('click');
@@ -579,17 +611,17 @@ function instance$7($$self, $$props, $$invalidate) {
579
611
  class BackgroundOverray extends SvelteComponent {
580
612
  constructor(options) {
581
613
  super();
582
- init(this, options, instance$7, create_fragment$7, safe_not_equal, { backgroundOverray: 0 }, add_css$5);
614
+ init(this, options, instance$a, create_fragment$a, safe_not_equal, { backgroundOverray: 0 }, add_css$8);
583
615
  }
584
616
  }
585
617
 
586
618
  /* src/components/Animation.svelte generated by Svelte v3.44.1 */
587
619
 
588
- function add_css$4(target) {
620
+ function add_css$7(target) {
589
621
  append_styles(target, "svelte-sa0cac", "@keyframes svelte-sa0cac-fade{0%{opacity:0}100%{opacity:1}}.fade.svelte-sa0cac{animation-name:svelte-sa0cac-fade;animation-duration:1s}@keyframes svelte-sa0cac-bounce{0%{opacity:0;transform:scale(0.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(0.9)}100%{transform:scale(1)}}.bounce.svelte-sa0cac{animation-name:svelte-sa0cac-bounce;animation-duration:1s}@keyframes svelte-sa0cac-slide-down{0%{transform:translate3d(0, -100%, 0);visibility:visible}100%{transform:translate3d(0, 0, 0)}}.slide-down.svelte-sa0cac{animation-name:svelte-sa0cac-slide-down;animation-duration:1s;animation-delay:0.1s}@keyframes svelte-sa0cac-slide-up{0%{transform:translate3d(0, 100%, 0);visibility:visible}100%{transform:translate3d(0, 0, 0)}}.slide-up.svelte-sa0cac{animation-name:svelte-sa0cac-slide-up;animation-duration:1s;animation-delay:0.1s}@keyframes svelte-sa0cac-slide-left{0%{transform:translate3d(100%, 0, 0);visibility:visible}100%{transform:translate3d(0, 0, 0)}}.slide-left.svelte-sa0cac{animation-name:svelte-sa0cac-slide-left;animation-duration:1s;animation-delay:0.1s}@keyframes svelte-sa0cac-slide-right{0%{transform:translate3d(-100%, 0, 0);visibility:visible}100%{transform:translate3d(0, 0, 0)}}.slide-right.svelte-sa0cac{animation-name:svelte-sa0cac-slide-right;animation-duration:1s;animation-delay:0.1s}");
590
622
  }
591
623
 
592
- function create_fragment$6(ctx) {
624
+ function create_fragment$9(ctx) {
593
625
  let div;
594
626
  let current;
595
627
  const default_slot_template = /*#slots*/ ctx[3].default;
@@ -642,7 +674,7 @@ function create_fragment$6(ctx) {
642
674
  };
643
675
  }
644
676
 
645
- function instance$6($$self, $$props, $$invalidate) {
677
+ function instance$9($$self, $$props, $$invalidate) {
646
678
  let { $$slots: slots = {}, $$scope } = $$props;
647
679
  let { animation = 'none' } = $$props;
648
680
  const overwriteAnimation = isPreview() ? 'none' : animation;
@@ -658,14 +690,14 @@ function instance$6($$self, $$props, $$invalidate) {
658
690
  class Animation extends SvelteComponent {
659
691
  constructor(options) {
660
692
  super();
661
- init(this, options, instance$6, create_fragment$6, safe_not_equal, { animation: 1 }, add_css$4);
693
+ init(this, options, instance$9, create_fragment$9, safe_not_equal, { animation: 1 }, add_css$7);
662
694
  }
663
695
  }
664
696
 
665
697
  /* src/components/Modal.svelte generated by Svelte v3.44.1 */
666
698
 
667
- function add_css$3(target) {
668
- append_styles(target, "svelte-1ra4zfg", ".modal.svelte-1ra4zfg{position:absolute;box-sizing:border-box;z-index:2147483647}.close.svelte-1ra4zfg{position:absolute;display:flex;justify-content:center;align-items:center;background-color:transparent;border:none;cursor:pointer;padding:0;transition:all 0.25s}.close.svelte-1ra4zfg:hover{transform:rotate(90deg)}");
699
+ function add_css$6(target) {
700
+ append_styles(target, "svelte-1bxl6mz", ".modal.svelte-1bxl6mz{position:fixed;box-sizing:border-box;z-index:2147483647}.close.svelte-1bxl6mz{position:absolute;display:flex;justify-content:center;align-items:center;background-color:transparent;border:none;cursor:pointer;padding:0;transition:all 0.25s}.close.svelte-1bxl6mz:hover{transform:rotate(90deg)}");
669
701
  }
670
702
 
671
703
  // (78:2) {#if closable}
@@ -690,8 +722,8 @@ function create_if_block(ctx) {
690
722
  attr(svg, "viewBox", "0 0 9 10");
691
723
  attr(svg, "fill", "none");
692
724
  attr(svg, "xmlns", "http://www.w3.org/2000/svg");
693
- attr(button, "class", "close svelte-1ra4zfg");
694
- attr(button, "style", button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[6] + 1) + "; " + /*_closeStyle*/ ctx[3] + "");
725
+ attr(button, "class", "close svelte-1bxl6mz");
726
+ attr(button, "style", button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[7] + 1) + "; " + /*_closeStyle*/ ctx[3] + "");
695
727
  },
696
728
  m(target, anchor) {
697
729
  insert(target, button, anchor);
@@ -708,7 +740,7 @@ function create_if_block(ctx) {
708
740
  attr(path, "fill", /*closeButtonColor*/ ctx[1]);
709
741
  }
710
742
 
711
- if (dirty & /*$maximumZindex, _closeStyle*/ 72 && button_style_value !== (button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[6] + 1) + "; " + /*_closeStyle*/ ctx[3] + "")) {
743
+ if (dirty & /*$maximumZindex, _closeStyle*/ 136 && button_style_value !== (button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[7] + 1) + "; " + /*_closeStyle*/ ctx[3] + "")) {
712
744
  attr(button, "style", button_style_value);
713
745
  }
714
746
  },
@@ -720,7 +752,7 @@ function create_if_block(ctx) {
720
752
  };
721
753
  }
722
754
 
723
- function create_fragment$5(ctx) {
755
+ function create_fragment$8(ctx) {
724
756
  let div;
725
757
  let t;
726
758
  let div_style_value;
@@ -737,10 +769,10 @@ function create_fragment$5(ctx) {
737
769
  if (if_block) if_block.c();
738
770
  t = space();
739
771
  if (default_slot) default_slot.c();
740
- attr(div, "class", "modal svelte-1ra4zfg");
772
+ attr(div, "class", "modal svelte-1bxl6mz");
741
773
  attr(div, "role", "dialog");
742
774
  attr(div, "aria-modal", "true");
743
- attr(div, "style", div_style_value = "position:" + (/*overwriteFixed*/ ctx[7] ? 'fixed' : 'absolute') + "; " + /*pos*/ ctx[5] + " " + /*_style*/ ctx[2] + "");
775
+ attr(div, "style", div_style_value = "" + /*pos*/ ctx[6] + " " + /*marginStyle*/ ctx[5] + " " + /*_style*/ ctx[2] + "");
744
776
  },
745
777
  m(target, anchor) {
746
778
  insert(target, div, anchor);
@@ -788,7 +820,7 @@ function create_fragment$5(ctx) {
788
820
  }
789
821
  }
790
822
 
791
- if (!current || dirty & /*pos, _style*/ 36 && div_style_value !== (div_style_value = "position:" + (/*overwriteFixed*/ ctx[7] ? 'fixed' : 'absolute') + "; " + /*pos*/ ctx[5] + " " + /*_style*/ ctx[2] + "")) {
823
+ if (!current || dirty & /*pos, marginStyle, _style*/ 100 && div_style_value !== (div_style_value = "" + /*pos*/ ctx[6] + " " + /*marginStyle*/ ctx[5] + " " + /*_style*/ ctx[2] + "")) {
792
824
  attr(div, "style", div_style_value);
793
825
  }
794
826
  },
@@ -812,10 +844,11 @@ function create_fragment$5(ctx) {
812
844
  };
813
845
  }
814
846
 
815
- function instance$5($$self, $$props, $$invalidate) {
847
+ function instance$8($$self, $$props, $$invalidate) {
816
848
  let pos;
849
+ let marginStyle;
817
850
  let $maximumZindex;
818
- component_subscribe($$self, maximumZindex, $$value => $$invalidate(6, $maximumZindex = $$value));
851
+ component_subscribe($$self, maximumZindex, $$value => $$invalidate(7, $maximumZindex = $$value));
819
852
  let { $$slots: slots = {}, $$scope } = $$props;
820
853
  let { closable = true } = $$props;
821
854
  let { closeButtonColor = '#000000' } = $$props;
@@ -823,8 +856,14 @@ function instance$5($$self, $$props, $$invalidate) {
823
856
  let { eventValue = null } = $$props;
824
857
  let { position = 'center' } = $$props;
825
858
  const overwritePosition = isPreview() ? 'center' : position;
826
- let { fixed = false } = $$props;
827
- const overwriteFixed = isPreview() ? false : fixed;
859
+
860
+ let { margin = {
861
+ left: '0px',
862
+ right: '0px',
863
+ top: '0px',
864
+ bottom: '0px'
865
+ } } = $$props;
866
+
828
867
  let { _style = '' } = $$props;
829
868
  let { _closeStyle = '' } = $$props;
830
869
 
@@ -858,13 +897,19 @@ function instance$5($$self, $$props, $$invalidate) {
858
897
  if ('eventName' in $$props) $$invalidate(10, eventName = $$props.eventName);
859
898
  if ('eventValue' in $$props) $$invalidate(11, eventValue = $$props.eventValue);
860
899
  if ('position' in $$props) $$invalidate(12, position = $$props.position);
861
- if ('fixed' in $$props) $$invalidate(13, fixed = $$props.fixed);
900
+ if ('margin' in $$props) $$invalidate(13, margin = $$props.margin);
862
901
  if ('_style' in $$props) $$invalidate(2, _style = $$props._style);
863
902
  if ('_closeStyle' in $$props) $$invalidate(3, _closeStyle = $$props._closeStyle);
864
903
  if ('$$scope' in $$props) $$invalidate(14, $$scope = $$props.$$scope);
865
904
  };
866
905
 
867
- $$invalidate(5, pos = getPositionStyle(overwritePosition));
906
+ $$self.$$.update = () => {
907
+ if ($$self.$$.dirty & /*margin*/ 8192) {
908
+ $$invalidate(5, marginStyle = getMarginStyle(margin));
909
+ }
910
+ };
911
+
912
+ $$invalidate(6, pos = getPositionStyle(overwritePosition));
868
913
 
869
914
  return [
870
915
  closable,
@@ -872,15 +917,15 @@ function instance$5($$self, $$props, $$invalidate) {
872
917
  _style,
873
918
  _closeStyle,
874
919
  modal,
920
+ marginStyle,
875
921
  pos,
876
922
  $maximumZindex,
877
- overwriteFixed,
878
923
  close,
879
924
  handle_keydown,
880
925
  eventName,
881
926
  eventValue,
882
927
  position,
883
- fixed,
928
+ margin,
884
929
  $$scope,
885
930
  slots,
886
931
  div_binding
@@ -894,8 +939,8 @@ class Modal extends SvelteComponent {
894
939
  init(
895
940
  this,
896
941
  options,
897
- instance$5,
898
- create_fragment$5,
942
+ instance$8,
943
+ create_fragment$8,
899
944
  safe_not_equal,
900
945
  {
901
946
  closable: 0,
@@ -903,18 +948,18 @@ class Modal extends SvelteComponent {
903
948
  eventName: 10,
904
949
  eventValue: 11,
905
950
  position: 12,
906
- fixed: 13,
951
+ margin: 13,
907
952
  _style: 2,
908
953
  _closeStyle: 3
909
954
  },
910
- add_css$3
955
+ add_css$6
911
956
  );
912
957
  }
913
958
  }
914
959
 
915
960
  /* src/components/Grid.svelte generated by Svelte v3.44.1 */
916
961
 
917
- function create_fragment$4(ctx) {
962
+ function create_fragment$7(ctx) {
918
963
  let div;
919
964
  let current;
920
965
  const default_slot_template = /*#slots*/ ctx[8].default;
@@ -972,7 +1017,7 @@ function create_fragment$4(ctx) {
972
1017
  };
973
1018
  }
974
1019
 
975
- function instance$4($$self, $$props, $$invalidate) {
1020
+ function instance$7($$self, $$props, $$invalidate) {
976
1021
  let _style;
977
1022
  let { $$slots: slots = {}, $$scope } = $$props;
978
1023
  let { width = '512px' } = $$props;
@@ -1017,7 +1062,7 @@ class Grid extends SvelteComponent {
1017
1062
  constructor(options) {
1018
1063
  super();
1019
1064
 
1020
- init(this, options, instance$4, create_fragment$4, safe_not_equal, {
1065
+ init(this, options, instance$7, create_fragment$7, safe_not_equal, {
1021
1066
  width: 1,
1022
1067
  height: 2,
1023
1068
  rows: 3,
@@ -1032,8 +1077,8 @@ class Grid extends SvelteComponent {
1032
1077
 
1033
1078
  function create_default_slot_3(ctx) {
1034
1079
  let current;
1035
- const default_slot_template = /*#slots*/ ctx[18].default;
1036
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[19], null);
1080
+ const default_slot_template = /*#slots*/ ctx[21].default;
1081
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[22], null);
1037
1082
 
1038
1083
  return {
1039
1084
  c() {
@@ -1048,15 +1093,15 @@ function create_default_slot_3(ctx) {
1048
1093
  },
1049
1094
  p(ctx, dirty) {
1050
1095
  if (default_slot) {
1051
- if (default_slot.p && (!current || dirty & /*$$scope*/ 524288)) {
1096
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 4194304)) {
1052
1097
  update_slot_base(
1053
1098
  default_slot,
1054
1099
  default_slot_template,
1055
1100
  ctx,
1056
- /*$$scope*/ ctx[19],
1101
+ /*$$scope*/ ctx[22],
1057
1102
  !current
1058
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[19])
1059
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[19], dirty, null),
1103
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[22])
1104
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[22], dirty, null),
1060
1105
  null
1061
1106
  );
1062
1107
  }
@@ -1077,19 +1122,19 @@ function create_default_slot_3(ctx) {
1077
1122
  };
1078
1123
  }
1079
1124
 
1080
- // (99:4) <Modal {closable} {closeButtonColor} {_closeStyle} {position} {fixed} _style={_modalStyle} on:close={close} >
1125
+ // (104:4) <Modal {closable} {closeButtonColor} {_closeStyle} position={_position} {margin} _style={_modalStyle} on:close={close} >
1081
1126
  function create_default_slot_2(ctx) {
1082
1127
  let grid;
1083
1128
  let current;
1084
1129
 
1085
1130
  grid = new Grid({
1086
1131
  props: {
1087
- width: /*width*/ ctx[9],
1088
- height: /*height*/ ctx[10],
1089
- rows: /*rows*/ ctx[11],
1090
- columns: /*columns*/ ctx[12],
1091
- gap: /*gap*/ ctx[13],
1092
- background: /*background*/ ctx[14],
1132
+ width: /*width*/ ctx[6],
1133
+ height: /*height*/ ctx[7],
1134
+ rows: /*rows*/ ctx[8],
1135
+ columns: /*columns*/ ctx[9],
1136
+ gap: /*gap*/ ctx[10],
1137
+ background: /*background*/ ctx[11],
1093
1138
  $$slots: { default: [create_default_slot_3] },
1094
1139
  $$scope: { ctx }
1095
1140
  }
@@ -1105,14 +1150,14 @@ function create_default_slot_2(ctx) {
1105
1150
  },
1106
1151
  p(ctx, dirty) {
1107
1152
  const grid_changes = {};
1108
- if (dirty & /*width*/ 512) grid_changes.width = /*width*/ ctx[9];
1109
- if (dirty & /*height*/ 1024) grid_changes.height = /*height*/ ctx[10];
1110
- if (dirty & /*rows*/ 2048) grid_changes.rows = /*rows*/ ctx[11];
1111
- if (dirty & /*columns*/ 4096) grid_changes.columns = /*columns*/ ctx[12];
1112
- if (dirty & /*gap*/ 8192) grid_changes.gap = /*gap*/ ctx[13];
1113
- if (dirty & /*background*/ 16384) grid_changes.background = /*background*/ ctx[14];
1114
-
1115
- if (dirty & /*$$scope*/ 524288) {
1153
+ if (dirty & /*width*/ 64) grid_changes.width = /*width*/ ctx[6];
1154
+ if (dirty & /*height*/ 128) grid_changes.height = /*height*/ ctx[7];
1155
+ if (dirty & /*rows*/ 256) grid_changes.rows = /*rows*/ ctx[8];
1156
+ if (dirty & /*columns*/ 512) grid_changes.columns = /*columns*/ ctx[9];
1157
+ if (dirty & /*gap*/ 1024) grid_changes.gap = /*gap*/ ctx[10];
1158
+ if (dirty & /*background*/ 2048) grid_changes.background = /*background*/ ctx[11];
1159
+
1160
+ if (dirty & /*$$scope*/ 4194304) {
1116
1161
  grid_changes.$$scope = { dirty, ctx };
1117
1162
  }
1118
1163
 
@@ -1133,25 +1178,25 @@ function create_default_slot_2(ctx) {
1133
1178
  };
1134
1179
  }
1135
1180
 
1136
- // (98:2) <Animation {animation}>
1181
+ // (103:2) <Animation {animation}>
1137
1182
  function create_default_slot_1(ctx) {
1138
1183
  let modal;
1139
1184
  let current;
1140
1185
 
1141
1186
  modal = new Modal({
1142
1187
  props: {
1143
- closable: /*closable*/ ctx[4],
1144
- closeButtonColor: /*closeButtonColor*/ ctx[5],
1145
- _closeStyle: /*_closeStyle*/ ctx[8],
1146
- position: /*position*/ ctx[3],
1147
- fixed: /*fixed*/ ctx[6],
1148
- _style: /*_modalStyle*/ ctx[7],
1188
+ closable: /*closable*/ ctx[3],
1189
+ closeButtonColor: /*closeButtonColor*/ ctx[4],
1190
+ _closeStyle: /*_closeStyle*/ ctx[5],
1191
+ position: /*_position*/ ctx[13],
1192
+ margin: /*margin*/ ctx[14],
1193
+ _style: /*_modalStyle*/ ctx[2],
1149
1194
  $$slots: { default: [create_default_slot_2] },
1150
1195
  $$scope: { ctx }
1151
1196
  }
1152
1197
  });
1153
1198
 
1154
- modal.$on("close", /*close*/ ctx[15]);
1199
+ modal.$on("close", /*close*/ ctx[12]);
1155
1200
 
1156
1201
  return {
1157
1202
  c() {
@@ -1163,14 +1208,12 @@ function create_default_slot_1(ctx) {
1163
1208
  },
1164
1209
  p(ctx, dirty) {
1165
1210
  const modal_changes = {};
1166
- if (dirty & /*closable*/ 16) modal_changes.closable = /*closable*/ ctx[4];
1167
- if (dirty & /*closeButtonColor*/ 32) modal_changes.closeButtonColor = /*closeButtonColor*/ ctx[5];
1168
- if (dirty & /*_closeStyle*/ 256) modal_changes._closeStyle = /*_closeStyle*/ ctx[8];
1169
- if (dirty & /*position*/ 8) modal_changes.position = /*position*/ ctx[3];
1170
- if (dirty & /*fixed*/ 64) modal_changes.fixed = /*fixed*/ ctx[6];
1171
- if (dirty & /*_modalStyle*/ 128) modal_changes._style = /*_modalStyle*/ ctx[7];
1172
-
1173
- if (dirty & /*$$scope, width, height, rows, columns, gap, background*/ 556544) {
1211
+ if (dirty & /*closable*/ 8) modal_changes.closable = /*closable*/ ctx[3];
1212
+ if (dirty & /*closeButtonColor*/ 16) modal_changes.closeButtonColor = /*closeButtonColor*/ ctx[4];
1213
+ if (dirty & /*_closeStyle*/ 32) modal_changes._closeStyle = /*_closeStyle*/ ctx[5];
1214
+ if (dirty & /*_modalStyle*/ 4) modal_changes._style = /*_modalStyle*/ ctx[2];
1215
+
1216
+ if (dirty & /*$$scope, width, height, rows, columns, gap, background*/ 4198336) {
1174
1217
  modal_changes.$$scope = { dirty, ctx };
1175
1218
  }
1176
1219
 
@@ -1191,7 +1234,7 @@ function create_default_slot_1(ctx) {
1191
1234
  };
1192
1235
  }
1193
1236
 
1194
- // (96:0) <StateItem {path}>
1237
+ // (101:0) <StateItem {path}>
1195
1238
  function create_default_slot(ctx) {
1196
1239
  let backgroundoverray;
1197
1240
  let t;
@@ -1200,11 +1243,11 @@ function create_default_slot(ctx) {
1200
1243
 
1201
1244
  backgroundoverray = new BackgroundOverray({
1202
1245
  props: {
1203
- backgroundOverray: /*backgroundOverray*/ ctx[2]
1246
+ backgroundOverray: /*_backgroundOverray*/ ctx[15]
1204
1247
  }
1205
1248
  });
1206
1249
 
1207
- backgroundoverray.$on("click", /*close*/ ctx[15]);
1250
+ backgroundoverray.$on("click", /*close*/ ctx[12]);
1208
1251
 
1209
1252
  animation_1 = new Animation({
1210
1253
  props: {
@@ -1227,13 +1270,10 @@ function create_default_slot(ctx) {
1227
1270
  current = true;
1228
1271
  },
1229
1272
  p(ctx, dirty) {
1230
- const backgroundoverray_changes = {};
1231
- if (dirty & /*backgroundOverray*/ 4) backgroundoverray_changes.backgroundOverray = /*backgroundOverray*/ ctx[2];
1232
- backgroundoverray.$set(backgroundoverray_changes);
1233
1273
  const animation_1_changes = {};
1234
1274
  if (dirty & /*animation*/ 2) animation_1_changes.animation = /*animation*/ ctx[1];
1235
1275
 
1236
- if (dirty & /*$$scope, closable, closeButtonColor, _closeStyle, position, fixed, _modalStyle, width, height, rows, columns, gap, background*/ 557048) {
1276
+ if (dirty & /*$$scope, closable, closeButtonColor, _closeStyle, _modalStyle, width, height, rows, columns, gap, background*/ 4198396) {
1237
1277
  animation_1_changes.$$scope = { dirty, ctx };
1238
1278
  }
1239
1279
 
@@ -1258,7 +1298,7 @@ function create_default_slot(ctx) {
1258
1298
  };
1259
1299
  }
1260
1300
 
1261
- function create_fragment$3(ctx) {
1301
+ function create_fragment$6(ctx) {
1262
1302
  let stateitem;
1263
1303
  let current;
1264
1304
 
@@ -1282,7 +1322,7 @@ function create_fragment$3(ctx) {
1282
1322
  const stateitem_changes = {};
1283
1323
  if (dirty & /*path*/ 1) stateitem_changes.path = /*path*/ ctx[0];
1284
1324
 
1285
- if (dirty & /*$$scope, animation, closable, closeButtonColor, _closeStyle, position, fixed, _modalStyle, width, height, rows, columns, gap, background, backgroundOverray*/ 557054) {
1325
+ if (dirty & /*$$scope, animation, closable, closeButtonColor, _closeStyle, _modalStyle, width, height, rows, columns, gap, background*/ 4198398) {
1286
1326
  stateitem_changes.$$scope = { dirty, ctx };
1287
1327
  }
1288
1328
 
@@ -1303,18 +1343,18 @@ function create_fragment$3(ctx) {
1303
1343
  };
1304
1344
  }
1305
1345
 
1306
- function instance$3($$self, $$props, $$invalidate) {
1346
+ function instance$6($$self, $$props, $$invalidate) {
1307
1347
  let { $$slots: slots = {}, $$scope } = $$props;
1308
1348
  let { path } = $$props;
1309
- let { animation = 'none' } = $$props;
1310
- let { backgroundOverray = false } = $$props;
1349
+ let { placement = DefaultModalPlacement } = $$props;
1311
1350
  let { position = 'center' } = $$props;
1351
+ let { animation = 'none' } = $$props;
1352
+ let { _modalStyle = '' } = $$props;
1312
1353
  let { closable = true } = $$props;
1354
+ let { backgroundOverray = false } = $$props;
1313
1355
  let { closeButtonColor = '#000000' } = $$props;
1314
1356
  let { eventName = '' } = $$props;
1315
1357
  let { eventValue = null } = $$props;
1316
- let { fixed = false } = $$props;
1317
- let { _modalStyle = '' } = $$props;
1318
1358
  let { _closeStyle = '' } = $$props;
1319
1359
  let { width = '512px' } = $$props;
1320
1360
  let { height = '256px' } = $$props;
@@ -1336,36 +1376,37 @@ function instance$3($$self, $$props, $$invalidate) {
1336
1376
  dispatch('close');
1337
1377
  };
1338
1378
 
1379
+ const _position = placement.position ?? position;
1380
+ const margin = placement.margin;
1381
+ const _backgroundOverray = placement.backgroundOverlay ?? backgroundOverray;
1382
+
1339
1383
  $$self.$$set = $$props => {
1340
1384
  if ('path' in $$props) $$invalidate(0, path = $$props.path);
1385
+ if ('placement' in $$props) $$invalidate(16, placement = $$props.placement);
1386
+ if ('position' in $$props) $$invalidate(17, position = $$props.position);
1341
1387
  if ('animation' in $$props) $$invalidate(1, animation = $$props.animation);
1342
- if ('backgroundOverray' in $$props) $$invalidate(2, backgroundOverray = $$props.backgroundOverray);
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);
1346
- if ('eventName' in $$props) $$invalidate(16, eventName = $$props.eventName);
1347
- if ('eventValue' in $$props) $$invalidate(17, eventValue = $$props.eventValue);
1348
- if ('fixed' in $$props) $$invalidate(6, fixed = $$props.fixed);
1349
- if ('_modalStyle' in $$props) $$invalidate(7, _modalStyle = $$props._modalStyle);
1350
- if ('_closeStyle' in $$props) $$invalidate(8, _closeStyle = $$props._closeStyle);
1351
- if ('width' in $$props) $$invalidate(9, width = $$props.width);
1352
- if ('height' in $$props) $$invalidate(10, height = $$props.height);
1353
- if ('rows' in $$props) $$invalidate(11, rows = $$props.rows);
1354
- if ('columns' in $$props) $$invalidate(12, columns = $$props.columns);
1355
- if ('gap' in $$props) $$invalidate(13, gap = $$props.gap);
1356
- if ('background' in $$props) $$invalidate(14, background = $$props.background);
1357
- if ('$$scope' in $$props) $$invalidate(19, $$scope = $$props.$$scope);
1388
+ if ('_modalStyle' in $$props) $$invalidate(2, _modalStyle = $$props._modalStyle);
1389
+ if ('closable' in $$props) $$invalidate(3, closable = $$props.closable);
1390
+ if ('backgroundOverray' in $$props) $$invalidate(18, backgroundOverray = $$props.backgroundOverray);
1391
+ if ('closeButtonColor' in $$props) $$invalidate(4, closeButtonColor = $$props.closeButtonColor);
1392
+ if ('eventName' in $$props) $$invalidate(19, eventName = $$props.eventName);
1393
+ if ('eventValue' in $$props) $$invalidate(20, eventValue = $$props.eventValue);
1394
+ if ('_closeStyle' in $$props) $$invalidate(5, _closeStyle = $$props._closeStyle);
1395
+ if ('width' in $$props) $$invalidate(6, width = $$props.width);
1396
+ if ('height' in $$props) $$invalidate(7, height = $$props.height);
1397
+ if ('rows' in $$props) $$invalidate(8, rows = $$props.rows);
1398
+ if ('columns' in $$props) $$invalidate(9, columns = $$props.columns);
1399
+ if ('gap' in $$props) $$invalidate(10, gap = $$props.gap);
1400
+ if ('background' in $$props) $$invalidate(11, background = $$props.background);
1401
+ if ('$$scope' in $$props) $$invalidate(22, $$scope = $$props.$$scope);
1358
1402
  };
1359
1403
 
1360
1404
  return [
1361
1405
  path,
1362
1406
  animation,
1363
- backgroundOverray,
1364
- position,
1407
+ _modalStyle,
1365
1408
  closable,
1366
1409
  closeButtonColor,
1367
- fixed,
1368
- _modalStyle,
1369
1410
  _closeStyle,
1370
1411
  width,
1371
1412
  height,
@@ -1374,6 +1415,12 @@ function instance$3($$self, $$props, $$invalidate) {
1374
1415
  gap,
1375
1416
  background,
1376
1417
  close,
1418
+ _position,
1419
+ margin,
1420
+ _backgroundOverray,
1421
+ placement,
1422
+ position,
1423
+ backgroundOverray,
1377
1424
  eventName,
1378
1425
  eventValue,
1379
1426
  slots,
@@ -1385,35 +1432,35 @@ class GridModalState extends SvelteComponent {
1385
1432
  constructor(options) {
1386
1433
  super();
1387
1434
 
1388
- init(this, options, instance$3, create_fragment$3, safe_not_equal, {
1435
+ init(this, options, instance$6, create_fragment$6, safe_not_equal, {
1389
1436
  path: 0,
1437
+ placement: 16,
1438
+ position: 17,
1390
1439
  animation: 1,
1391
- backgroundOverray: 2,
1392
- position: 3,
1393
- closable: 4,
1394
- closeButtonColor: 5,
1395
- eventName: 16,
1396
- eventValue: 17,
1397
- fixed: 6,
1398
- _modalStyle: 7,
1399
- _closeStyle: 8,
1400
- width: 9,
1401
- height: 10,
1402
- rows: 11,
1403
- columns: 12,
1404
- gap: 13,
1405
- background: 14
1440
+ _modalStyle: 2,
1441
+ closable: 3,
1442
+ backgroundOverray: 18,
1443
+ closeButtonColor: 4,
1444
+ eventName: 19,
1445
+ eventValue: 20,
1446
+ _closeStyle: 5,
1447
+ width: 6,
1448
+ height: 7,
1449
+ rows: 8,
1450
+ columns: 9,
1451
+ gap: 10,
1452
+ background: 11
1406
1453
  });
1407
1454
  }
1408
1455
  }
1409
1456
 
1410
1457
  /* src/GridItem.svelte generated by Svelte v3.44.1 */
1411
1458
 
1412
- function add_css$2(target) {
1459
+ function add_css$5(target) {
1413
1460
  append_styles(target, "svelte-g0rfgr", ".grid-item.svelte-g0rfgr{word-break:break-all}");
1414
1461
  }
1415
1462
 
1416
- function create_fragment$2(ctx) {
1463
+ function create_fragment$5(ctx) {
1417
1464
  let div;
1418
1465
  let current;
1419
1466
  const default_slot_template = /*#slots*/ ctx[8].default;
@@ -1471,7 +1518,7 @@ function create_fragment$2(ctx) {
1471
1518
  };
1472
1519
  }
1473
1520
 
1474
- function instance$2($$self, $$props, $$invalidate) {
1521
+ function instance$5($$self, $$props, $$invalidate) {
1475
1522
  let _style;
1476
1523
  let { $$slots: slots = {}, $$scope } = $$props;
1477
1524
  let { x1 } = $$props;
@@ -1517,8 +1564,8 @@ class GridItem extends SvelteComponent {
1517
1564
  init(
1518
1565
  this,
1519
1566
  options,
1520
- instance$2,
1521
- create_fragment$2,
1567
+ instance$5,
1568
+ create_fragment$5,
1522
1569
  safe_not_equal,
1523
1570
  {
1524
1571
  x1: 1,
@@ -1528,18 +1575,18 @@ class GridItem extends SvelteComponent {
1528
1575
  z: 5,
1529
1576
  background: 6
1530
1577
  },
1531
- add_css$2
1578
+ add_css$5
1532
1579
  );
1533
1580
  }
1534
1581
  }
1535
1582
 
1536
1583
  /* src/components/Flex.svelte generated by Svelte v3.44.1 */
1537
1584
 
1538
- function add_css$1(target) {
1585
+ function add_css$4(target) {
1539
1586
  append_styles(target, "svelte-1e71ejc", ".flex.svelte-1e71ejc{display:flex}");
1540
1587
  }
1541
1588
 
1542
- function create_fragment$1(ctx) {
1589
+ function create_fragment$4(ctx) {
1543
1590
  let div;
1544
1591
  let div_style_value;
1545
1592
  let current;
@@ -1604,7 +1651,7 @@ function getFlexContext() {
1604
1651
  return getContext(FlexContextKey);
1605
1652
  }
1606
1653
 
1607
- function instance$1($$self, $$props, $$invalidate) {
1654
+ function instance$4($$self, $$props, $$invalidate) {
1608
1655
  let { $$slots: slots = {}, $$scope } = $$props;
1609
1656
  let { direction = 'row' } = $$props;
1610
1657
  let { width = '100%' } = $$props;
@@ -1630,8 +1677,8 @@ class Flex extends SvelteComponent {
1630
1677
  init(
1631
1678
  this,
1632
1679
  options,
1633
- instance$1,
1634
- create_fragment$1,
1680
+ instance$4,
1681
+ create_fragment$4,
1635
1682
  safe_not_equal,
1636
1683
  {
1637
1684
  direction: 0,
@@ -1639,18 +1686,18 @@ class Flex extends SvelteComponent {
1639
1686
  height: 2,
1640
1687
  _style: 3
1641
1688
  },
1642
- add_css$1
1689
+ add_css$4
1643
1690
  );
1644
1691
  }
1645
1692
  }
1646
1693
 
1647
1694
  /* src/components/FlexItem.svelte generated by Svelte v3.44.1 */
1648
1695
 
1649
- function add_css(target) {
1696
+ function add_css$3(target) {
1650
1697
  append_styles(target, "svelte-1p0bk1x", ".flex-item.svelte-1p0bk1x{max-width:100%;max-height:100%;position:relative;isolation:isolate}");
1651
1698
  }
1652
1699
 
1653
- function create_fragment(ctx) {
1700
+ function create_fragment$3(ctx) {
1654
1701
  let div;
1655
1702
  let current;
1656
1703
  const default_slot_template = /*#slots*/ ctx[4].default;
@@ -1708,7 +1755,7 @@ function create_fragment(ctx) {
1708
1755
  };
1709
1756
  }
1710
1757
 
1711
- function instance($$self, $$props, $$invalidate) {
1758
+ function instance$3($$self, $$props, $$invalidate) {
1712
1759
  let { $$slots: slots = {}, $$scope } = $$props;
1713
1760
  let { length } = $$props;
1714
1761
  let { _style = '' } = $$props;
@@ -1751,8 +1798,293 @@ function instance($$self, $$props, $$invalidate) {
1751
1798
  class FlexItem extends SvelteComponent {
1752
1799
  constructor(options) {
1753
1800
  super();
1754
- init(this, options, instance, create_fragment, safe_not_equal, { length: 1, _style: 2 }, add_css);
1801
+ init(this, options, instance$3, create_fragment$3, safe_not_equal, { length: 1, _style: 2 }, add_css$3);
1802
+ }
1803
+ }
1804
+
1805
+ /* src/components/TextBlock.svelte generated by Svelte v3.44.1 */
1806
+
1807
+ function add_css$2(target) {
1808
+ append_styles(target, "svelte-1xf20ux", ".text-block.svelte-1xf20ux{display:flex;width:100%;height:100%;box-sizing:border-box}.text-block-inner.svelte-1xf20ux{width:100%}");
1809
+ }
1810
+
1811
+ function create_fragment$2(ctx) {
1812
+ let div1;
1813
+ let div0;
1814
+ let raw_value = toBr(/*text*/ ctx[0]) + "";
1815
+
1816
+ return {
1817
+ c() {
1818
+ div1 = element("div");
1819
+ div0 = element("div");
1820
+ attr(div0, "class", "text-block-inner svelte-1xf20ux");
1821
+ attr(div1, "class", "text-block svelte-1xf20ux");
1822
+ attr(div1, "style", /*_style*/ ctx[1]);
1823
+ },
1824
+ m(target, anchor) {
1825
+ insert(target, div1, anchor);
1826
+ append(div1, div0);
1827
+ div0.innerHTML = raw_value;
1828
+ },
1829
+ p(ctx, [dirty]) {
1830
+ if (dirty & /*text*/ 1 && raw_value !== (raw_value = toBr(/*text*/ ctx[0]) + "")) div0.innerHTML = raw_value;
1831
+ if (dirty & /*_style*/ 2) {
1832
+ attr(div1, "style", /*_style*/ ctx[1]);
1833
+ }
1834
+ },
1835
+ i: noop,
1836
+ o: noop,
1837
+ d(detaching) {
1838
+ if (detaching) detach(div1);
1839
+ }
1840
+ };
1841
+ }
1842
+
1843
+ function instance$2($$self, $$props, $$invalidate) {
1844
+ let { text = 'サンプルSample' } = $$props;
1845
+ let { _style = 'font-size:12px;' } = $$props;
1846
+
1847
+ $$self.$$set = $$props => {
1848
+ if ('text' in $$props) $$invalidate(0, text = $$props.text);
1849
+ if ('_style' in $$props) $$invalidate(1, _style = $$props._style);
1850
+ };
1851
+
1852
+ return [text, _style];
1853
+ }
1854
+
1855
+ class TextBlock extends SvelteComponent {
1856
+ constructor(options) {
1857
+ super();
1858
+ init(this, options, instance$2, create_fragment$2, safe_not_equal, { text: 0, _style: 1 }, add_css$2);
1859
+ }
1860
+ }
1861
+
1862
+ /* src/components/TextButtonBlock.svelte generated by Svelte v3.44.1 */
1863
+
1864
+ function add_css$1(target) {
1865
+ append_styles(target, "svelte-1t5i3za", ".text-button-block.svelte-1t5i3za{width:100%;height:100%}.text-button.svelte-1t5i3za{display:flex;justify-content:center;align-items:center;width:100%;height:100%;background-color:transparent;border:none;box-shadow:transparent;box-sizing:border-box;cursor:pointer;transition:box-shadow 0.2s}.text-button.svelte-1t5i3za:active{box-shadow:inset 0 0 100px 100px rgba(0, 0, 0, 0.3)}.text-button.svelte-1t5i3za:hover{box-shadow:inset 0 0 100px 100px rgba(255, 255, 255, 0.3)}");
1866
+ }
1867
+
1868
+ function create_fragment$1(ctx) {
1869
+ let div;
1870
+ let button;
1871
+ let raw_value = toBr(/*text*/ ctx[0]) + "";
1872
+ let mounted;
1873
+ let dispose;
1874
+
1875
+ return {
1876
+ c() {
1877
+ div = element("div");
1878
+ button = element("button");
1879
+ attr(button, "class", "text-button svelte-1t5i3za");
1880
+ attr(button, "style", /*_buttonStyle*/ ctx[1]);
1881
+ attr(div, "class", "text-button-block svelte-1t5i3za");
1882
+ attr(div, "style", /*_style*/ ctx[2]);
1883
+ },
1884
+ m(target, anchor) {
1885
+ insert(target, div, anchor);
1886
+ append(div, button);
1887
+ button.innerHTML = raw_value;
1888
+
1889
+ if (!mounted) {
1890
+ dispose = listen(button, "click", /*click*/ ctx[3]);
1891
+ mounted = true;
1892
+ }
1893
+ },
1894
+ p(ctx, [dirty]) {
1895
+ if (dirty & /*text*/ 1 && raw_value !== (raw_value = toBr(/*text*/ ctx[0]) + "")) button.innerHTML = raw_value;
1896
+ if (dirty & /*_buttonStyle*/ 2) {
1897
+ attr(button, "style", /*_buttonStyle*/ ctx[1]);
1898
+ }
1899
+
1900
+ if (dirty & /*_style*/ 4) {
1901
+ attr(div, "style", /*_style*/ ctx[2]);
1902
+ }
1903
+ },
1904
+ i: noop,
1905
+ o: noop,
1906
+ d(detaching) {
1907
+ if (detaching) detach(div);
1908
+ mounted = false;
1909
+ dispose();
1910
+ }
1911
+ };
1912
+ }
1913
+
1914
+ function instance$1($$self, $$props, $$invalidate) {
1915
+ let { text = 'クリック' } = $$props;
1916
+
1917
+ /**
1918
+ * {
1919
+ * "title": {"ja": "クリック", "en": "Click"},
1920
+ * "folder": {"ja": "クリック時の動作", "en": "Behavior when clicking"}
1921
+ * }
1922
+ */
1923
+ const dispatch = createEventDispatcher();
1924
+
1925
+ const click = () => {
1926
+ if (eventName) {
1927
+ send_event(eventName, eventValue);
1928
+ }
1929
+
1930
+ dispatch('click');
1931
+ };
1932
+
1933
+ let { eventName = '' } = $$props;
1934
+ let { eventValue = null } = $$props;
1935
+ let { _buttonStyle = 'color:#ffffff; font-size:14px; font-weight:bold; justify-content:center; align-items:center; padding:1px 6px 1px 6px;' } = $$props;
1936
+ let { _style = 'background-color: #000000; border-radius:4px;' } = $$props;
1937
+
1938
+ $$self.$$set = $$props => {
1939
+ if ('text' in $$props) $$invalidate(0, text = $$props.text);
1940
+ if ('eventName' in $$props) $$invalidate(4, eventName = $$props.eventName);
1941
+ if ('eventValue' in $$props) $$invalidate(5, eventValue = $$props.eventValue);
1942
+ if ('_buttonStyle' in $$props) $$invalidate(1, _buttonStyle = $$props._buttonStyle);
1943
+ if ('_style' in $$props) $$invalidate(2, _style = $$props._style);
1944
+ };
1945
+
1946
+ return [text, _buttonStyle, _style, click, eventName, eventValue];
1947
+ }
1948
+
1949
+ class TextButtonBlock extends SvelteComponent {
1950
+ constructor(options) {
1951
+ super();
1952
+
1953
+ init(
1954
+ this,
1955
+ options,
1956
+ instance$1,
1957
+ create_fragment$1,
1958
+ safe_not_equal,
1959
+ {
1960
+ text: 0,
1961
+ eventName: 4,
1962
+ eventValue: 5,
1963
+ _buttonStyle: 1,
1964
+ _style: 2
1965
+ },
1966
+ add_css$1
1967
+ );
1968
+ }
1969
+ }
1970
+
1971
+ /* src/components/ImageBlock.svelte generated by Svelte v3.44.1 */
1972
+
1973
+ function add_css(target) {
1974
+ append_styles(target, "svelte-95tcq4", ".image-block.svelte-95tcq4{display:flex;width:100%;height:100%;max-width:100%;max-height:100%;justify-content:center;align-items:center;overflow:hidden;box-sizing:border-box}.image.svelte-95tcq4{width:100%;height:100%}");
1975
+ }
1976
+
1977
+ function create_fragment(ctx) {
1978
+ let div;
1979
+ let img;
1980
+ let img_src_value;
1981
+ let mounted;
1982
+ let dispose;
1983
+
1984
+ return {
1985
+ c() {
1986
+ div = element("div");
1987
+ img = element("img");
1988
+ attr(img, "class", "image svelte-95tcq4");
1989
+ attr(img, "loading", "lazy");
1990
+ attr(img, "width", "auto");
1991
+ attr(img, "height", "auto");
1992
+ attr(img, "style", /*_imageStyle*/ ctx[2]);
1993
+ if (!src_url_equal(img.src, img_src_value = /*src*/ ctx[0])) attr(img, "src", img_src_value);
1994
+ attr(img, "alt", /*alt*/ ctx[1]);
1995
+ attr(div, "class", "image-block svelte-95tcq4");
1996
+ attr(div, "style", /*_style*/ ctx[3]);
1997
+ },
1998
+ m(target, anchor) {
1999
+ insert(target, div, anchor);
2000
+ append(div, img);
2001
+
2002
+ if (!mounted) {
2003
+ dispose = listen(div, "click", /*click*/ ctx[4]);
2004
+ mounted = true;
2005
+ }
2006
+ },
2007
+ p(ctx, [dirty]) {
2008
+ if (dirty & /*_imageStyle*/ 4) {
2009
+ attr(img, "style", /*_imageStyle*/ ctx[2]);
2010
+ }
2011
+
2012
+ if (dirty & /*src*/ 1 && !src_url_equal(img.src, img_src_value = /*src*/ ctx[0])) {
2013
+ attr(img, "src", img_src_value);
2014
+ }
2015
+
2016
+ if (dirty & /*alt*/ 2) {
2017
+ attr(img, "alt", /*alt*/ ctx[1]);
2018
+ }
2019
+
2020
+ if (dirty & /*_style*/ 8) {
2021
+ attr(div, "style", /*_style*/ ctx[3]);
2022
+ }
2023
+ },
2024
+ i: noop,
2025
+ o: noop,
2026
+ d(detaching) {
2027
+ if (detaching) detach(div);
2028
+ mounted = false;
2029
+ dispose();
2030
+ }
2031
+ };
2032
+ }
2033
+
2034
+ function instance($$self, $$props, $$invalidate) {
2035
+ let { src = '' } = $$props;
2036
+ let { alt = '' } = $$props;
2037
+ let { eventName = '' } = $$props;
2038
+ let { eventValue = null } = $$props;
2039
+ let { _imageStyle = 'object-fit: contain;' } = $$props;
2040
+ let { _style = '' } = $$props;
2041
+
2042
+ /**
2043
+ * {"title": {"ja": "クリック", "en": "Click"}}
2044
+ */
2045
+ const dispatch = createEventDispatcher();
2046
+
2047
+ const click = () => {
2048
+ if (eventName) {
2049
+ send_event(eventName, eventValue);
2050
+ }
2051
+
2052
+ dispatch('click');
2053
+ };
2054
+
2055
+ $$self.$$set = $$props => {
2056
+ if ('src' in $$props) $$invalidate(0, src = $$props.src);
2057
+ if ('alt' in $$props) $$invalidate(1, alt = $$props.alt);
2058
+ if ('eventName' in $$props) $$invalidate(5, eventName = $$props.eventName);
2059
+ if ('eventValue' in $$props) $$invalidate(6, eventValue = $$props.eventValue);
2060
+ if ('_imageStyle' in $$props) $$invalidate(2, _imageStyle = $$props._imageStyle);
2061
+ if ('_style' in $$props) $$invalidate(3, _style = $$props._style);
2062
+ };
2063
+
2064
+ return [src, alt, _imageStyle, _style, click, eventName, eventValue];
2065
+ }
2066
+
2067
+ class ImageBlock extends SvelteComponent {
2068
+ constructor(options) {
2069
+ super();
2070
+
2071
+ init(
2072
+ this,
2073
+ options,
2074
+ instance,
2075
+ create_fragment,
2076
+ safe_not_equal,
2077
+ {
2078
+ src: 0,
2079
+ alt: 1,
2080
+ eventName: 5,
2081
+ eventValue: 6,
2082
+ _imageStyle: 2,
2083
+ _style: 3
2084
+ },
2085
+ add_css
2086
+ );
1755
2087
  }
1756
2088
  }
1757
2089
 
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 };
2090
+ export { Alignments, AnimationStyleTranslations, AnimationStyles, BackgroundSizes, DefaultModalPlacement, Directions, Flex, FlexItem, GridItem, GridModalState, ImageBlock, Justifies, LengthUnits, MediaQueries, Modal, ModalMarginTranslations, ModalPositionTranslations, ModalPositions, ObjectFits, PropTypes, Repeats, State, TextBlock, TextButtonBlock, closeApp, closed, finalize, getMarginStyle, 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.24",
3
+ "version": "1.0.27",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",
@@ -23,7 +23,9 @@
23
23
  "LICENSE"
24
24
  ],
25
25
  "devDependencies": {
26
- "@plaidev/action-compiler": "^0.4.178",
26
+ "@plaidev/action-compiler": "^0.4.180",
27
+ "@plaidev/sender-types": "^0.4.140",
28
+ "@rollup/plugin-alias": "^3.1.9",
27
29
  "@rollup/plugin-commonjs": "^22.0.0",
28
30
  "@rollup/plugin-json": "^4.1.0",
29
31
  "@rollup/plugin-node-resolve": "^13.3.0",
@@ -31,17 +33,26 @@
31
33
  "@sveltejs/vite-plugin-svelte": "1.0.0-next.37",
32
34
  "@testing-library/svelte": "^3.1.3",
33
35
  "@tsconfig/svelte": "^2.0.1",
36
+ "@types/serve-static": "^1.13.10",
34
37
  "@vitest/ui": "latest",
38
+ "c8": "^7.12.0",
35
39
  "happy-dom": "^6.0.3",
36
- "jiti": "1.14.0",
40
+ "isomorphic-fetch": "3.0.0",
41
+ "jiti": "^1.14.0",
42
+ "listhen": "^0.2.13",
37
43
  "node-fetch": "2.6.7",
44
+ "picocolors": "^1.0.0",
45
+ "playwright": "^1.23.4",
38
46
  "rimraf": "^3.0.2",
39
47
  "rollup": "^2.75.7",
40
48
  "rollup-plugin-http-resolve": "4.0.1-alpha.0",
41
49
  "rollup-plugin-livereload": "^2.0.0",
42
50
  "rollup-plugin-serve": "^2.0.0",
43
51
  "rollup-plugin-svelte": "^7.1.0",
52
+ "rollup-plugin-terser": "7.0.2",
44
53
  "rollup-plugin-ts": "^2.0.7",
54
+ "serve": "^14.0.1",
55
+ "serve-static": "^1.15.0",
45
56
  "svelte": "3.44.1",
46
57
  "svelte-check": "^2.2.7",
47
58
  "svelte-preprocess": "4.9.8",
@@ -51,13 +62,19 @@
51
62
  },
52
63
  "scripts": {
53
64
  "dev": "jiti ./scripts/preview.ts",
65
+ "setup:default": "jiti ./scripts/default.ts",
66
+ "setup:template": "jiti ./scripts/template.ts",
67
+ "setup:concat": "jiti ./scripts/concat.ts",
68
+ "setup:compile": "jiti ./scripts/compile.ts",
69
+ "prepare": "npm run setup:default && npm run setup:template && npm run setup:concat",
54
70
  "build": "rollup -c",
55
71
  "build:watch": "rollup -c -w",
56
72
  "check": "svelte-check --tsconfig ./tsconfig.json",
57
- "test": "vitest run",
58
- "test:watch": "vitest",
59
- "test:ui": "vitest --ui",
60
- "coverage": "vitest run --coverage"
73
+ "test": "vitest run test",
74
+ "test:watch": "vitest test",
75
+ "test:ui": "vitest test --ui",
76
+ "test:e2e": "vitest run spec",
77
+ "coverage": "vitest run test --coverage"
61
78
  },
62
79
  "publishConfig": {
63
80
  "access": "public"