@plaidev/karte-action-sdk 1.1.266-29059851.1bdc68e9 → 1.1.266-29065938.e3ec46c6

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/index.es.js CHANGED
@@ -15438,10 +15438,10 @@ const IMAGE_ROUND_STYLES = {
15438
15438
  /* src/components-flex/image/Image.svelte generated by Svelte v3.53.1 */
15439
15439
 
15440
15440
  function add_css$h(target) {
15441
- append_styles(target, "svelte-gzaieg", ".image.svelte-gzaieg{max-width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;flex-shrink:0}.image-img.svelte-gzaieg{vertical-align:top;width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-drag:none}");
15441
+ append_styles(target, "svelte-rewdem", ".image.svelte-rewdem{max-width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center}.image-img.svelte-rewdem{vertical-align:top;width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-drag:none}");
15442
15442
  }
15443
15443
 
15444
- // (24:0) <svelte:element this={element} {...attributes} class="image" {style} data-layer-id={layerId} on:click={handleClick} >
15444
+ // (26:0) <svelte:element this={element} {...attributes} class="image" {style} data-layer-id={layerId} on:click={handleClick} >
15445
15445
  function create_dynamic_element$5(ctx) {
15446
15446
  let svelte_element;
15447
15447
  let img;
@@ -15469,7 +15469,7 @@ function create_dynamic_element$5(ctx) {
15469
15469
  img = element("img");
15470
15470
  if (!src_url_equal(img.src, img_src_value = /*props*/ ctx[0].image)) attr(img, "src", img_src_value);
15471
15471
  attr(img, "alt", img_alt_value = /*props*/ ctx[0].alt);
15472
- attr(img, "class", "image-img svelte-gzaieg");
15472
+ attr(img, "class", "image-img svelte-rewdem");
15473
15473
 
15474
15474
  if ((/-/).test(/*element*/ ctx[4])) {
15475
15475
  set_custom_element_data_map(svelte_element, svelte_element_data);
@@ -15477,7 +15477,7 @@ function create_dynamic_element$5(ctx) {
15477
15477
  set_attributes(svelte_element, svelte_element_data);
15478
15478
  }
15479
15479
 
15480
- toggle_class(svelte_element, "svelte-gzaieg", true);
15480
+ toggle_class(svelte_element, "svelte-rewdem", true);
15481
15481
  },
15482
15482
  m(target, anchor) {
15483
15483
  insert(target, svelte_element, anchor);
@@ -15510,7 +15510,7 @@ function create_dynamic_element$5(ctx) {
15510
15510
  set_attributes(svelte_element, svelte_element_data);
15511
15511
  }
15512
15512
 
15513
- toggle_class(svelte_element, "svelte-gzaieg", true);
15513
+ toggle_class(svelte_element, "svelte-rewdem", true);
15514
15514
  },
15515
15515
  d(detaching) {
15516
15516
  if (detaching) detach(svelte_element);
@@ -15571,6 +15571,7 @@ function instance$l($$self, $$props, $$invalidate) {
15571
15571
  useInjectCustomizeCss(props);
15572
15572
  const { attributes, element, handleClick } = useClickable(props);
15573
15573
  const aspectVariantStyles = ASPECT_VARIANT[props.aspectVariant]?.getProps();
15574
+ const width = props.width ?? '100%';
15574
15575
 
15575
15576
  $$self.$$set = $$props => {
15576
15577
  if ('props' in $$props) $$invalidate(0, props = $$props.props);
@@ -15583,7 +15584,8 @@ function instance$l($$self, $$props, $$invalidate) {
15583
15584
  ...props.borderTopLeftRadius
15584
15585
  ? toCssRadius(props)
15585
15586
  : IMAGE_ROUND_STYLES[props.shape ?? 'square'],
15586
- width: props.width ?? '100%',
15587
+ width,
15588
+ flexShrink: String(width).indexOf('px') !== -1 ? 0 : 1,
15587
15589
  height: props.height ?? 'auto',
15588
15590
  aspectRatio: props.aspect ?? aspectVariantStyles?.aspect,
15589
15591
  ...toCssCommon(props),
@@ -17291,7 +17293,7 @@ function create_else_block(ctx) {
17291
17293
  });
17292
17294
 
17293
17295
  backgroundoverlay.$on("click", function () {
17294
- if (is_function(/*backgroundClick*/ ctx[13])) /*backgroundClick*/ ctx[13].apply(this, arguments);
17296
+ if (is_function(/*backgroundClick*/ ctx[12])) /*backgroundClick*/ ctx[12].apply(this, arguments);
17295
17297
  });
17296
17298
 
17297
17299
  return {
@@ -17338,7 +17340,7 @@ function create_if_block_2(ctx) {
17338
17340
  });
17339
17341
 
17340
17342
  backgroundoverlay0.$on("click", function () {
17341
- if (is_function(/*backgroundClickPC*/ ctx[12])) /*backgroundClickPC*/ ctx[12].apply(this, arguments);
17343
+ if (is_function(/*backgroundClickPC*/ ctx[11])) /*backgroundClickPC*/ ctx[11].apply(this, arguments);
17342
17344
  });
17343
17345
 
17344
17346
  backgroundoverlay1 = new BackgroundOverlay({
@@ -17349,7 +17351,7 @@ function create_if_block_2(ctx) {
17349
17351
  });
17350
17352
 
17351
17353
  backgroundoverlay1.$on("click", function () {
17352
- if (is_function(/*backgroundClickSP*/ ctx[11])) /*backgroundClickSP*/ ctx[11].apply(this, arguments);
17354
+ if (is_function(/*backgroundClickSP*/ ctx[10])) /*backgroundClickSP*/ ctx[10].apply(this, arguments);
17353
17355
  });
17354
17356
 
17355
17357
  return {
@@ -17392,7 +17394,7 @@ function create_if_block_2(ctx) {
17392
17394
  };
17393
17395
  }
17394
17396
 
17395
- // (207:0) {#if !isOnSite}
17397
+ // (207:0) {#if isCanvasPreview}
17396
17398
  function create_if_block_1$1(ctx) {
17397
17399
  return {
17398
17400
  c: noop,
@@ -17408,11 +17410,10 @@ function create_if_block_1$1(ctx) {
17408
17410
  function create_if_block$3(ctx) {
17409
17411
  let div;
17410
17412
  let div_class_value;
17411
- let div_style_value;
17412
17413
  let div_intro;
17413
17414
  let current;
17414
- const default_slot_template = /*#slots*/ ctx[27].default;
17415
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[26], null);
17415
+ const default_slot_template = /*#slots*/ ctx[26].default;
17416
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[25], null);
17416
17417
 
17417
17418
  return {
17418
17419
  c() {
@@ -17422,7 +17423,7 @@ function create_if_block$3(ctx) {
17422
17423
  attr(div, "role", "dialog");
17423
17424
  attr(div, "aria-modal", "true");
17424
17425
  attr(div, "data-layer-id", /*layerId*/ ctx[2]);
17425
- attr(div, "style", div_style_value = [Array.from(/*modalStyles*/ ctx[15]).join(';'), /*style*/ ctx[9]].join(' '));
17426
+ attr(div, "style", Array.from(/*modalStyles*/ ctx[14]).join(';'));
17426
17427
  },
17427
17428
  m(target, anchor) {
17428
17429
  insert(target, div, anchor);
@@ -17431,22 +17432,22 @@ function create_if_block$3(ctx) {
17431
17432
  default_slot.m(div, null);
17432
17433
  }
17433
17434
 
17434
- /*div_binding*/ ctx[28](div);
17435
+ /*div_binding*/ ctx[27](div);
17435
17436
  current = true;
17436
17437
  },
17437
17438
  p(new_ctx, dirty) {
17438
17439
  ctx = new_ctx;
17439
17440
 
17440
17441
  if (default_slot) {
17441
- if (default_slot.p && (!current || dirty & /*$$scope*/ 67108864)) {
17442
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 33554432)) {
17442
17443
  update_slot_base(
17443
17444
  default_slot,
17444
17445
  default_slot_template,
17445
17446
  ctx,
17446
- /*$$scope*/ ctx[26],
17447
+ /*$$scope*/ ctx[25],
17447
17448
  !current
17448
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[26])
17449
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[26], dirty, null),
17449
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[25])
17450
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[25], dirty, null),
17450
17451
  null
17451
17452
  );
17452
17453
  }
@@ -17459,10 +17460,6 @@ function create_if_block$3(ctx) {
17459
17460
  if (!current || dirty & /*layerId*/ 4) {
17460
17461
  attr(div, "data-layer-id", /*layerId*/ ctx[2]);
17461
17462
  }
17462
-
17463
- if (!current || dirty & /*style*/ 512 && div_style_value !== (div_style_value = [Array.from(/*modalStyles*/ ctx[15]).join(';'), /*style*/ ctx[9]].join(' '))) {
17464
- attr(div, "style", div_style_value);
17465
- }
17466
17463
  },
17467
17464
  i(local) {
17468
17465
  if (current) return;
@@ -17488,7 +17485,7 @@ function create_if_block$3(ctx) {
17488
17485
  d(detaching) {
17489
17486
  if (detaching) detach(div);
17490
17487
  if (default_slot) default_slot.d(detaching);
17491
- /*div_binding*/ ctx[28](null);
17488
+ /*div_binding*/ ctx[27](null);
17492
17489
  }
17493
17490
  };
17494
17491
  }
@@ -17505,7 +17502,7 @@ function create_fragment$d(ctx) {
17505
17502
  const if_blocks = [];
17506
17503
 
17507
17504
  function select_block_type(ctx, dirty) {
17508
- if (!/*isOnSite*/ ctx[14]) return 0;
17505
+ if (/*isCanvasPreview*/ ctx[13]) return 0;
17509
17506
  if (/*useBreakPoint*/ ctx[0]) return 1;
17510
17507
  return 2;
17511
17508
  }
@@ -17530,7 +17527,7 @@ function create_fragment$d(ctx) {
17530
17527
 
17531
17528
  if (!mounted) {
17532
17529
  dispose = listen(window, "keydown", function () {
17533
- if (is_function(/*handle_keydown*/ ctx[10])) /*handle_keydown*/ ctx[10].apply(this, arguments);
17530
+ if (is_function(/*handle_keydown*/ ctx[9])) /*handle_keydown*/ ctx[9].apply(this, arguments);
17534
17531
  });
17535
17532
 
17536
17533
  mounted = true;
@@ -17616,7 +17613,6 @@ function instance$d($$self, $$props, $$invalidate) {
17616
17613
  let backgroundClickSP;
17617
17614
  let handle_keydown;
17618
17615
  let visible;
17619
- let style;
17620
17616
  let { $$slots: slots = {}, $$scope } = $$props;
17621
17617
  let { useBreakPoint = false } = $$props;
17622
17618
  let { placement } = $$props;
@@ -17628,9 +17624,7 @@ function instance$d($$self, $$props, $$invalidate) {
17628
17624
  let { closeEventValue = null } = $$props;
17629
17625
  let { layerId = '' } = $$props;
17630
17626
  const { brandKit } = useBrandKit();
17631
-
17632
- // falseが明示的に指定されている場合以外はtrueにする
17633
- const isOnSite = (document.querySelector('#preview')?.getAttribute('data-on-site') ?? 'true') !== 'false';
17627
+ const isCanvasPreview = (document.querySelector('#preview')?.getAttribute('data-canvas-preview') ?? 'false') === 'true';
17634
17628
 
17635
17629
  // モーダル背景の設定
17636
17630
  const isExistBackgroundOverlayValue = placement && placement.backgroundOverlay !== undefined;
@@ -17663,20 +17657,20 @@ function instance$d($$self, $$props, $$invalidate) {
17663
17657
 
17664
17658
  $$self.$$set = $$props => {
17665
17659
  if ('useBreakPoint' in $$props) $$invalidate(0, useBreakPoint = $$props.useBreakPoint);
17666
- if ('placement' in $$props) $$invalidate(16, placement = $$props.placement);
17667
- if ('breakPoint' in $$props) $$invalidate(17, breakPoint = $$props.breakPoint);
17668
- if ('elasticity' in $$props) $$invalidate(18, elasticity = $$props.elasticity);
17660
+ if ('placement' in $$props) $$invalidate(15, placement = $$props.placement);
17661
+ if ('breakPoint' in $$props) $$invalidate(16, breakPoint = $$props.breakPoint);
17662
+ if ('elasticity' in $$props) $$invalidate(17, elasticity = $$props.elasticity);
17669
17663
  if ('animation' in $$props) $$invalidate(1, animation = $$props.animation);
17670
- if ('props' in $$props) $$invalidate(19, props = $$props.props);
17671
- if ('closeEventName' in $$props) $$invalidate(20, closeEventName = $$props.closeEventName);
17672
- if ('closeEventValue' in $$props) $$invalidate(21, closeEventValue = $$props.closeEventValue);
17664
+ if ('props' in $$props) $$invalidate(18, props = $$props.props);
17665
+ if ('closeEventName' in $$props) $$invalidate(19, closeEventName = $$props.closeEventName);
17666
+ if ('closeEventValue' in $$props) $$invalidate(20, closeEventValue = $$props.closeEventValue);
17673
17667
  if ('layerId' in $$props) $$invalidate(2, layerId = $$props.layerId);
17674
- if ('$$scope' in $$props) $$invalidate(26, $$scope = $$props.$$scope);
17668
+ if ('$$scope' in $$props) $$invalidate(25, $$scope = $$props.$$scope);
17675
17669
  };
17676
17670
 
17677
17671
  $$self.$$.update = () => {
17678
- if ($$self.$$.dirty & /*closeEventName, closeEventValue*/ 3145728) {
17679
- $$invalidate(25, close = () => {
17672
+ if ($$self.$$.dirty & /*closeEventName, closeEventValue*/ 1572864) {
17673
+ $$invalidate(24, close = () => {
17680
17674
  const onClose = { operation: 'closeApp', args: ['button'] };
17681
17675
 
17682
17676
  if (closeEventName) {
@@ -17687,9 +17681,9 @@ function instance$d($$self, $$props, $$invalidate) {
17687
17681
  });
17688
17682
  }
17689
17683
 
17690
- if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint*/ 196609) {
17684
+ if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint*/ 98305) {
17691
17685
  {
17692
- if (isOnSite && isExistBackgroundOverlayValue) {
17686
+ if (!isCanvasPreview && isExistBackgroundOverlayValue) {
17693
17687
  $$invalidate(4, backgroundOverlay = placement.backgroundOverlay);
17694
17688
  }
17695
17689
 
@@ -17702,30 +17696,30 @@ function instance$d($$self, $$props, $$invalidate) {
17702
17696
  }
17703
17697
  }
17704
17698
 
17705
- if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint*/ 196609) {
17699
+ if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint*/ 98305) {
17706
17700
  {
17707
17701
  if (placement && placement.backgroundClick) {
17708
- $$invalidate(22, backgroundClickFunction = placement.backgroundClick);
17702
+ $$invalidate(21, backgroundClickFunction = placement.backgroundClick);
17709
17703
  }
17710
17704
 
17711
17705
  if (useBreakPoint) {
17712
17706
  const pc = breakPoint?.PC?.placement?.backgroundClick;
17713
17707
 
17714
17708
  if (pc) {
17715
- $$invalidate(23, backgroundClickFunctionPC = pc);
17709
+ $$invalidate(22, backgroundClickFunctionPC = pc);
17716
17710
  }
17717
17711
 
17718
17712
  const sp = breakPoint?.SP?.placement?.backgroundClick;
17719
17713
 
17720
17714
  if (sp) {
17721
- $$invalidate(24, backgroundClickFunctionSP = sp);
17715
+ $$invalidate(23, backgroundClickFunctionSP = sp);
17722
17716
  }
17723
17717
  }
17724
17718
  }
17725
17719
  }
17726
17720
 
17727
- if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunction*/ 7340032) {
17728
- $$invalidate(13, backgroundClick = () => {
17721
+ if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunction*/ 3670016) {
17722
+ $$invalidate(12, backgroundClick = () => {
17729
17723
  if (closeEventName) {
17730
17724
  send_event(closeEventName, closeEventValue);
17731
17725
  }
@@ -17734,8 +17728,8 @@ function instance$d($$self, $$props, $$invalidate) {
17734
17728
  });
17735
17729
  }
17736
17730
 
17737
- if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunctionPC*/ 11534336) {
17738
- $$invalidate(12, backgroundClickPC = () => {
17731
+ if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunctionPC*/ 5767168) {
17732
+ $$invalidate(11, backgroundClickPC = () => {
17739
17733
  if (closeEventName) {
17740
17734
  send_event(closeEventName, closeEventValue);
17741
17735
  }
@@ -17744,8 +17738,8 @@ function instance$d($$self, $$props, $$invalidate) {
17744
17738
  });
17745
17739
  }
17746
17740
 
17747
- if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunctionSP*/ 19922944) {
17748
- $$invalidate(11, backgroundClickSP = () => {
17741
+ if ($$self.$$.dirty & /*closeEventName, closeEventValue, backgroundClickFunctionSP*/ 9961472) {
17742
+ $$invalidate(10, backgroundClickSP = () => {
17749
17743
  if (closeEventName) {
17750
17744
  send_event(closeEventName, closeEventValue);
17751
17745
  }
@@ -17754,13 +17748,13 @@ function instance$d($$self, $$props, $$invalidate) {
17754
17748
  });
17755
17749
  }
17756
17750
 
17757
- if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint, transforms*/ 196617) {
17751
+ if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint, transforms*/ 98313) {
17758
17752
  // 表示位置のスタイルとアニメーションの動きを設定
17759
17753
  {
17760
17754
  // 表示位置のスタイルの設定
17761
17755
  let position = DefaultModalPlacement.position;
17762
17756
 
17763
- if (isOnSite && placement && placement.position !== null) {
17757
+ if (!isCanvasPreview && placement && placement.position !== null) {
17764
17758
  position = placement.position;
17765
17759
  }
17766
17760
 
@@ -17777,7 +17771,7 @@ function instance$d($$self, $$props, $$invalidate) {
17777
17771
  $$invalidate(3, transforms = []);
17778
17772
 
17779
17773
  DEVICE_IDS.forEach(deviceId => {
17780
- if (isOnSite && useBreakPoint) {
17774
+ if (!isCanvasPreview && useBreakPoint) {
17781
17775
  const positionWithBp = breakPoint[deviceId]?.placement?.position;
17782
17776
 
17783
17777
  transforms.push({
@@ -17802,12 +17796,12 @@ function instance$d($$self, $$props, $$invalidate) {
17802
17796
  }
17803
17797
  }
17804
17798
 
17805
- if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint*/ 196609) {
17799
+ if ($$self.$$.dirty & /*placement, useBreakPoint, breakPoint, props*/ 360449) {
17806
17800
  // 表示位置の調整のスタイルを設定
17807
17801
  {
17808
17802
  let margin = DefaultModalPlacement.margin;
17809
17803
 
17810
- if (isOnSite && placement && placement.margin !== null) {
17804
+ if (!isCanvasPreview && placement && placement.margin !== null) {
17811
17805
  margin = placement.margin;
17812
17806
  }
17813
17807
 
@@ -17818,7 +17812,7 @@ function instance$d($$self, $$props, $$invalidate) {
17818
17812
  }
17819
17813
 
17820
17814
  DEVICE_IDS.forEach(deviceId => {
17821
- if (isOnSite && useBreakPoint) {
17815
+ if (!isCanvasPreview && useBreakPoint) {
17822
17816
  const marginWithBp = breakPoint[deviceId]?.placement?.margin;
17823
17817
  marginStyle = getMarginStyle(marginWithBp);
17824
17818
  }
@@ -17831,23 +17825,23 @@ function instance$d($$self, $$props, $$invalidate) {
17831
17825
 
17832
17826
  modalStyles.add(marginVariables);
17833
17827
  });
17834
- }
17835
- }
17836
17828
 
17837
- if ($$self.$$.dirty & /*close*/ 33554432) {
17838
- $$invalidate(10, handle_keydown = handleKeydown({ Escape: close }));
17829
+ const propsStyle = objToStyle({
17830
+ width: props.width,
17831
+ ...toCssOverflow(props),
17832
+ ...toCssShadow(props),
17833
+ ...toCssRadius(props),
17834
+ ...toCssBackgroundImage(props),
17835
+ ...toCssBackgroundColor(props),
17836
+ ...toCssBorder(props)
17837
+ });
17838
+
17839
+ modalStyles.add(propsStyle);
17840
+ }
17839
17841
  }
17840
17842
 
17841
- if ($$self.$$.dirty & /*props*/ 524288) {
17842
- $$invalidate(9, style = objToStyle({
17843
- width: props.width,
17844
- ...toCssOverflow(props),
17845
- ...toCssShadow(props),
17846
- ...toCssRadius(props),
17847
- ...toCssBackgroundImage(props),
17848
- ...toCssBackgroundColor(props),
17849
- ...toCssBorder(props)
17850
- }));
17843
+ if ($$self.$$.dirty & /*close*/ 16777216) {
17844
+ $$invalidate(9, handle_keydown = handleKeydown({ Escape: close }));
17851
17845
  }
17852
17846
  };
17853
17847
 
@@ -17866,12 +17860,11 @@ function instance$d($$self, $$props, $$invalidate) {
17866
17860
  backgroundOverlaySP,
17867
17861
  modal,
17868
17862
  visible,
17869
- style,
17870
17863
  handle_keydown,
17871
17864
  backgroundClickSP,
17872
17865
  backgroundClickPC,
17873
17866
  backgroundClick,
17874
- isOnSite,
17867
+ isCanvasPreview,
17875
17868
  modalStyles,
17876
17869
  placement,
17877
17870
  breakPoint,
@@ -17901,13 +17894,13 @@ class Modal extends SvelteComponent {
17901
17894
  safe_not_equal,
17902
17895
  {
17903
17896
  useBreakPoint: 0,
17904
- placement: 16,
17905
- breakPoint: 17,
17906
- elasticity: 18,
17897
+ placement: 15,
17898
+ breakPoint: 16,
17899
+ elasticity: 17,
17907
17900
  animation: 1,
17908
- props: 19,
17909
- closeEventName: 20,
17910
- closeEventValue: 21,
17901
+ props: 18,
17902
+ closeEventName: 19,
17903
+ closeEventValue: 20,
17911
17904
  layerId: 2
17912
17905
  },
17913
17906
  add_css$9
@@ -20446,7 +20439,7 @@ function get_each_context(ctx, list, i) {
20446
20439
  return child_ctx;
20447
20440
  }
20448
20441
 
20449
- // (13:0) {#if component}
20442
+ // (12:0) {#if component}
20450
20443
  function create_if_block(ctx) {
20451
20444
  let switch_instance;
20452
20445
  let switch_instance_anchor;
@@ -20530,7 +20523,7 @@ function create_if_block(ctx) {
20530
20523
  };
20531
20524
  }
20532
20525
 
20533
- // (20:4) {#if option.children}
20526
+ // (19:4) {#if option.children}
20534
20527
  function create_if_block_1(ctx) {
20535
20528
  let each_1_anchor;
20536
20529
  let current;
@@ -20614,7 +20607,7 @@ function create_if_block_1(ctx) {
20614
20607
  };
20615
20608
  }
20616
20609
 
20617
- // (21:6) {#each option.children as child}
20610
+ // (20:6) {#each option.children as child}
20618
20611
  function create_each_block(ctx) {
20619
20612
  let thumbnailpreview;
20620
20613
  let current;
@@ -20648,7 +20641,7 @@ function create_each_block(ctx) {
20648
20641
  };
20649
20642
  }
20650
20643
 
20651
- // (14:2) <svelte:component this={component} props={'previewProps' in option && typeof option.previewProps !== 'undefined' ? option.previewProps : option.props} >
20644
+ // (13:2) <svelte:component this={component} props={'previewProps' in option && typeof option.previewProps !== 'undefined' ? option.previewProps : option.props} >
20652
20645
  function create_default_slot(ctx) {
20653
20646
  let if_block_anchor;
20654
20647
  let current;
@@ -20763,7 +20756,6 @@ function instance($$self, $$props, $$invalidate) {
20763
20756
  let component;
20764
20757
  let { option = {} } = $$props;
20765
20758
  let { customBrandKit = undefined } = $$props;
20766
- console.log('option', option);
20767
20759
 
20768
20760
  const getComponent = key => {
20769
20761
  return key in sdk ? sdk[key] : null;
@@ -5136,11 +5136,11 @@ const IMAGE_ROUND_STYLES = {
5136
5136
  },
5137
5137
  };
5138
5138
 
5139
- var root_1$3 = $.template(`<img class="image-img svelte-gzaieg">`);
5139
+ var root_1$3 = $.template(`<img class="image-img svelte-rewdem">`);
5140
5140
 
5141
5141
  const $$css$g = {
5142
- hash: 'svelte-gzaieg',
5143
- code: '.image.svelte-gzaieg {max-width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;flex-shrink:0;}.image-img.svelte-gzaieg {vertical-align:top;width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-drag:none;}'
5142
+ hash: 'svelte-rewdem',
5143
+ code: '.image.svelte-rewdem {max-width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;}.image-img.svelte-rewdem {vertical-align:top;width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-drag:none;}'
5144
5144
  };
5145
5145
 
5146
5146
  function Image($$anchor, $$props) {
@@ -5155,6 +5155,7 @@ function Image($$anchor, $$props) {
5155
5155
 
5156
5156
  const { attributes, element, handleClick } = useClickable(props());
5157
5157
  const aspectVariantStyles = ASPECT_VARIANT[props().aspectVariant]?.getProps();
5158
+ const width = props().width ?? '100%';
5158
5159
 
5159
5160
  $.legacy_pre_effect(
5160
5161
  () => (
@@ -5164,7 +5165,8 @@ function Image($$anchor, $$props) {
5164
5165
  () => {
5165
5166
  $.set(style, objToStyle({
5166
5167
  ...props().borderTopLeftRadius ? toCssRadius(props()) : IMAGE_ROUND_STYLES[props().shape ?? 'square'],
5167
- width: props().width ?? '100%',
5168
+ width,
5169
+ flexShrink: String(width).indexOf('px') !== -1 ? 0 : 1,
5168
5170
  height: props().height ?? 'auto',
5169
5171
  aspectRatio: props().aspect ?? aspectVariantStyles?.aspect,
5170
5172
  ...toCssCommon(props()),
@@ -5191,7 +5193,7 @@ function Image($$anchor, $$props) {
5191
5193
  style: $.get(style),
5192
5194
  'data-layer-id': layerId()
5193
5195
  },
5194
- 'svelte-gzaieg'
5196
+ 'svelte-rewdem'
5195
5197
  ));
5196
5198
 
5197
5199
  $.event('click', $$element, handleClick);
@@ -6230,7 +6232,6 @@ function Modal($$anchor, $$props) {
6230
6232
  const backgroundClickSP = $.mutable_state();
6231
6233
  const handle_keydown = $.mutable_state();
6232
6234
  const visible = $.mutable_state();
6233
- const style = $.mutable_state();
6234
6235
  let useBreakPoint = $.prop($$props, 'useBreakPoint', 8, false);
6235
6236
  let placement = $.prop($$props, 'placement', 8);
6236
6237
  let breakPoint = $.prop($$props, 'breakPoint', 8);
@@ -6241,8 +6242,7 @@ function Modal($$anchor, $$props) {
6241
6242
  let closeEventValue = $.prop($$props, 'closeEventValue', 8, null);
6242
6243
  let layerId = $.prop($$props, 'layerId', 8, '');
6243
6244
  const { brandKit } = useBrandKit();
6244
- // falseが明示的に指定されている場合以外はtrueにする
6245
- const isOnSite = (document.querySelector('#preview')?.getAttribute('data-on-site') ?? 'true') !== 'false';
6245
+ const isCanvasPreview = (document.querySelector('#preview')?.getAttribute('data-canvas-preview') ?? 'false') === 'true';
6246
6246
  // モーダル背景の設定
6247
6247
  const isExistBackgroundOverlayValue = placement() && placement().backgroundOverlay !== undefined;
6248
6248
  let backgroundOverlay = $.mutable_state(DefaultModalPlacement.backgroundOverlay);
@@ -6288,7 +6288,7 @@ function Modal($$anchor, $$props) {
6288
6288
  $.deep_read_state(breakPoint())
6289
6289
  ),
6290
6290
  () => {
6291
- if (isOnSite && isExistBackgroundOverlayValue) {
6291
+ if (!isCanvasPreview && isExistBackgroundOverlayValue) {
6292
6292
  $.set(backgroundOverlay, placement().backgroundOverlay);
6293
6293
  }
6294
6294
 
@@ -6394,7 +6394,7 @@ function Modal($$anchor, $$props) {
6394
6394
  // 表示位置のスタイルの設定
6395
6395
  let position = DefaultModalPlacement.position;
6396
6396
 
6397
- if (isOnSite && placement() && placement().position !== null) {
6397
+ if (!isCanvasPreview && placement() && placement().position !== null) {
6398
6398
  position = placement().position;
6399
6399
  }
6400
6400
 
@@ -6411,7 +6411,7 @@ function Modal($$anchor, $$props) {
6411
6411
  $.set(transforms, []);
6412
6412
 
6413
6413
  DEVICE_IDS.forEach((deviceId) => {
6414
- if (isOnSite && useBreakPoint()) {
6414
+ if (!isCanvasPreview && useBreakPoint()) {
6415
6415
  const positionWithBp = breakPoint()[deviceId]?.placement?.position;
6416
6416
 
6417
6417
  $.get(transforms).push({
@@ -6441,12 +6441,13 @@ function Modal($$anchor, $$props) {
6441
6441
  $.deep_read_state(placement()),
6442
6442
  $.deep_read_state(useBreakPoint()),
6443
6443
  $.deep_read_state(breakPoint()),
6444
- parseStyle
6444
+ $.deep_read_state(props()),
6445
+ toCssBorder
6445
6446
  ),
6446
6447
  () => {
6447
6448
  let margin = DefaultModalPlacement.margin;
6448
6449
 
6449
- if (isOnSite && placement() && placement().margin !== null) {
6450
+ if (!isCanvasPreview && placement() && placement().margin !== null) {
6450
6451
  margin = placement().margin;
6451
6452
  }
6452
6453
 
@@ -6457,7 +6458,7 @@ function Modal($$anchor, $$props) {
6457
6458
  }
6458
6459
 
6459
6460
  DEVICE_IDS.forEach((deviceId) => {
6460
- if (isOnSite && useBreakPoint()) {
6461
+ if (!isCanvasPreview && useBreakPoint()) {
6461
6462
  const marginWithBp = breakPoint()[deviceId]?.placement?.margin;
6462
6463
 
6463
6464
  marginStyle = getMarginStyle(marginWithBp);
@@ -6471,6 +6472,18 @@ function Modal($$anchor, $$props) {
6471
6472
 
6472
6473
  modalStyles.add(marginVariables);
6473
6474
  });
6475
+
6476
+ const propsStyle = objToStyle({
6477
+ width: props().width,
6478
+ ...toCssOverflow(props()),
6479
+ ...toCssShadow(props()),
6480
+ ...toCssRadius(props()),
6481
+ ...toCssBackgroundImage(props()),
6482
+ ...toCssBackgroundColor(props()),
6483
+ ...toCssBorder(props())
6484
+ });
6485
+
6486
+ modalStyles.add(propsStyle);
6474
6487
  }
6475
6488
  );
6476
6489
 
@@ -6486,24 +6499,6 @@ function Modal($$anchor, $$props) {
6486
6499
  $.set(visible, false);
6487
6500
  });
6488
6501
 
6489
- $.legacy_pre_effect(
6490
- () => (
6491
- $.deep_read_state(props()),
6492
- toCssBorder
6493
- ),
6494
- () => {
6495
- $.set(style, objToStyle({
6496
- width: props().width,
6497
- ...toCssOverflow(props()),
6498
- ...toCssShadow(props()),
6499
- ...toCssRadius(props()),
6500
- ...toCssBackgroundImage(props()),
6501
- ...toCssBackgroundColor(props()),
6502
- ...toCssBorder(props())
6503
- }));
6504
- }
6505
- );
6506
-
6507
6502
  $.legacy_pre_effect_reset();
6508
6503
  $.init();
6509
6504
 
@@ -6577,7 +6572,7 @@ function Modal($$anchor, $$props) {
6577
6572
  };
6578
6573
 
6579
6574
  $.if(node, ($$render) => {
6580
- if (!isOnSite) $$render(consequent); else $$render(alternate, false);
6575
+ if (isCanvasPreview) $$render(consequent); else $$render(alternate, false);
6581
6576
  });
6582
6577
  }
6583
6578
 
@@ -6603,10 +6598,7 @@ function Modal($$anchor, $$props) {
6603
6598
  'modal',
6604
6599
  useBreakPoint() ? 'modal-bp' : ''
6605
6600
  ].join(' ')),
6606
- () => [
6607
- Array.from(modalStyles).join(';'),
6608
- $.get(style)
6609
- ].join(' ')
6601
+ () => Array.from(modalStyles).join(';')
6610
6602
  ],
6611
6603
  $.derived_safe_equal
6612
6604
  );