@plaidev/karte-action-sdk 1.1.264-29046374.a006e69f → 1.1.264-29052187.465265af

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.
@@ -5181,6 +5181,27 @@ const ICON_SIZE_STYLES = {
5181
5181
  },
5182
5182
  };
5183
5183
 
5184
+ const IMAGE_ROUND_STYLES = {
5185
+ square: {
5186
+ borderTopLeftRadius: 0,
5187
+ borderTopRightRadius: 0,
5188
+ borderBottomLeftRadius: 0,
5189
+ borderBottomRightRadius: 0,
5190
+ },
5191
+ rounded: {
5192
+ borderTopLeftRadius: '0.4em',
5193
+ borderTopRightRadius: '0.4em',
5194
+ borderBottomLeftRadius: '0.4em',
5195
+ borderBottomRightRadius: '0.4em',
5196
+ },
5197
+ circle: {
5198
+ borderTopLeftRadius: '0.8em',
5199
+ borderTopRightRadius: '0.8em',
5200
+ borderBottomLeftRadius: '0.8em',
5201
+ borderBottomRightRadius: '0.8em',
5202
+ },
5203
+ };
5204
+
5184
5205
  var root_1$3 = $.template(`<img class="image-img svelte-gzaieg">`);
5185
5206
 
5186
5207
  const $$css$g = {
@@ -5199,15 +5220,6 @@ function Image($$anchor, $$props) {
5199
5220
  useInjectCustomizeCss(props());
5200
5221
 
5201
5222
  const { attributes, element, handleClick } = useClickable(props());
5202
-
5203
- const VARIANTS = {
5204
- shape: {
5205
- circle: { borderRadius: '0.8em' },
5206
- square: { borderRadius: 'none' },
5207
- rounded: { borderRadius: '0.4em' }
5208
- }
5209
- };
5210
-
5211
5223
  const aspectVariantStyles = ASPECT_VARIANT[props().aspectVariant]?.getProps();
5212
5224
 
5213
5225
  $.legacy_pre_effect(
@@ -5217,8 +5229,9 @@ function Image($$anchor, $$props) {
5217
5229
  ),
5218
5230
  () => {
5219
5231
  $.set(style, objToStyle({
5220
- ...VARIANTS.shape[props().shape ?? 'square'],
5232
+ ...props().borderTopLeftRadius ? toCssRadius(props()) : IMAGE_ROUND_STYLES[props().shape ?? 'square'],
5221
5233
  width: props().width ?? '100%',
5234
+ height: props().height ?? 'auto',
5222
5235
  aspectRatio: props().aspect ?? aspectVariantStyles?.aspect,
5223
5236
  ...toCssCommon(props()),
5224
5237
  ...toCssBorder(props())
@@ -5264,9 +5277,9 @@ function Image($$anchor, $$props) {
5264
5277
  }
5265
5278
 
5266
5279
  const IMAGE_ROUND_SHAPE = {
5267
- circle: 'サークル',
5280
+ circle: 'ラウンド / ミディアム',
5281
+ rounded: 'ラウンド / スモール',
5268
5282
  square: 'スクエア',
5269
- rounded: 'ラウンド',
5270
5283
  };
5271
5284
  const IMAGE_ASPECT_VARIANTS = {
5272
5285
  '1/1': '1 : 1',
@@ -5444,8 +5457,6 @@ function Slider($$anchor, $$props) {
5444
5457
  };
5445
5458
 
5446
5459
  const handleClick = (e) => {
5447
- console.log('handleClick', isDragging);
5448
-
5449
5460
  if (isDragging) {
5450
5461
  e.preventDefault();
5451
5462
  e.stopPropagation();
@@ -5470,6 +5481,7 @@ function Slider($$anchor, $$props) {
5470
5481
  $.set(movedX, null);
5471
5482
  document.removeEventListener('touchmove', handleTouchmove);
5472
5483
  document.removeEventListener('touchend', handleTouchend);
5484
+ document.removeEventListener('click', handleClick);
5473
5485
  };
5474
5486
 
5475
5487
  const handleTouchstart = (e) => {
@@ -5489,8 +5501,6 @@ function Slider($$anchor, $$props) {
5489
5501
  };
5490
5502
 
5491
5503
  const handleMouseup = (e) => {
5492
- console.log('handleMouseup');
5493
-
5494
5504
  if ($.get(movedX) >= 32) {
5495
5505
  toNext();
5496
5506
  } else if ($.get(movedX) <= -32) {
@@ -6286,11 +6296,13 @@ function Modal($$anchor, $$props) {
6286
6296
  const backgroundClickSP = $.mutable_state();
6287
6297
  const handle_keydown = $.mutable_state();
6288
6298
  const visible = $.mutable_state();
6299
+ const style = $.mutable_state();
6289
6300
  let useBreakPoint = $.prop($$props, 'useBreakPoint', 8, false);
6290
6301
  let placement = $.prop($$props, 'placement', 8);
6291
6302
  let breakPoint = $.prop($$props, 'breakPoint', 8);
6292
6303
  let elasticity = $.prop($$props, 'elasticity', 8);
6293
6304
  let animation = $.prop($$props, 'animation', 8, 'none');
6305
+ let props = $.prop($$props, 'props', 24, () => ({}));
6294
6306
  let closeEventName = $.prop($$props, 'closeEventName', 8, '');
6295
6307
  let closeEventValue = $.prop($$props, 'closeEventValue', 8, null);
6296
6308
  let layerId = $.prop($$props, 'layerId', 8, '');
@@ -6570,6 +6582,24 @@ function Modal($$anchor, $$props) {
6570
6582
  $.set(visible, false);
6571
6583
  });
6572
6584
 
6585
+ $.legacy_pre_effect(
6586
+ () => (
6587
+ $.deep_read_state(props()),
6588
+ toCssBorder
6589
+ ),
6590
+ () => {
6591
+ $.set(style, objToStyle({
6592
+ width: props().width,
6593
+ ...toCssOverflow(props()),
6594
+ ...toCssShadow(props()),
6595
+ ...toCssRadius(props()),
6596
+ ...toCssBackgroundImage(props()),
6597
+ ...toCssBackgroundColor(props()),
6598
+ ...toCssBorder(props())
6599
+ }));
6600
+ }
6601
+ );
6602
+
6573
6603
  $.legacy_pre_effect_reset();
6574
6604
  $.init();
6575
6605
 
@@ -6668,7 +6698,10 @@ function Modal($$anchor, $$props) {
6668
6698
  'modal',
6669
6699
  useBreakPoint() ? 'modal-bp' : ''
6670
6700
  ].join(' ')),
6671
- () => Array.from(modalStyles).join(';')
6701
+ () => [
6702
+ Array.from(modalStyles).join(';'),
6703
+ $.get(style)
6704
+ ].join(' ')
6672
6705
  ],
6673
6706
  $.derived_safe_equal
6674
6707
  );
@@ -6757,95 +6790,23 @@ function Code($$anchor, $$props) {
6757
6790
 
6758
6791
  const LIST_ITEM_CONTEXT_KEY = 'ListItemContext';
6759
6792
 
6760
- var root$7 = $.template(`<ul class="list svelte-v2vy6p"><!></ul>`);
6793
+ var root$7 = $.template(`<li class="list-item svelte-1223veg"><!></li>`);
6761
6794
 
6762
6795
  const $$css$6 = {
6763
- hash: 'svelte-v2vy6p',
6764
- code: '.list.svelte-v2vy6p {padding:0;margin:0;list-style:none;display:flex;flex-direction:column;--border-width: 0;--border-style: solit;--border-color: rgba(255, 255, 255, 0);border-top-width:var(--border-width);border-top-style:var(--border-style);border-top-color:var(--border-color);border-bottom-width:var(--border-width);border-bottom-style:var(--border-style);border-bottom-color:var(--border-color);}'
6765
- };
6766
-
6767
- function List($$anchor, $$props) {
6768
- $.push($$props, false);
6769
- $.append_styles($$anchor, $$css$6);
6770
-
6771
- const variables = $.mutable_state();
6772
- const style = $.mutable_state();
6773
- let layerId = $.prop($$props, 'layerId', 8);
6774
- let props = $.prop($$props, 'props', 8);
6775
-
6776
- useInjectCustomizeCss(props());
6777
-
6778
- setContext(LIST_ITEM_CONTEXT_KEY, {
6779
- paddingTop: props().itemPaddingTop,
6780
- paddingLeft: props().itemPaddingLeft,
6781
- paddingRight: props().itemPaddingRight,
6782
- paddingBottom: props().itemPaddingBottom,
6783
- height: props().itemHeight,
6784
- borderTopWidth: props().borderWidth,
6785
- borderTopColor: props().borderColor,
6786
- borderTopStyle: props().borderStyle,
6787
- gap: props().itemGap
6788
- });
6789
-
6790
- $.legacy_pre_effect(() => ($.deep_read_state(props())), () => {
6791
- $.set(variables, {
6792
- ...props().borderWidth
6793
- ? {
6794
- '--border-width': props().borderWidth,
6795
- '--border-color': props().borderColor,
6796
- '--border-style': props().borderStyle ?? 'solid'
6797
- }
6798
- : {}
6799
- });
6800
- });
6801
-
6802
- $.legacy_pre_effect(
6803
- () => (
6804
- $.deep_read_state(props()),
6805
- $.get(variables)
6806
- ),
6807
- () => {
6808
- $.set(style, objToStyle({
6809
- width: props().width ?? '100%',
6810
- ...$.get(variables)
6811
- }));
6812
- }
6813
- );
6814
-
6815
- $.legacy_pre_effect_reset();
6816
- $.init();
6817
-
6818
- var ul = root$7();
6819
- var node = $.child(ul);
6820
-
6821
- $.slot(node, $$props, 'default', {}, null);
6822
- $.reset(ul);
6823
-
6824
- $.template_effect(() => {
6825
- $.set_attribute(ul, 'data-layer-id', layerId());
6826
- $.set_style(ul, $.get(style));
6827
- });
6828
-
6829
- $.append($$anchor, ul);
6830
- $.pop();
6831
- }
6832
-
6833
- var root$6 = $.template(`<li class="list-item svelte-1223veg"><!></li>`);
6834
-
6835
- const $$css$5 = {
6836
6796
  hash: 'svelte-1223veg',
6837
6797
  code: '.list-item.svelte-1223veg {margin:0;padding:0;}.list-item-inner.svelte-1223veg {display:flex;align-items:center;width:100%;text-decoration:none;color:inherit;}.list-item-inner.svelte-1223veg:hover {opacity:0.8;}.list-item.svelte-1223veg:not(:first-child) {border-top-width:var(--list-item-border-width);border-top-style:var(--list-item-border-style);border-top-color:var(--list-item-border-color);}'
6838
6798
  };
6839
6799
 
6840
6800
  function ListItem($$anchor, $$props) {
6841
6801
  $.push($$props, false);
6842
- $.append_styles($$anchor, $$css$5);
6802
+ $.append_styles($$anchor, $$css$6);
6843
6803
 
6844
6804
  const variables = $.mutable_state();
6845
6805
  const style = $.mutable_state();
6846
6806
  const innerStyle = $.mutable_state();
6847
6807
  let layerId = $.prop($$props, 'layerId', 8);
6848
6808
  let props = $.prop($$props, 'props', 8);
6809
+ $.prop($$props, 'item', 8);
6849
6810
 
6850
6811
  useInjectCustomizeCss(props());
6851
6812
 
@@ -6881,7 +6842,7 @@ function ListItem($$anchor, $$props) {
6881
6842
  $.legacy_pre_effect_reset();
6882
6843
  $.init();
6883
6844
 
6884
- var li = root$6();
6845
+ var li = root$7();
6885
6846
  var node = $.child(li);
6886
6847
 
6887
6848
  $.element(node, () => element, false, ($$element, $$anchor) => {
@@ -6918,6 +6879,95 @@ function ListItem($$anchor, $$props) {
6918
6879
  $.pop();
6919
6880
  }
6920
6881
 
6882
+ var root$6 = $.template(`<ul class="list svelte-v2vy6p"><!></ul>`);
6883
+
6884
+ const $$css$5 = {
6885
+ hash: 'svelte-v2vy6p',
6886
+ code: '.list.svelte-v2vy6p {padding:0;margin:0;list-style:none;display:flex;flex-direction:column;--border-width: 0;--border-style: solit;--border-color: rgba(255, 255, 255, 0);border-top-width:var(--border-width);border-top-style:var(--border-style);border-top-color:var(--border-color);border-bottom-width:var(--border-width);border-bottom-style:var(--border-style);border-bottom-color:var(--border-color);}'
6887
+ };
6888
+
6889
+ function List($$anchor, $$props) {
6890
+ $.push($$props, false);
6891
+ $.append_styles($$anchor, $$css$5);
6892
+
6893
+ const variables = $.mutable_state();
6894
+ const actionTableData = $.mutable_state();
6895
+ const items = $.mutable_state();
6896
+ const style = $.mutable_state();
6897
+ let layerId = $.prop($$props, 'layerId', 8);
6898
+ let props = $.prop($$props, 'props', 8);
6899
+
6900
+ useInjectCustomizeCss(props());
6901
+
6902
+ const vars = getVariables();
6903
+
6904
+ console.log(vars);
6905
+ console.log(props().actionTableKey);
6906
+ console.log(vars[props().actionTableKey]);
6907
+
6908
+ setContext(LIST_ITEM_CONTEXT_KEY, {
6909
+ paddingTop: props().itemPaddingTop,
6910
+ paddingLeft: props().itemPaddingLeft,
6911
+ paddingRight: props().itemPaddingRight,
6912
+ paddingBottom: props().itemPaddingBottom,
6913
+ height: props().itemHeight,
6914
+ borderTopWidth: props().borderWidth,
6915
+ borderTopColor: props().borderColor,
6916
+ borderTopStyle: props().borderStyle,
6917
+ gap: props().itemGap
6918
+ });
6919
+
6920
+ $.legacy_pre_effect(() => ($.deep_read_state(props())), () => {
6921
+ $.set(variables, {
6922
+ ...props().borderWidth
6923
+ ? {
6924
+ '--border-width': props().borderWidth,
6925
+ '--border-color': props().borderColor,
6926
+ '--border-style': props().borderStyle ?? 'solid'
6927
+ }
6928
+ : {}
6929
+ });
6930
+ });
6931
+
6932
+ $.legacy_pre_effect(() => ($.deep_read_state(props())), () => {
6933
+ $.set(actionTableData, vars[props().actionTableKey]);
6934
+ });
6935
+
6936
+ $.legacy_pre_effect(() => ($.get(actionTableData)), () => {
6937
+ $.set(items, Array.isArray($.get(actionTableData)) ? $.get(actionTableData) : null);
6938
+ });
6939
+
6940
+ $.legacy_pre_effect(
6941
+ () => (
6942
+ $.deep_read_state(props()),
6943
+ $.get(variables)
6944
+ ),
6945
+ () => {
6946
+ $.set(style, objToStyle({
6947
+ width: props().width ?? '100%',
6948
+ ...$.get(variables)
6949
+ }));
6950
+ }
6951
+ );
6952
+
6953
+ $.legacy_pre_effect_reset();
6954
+ $.init();
6955
+
6956
+ var ul = root$6();
6957
+ var node = $.child(ul);
6958
+
6959
+ $.slot(node, $$props, 'default', {}, null);
6960
+ $.reset(ul);
6961
+
6962
+ $.template_effect(() => {
6963
+ $.set_attribute(ul, 'data-layer-id', layerId());
6964
+ $.set_style(ul, $.get(style));
6965
+ });
6966
+
6967
+ $.append($$anchor, ul);
6968
+ $.pop();
6969
+ }
6970
+
6921
6971
  const MULTI_COLUMN_ITEM_CONTEXT_KEY = 'MultiColumnItemContext';
6922
6972
 
6923
6973
  function splitNumberAndUnit(value) {
@@ -7039,8 +7089,6 @@ function MultiColumnItem($$anchor, $$props) {
7039
7089
  const { attributes, element, handleClick } = useClickable(props());
7040
7090
  const context = getContext(MULTI_COLUMN_ITEM_CONTEXT_KEY) || {};
7041
7091
 
7042
- console.log(context);
7043
-
7044
7092
  $.legacy_pre_effect(() => {}, () => {
7045
7093
  $.set(variables, {
7046
7094
  '--multi-column-item-padding-top': context.paddingTop ?? '0',
@@ -7274,12 +7322,6 @@ function CountDown($$anchor, $$props) {
7274
7322
  }
7275
7323
 
7276
7324
  function onEachSecond() {
7277
- console.log({
7278
- timeLimit: timeLimit.getTime(),
7279
- now: new Date().getTime(),
7280
- calced: calcRemainingTime(timeLimit.getTime())
7281
- });
7282
-
7283
7325
  const _remainingTime = calcRemainingTime(timeLimit.getTime());
7284
7326
 
7285
7327
  if (_remainingTime > 0) {
@@ -7291,8 +7333,6 @@ function CountDown($$anchor, $$props) {
7291
7333
  execOnClickOperation(props().onEnd);
7292
7334
  }
7293
7335
  }
7294
-
7295
- console.log($.get(remainingTime));
7296
7336
  }
7297
7337
 
7298
7338
  onMount$1(() => {
@@ -7443,13 +7483,8 @@ function CountDownValue($$anchor, $$props) {
7443
7483
  let props = $.prop($$props, 'props', 24, () => ({}));
7444
7484
  let layerId = $.prop($$props, 'layerId', 8, '');
7445
7485
  let countdownStore = getContext('countdownStore');
7446
-
7447
- console.log(countdownStore);
7448
-
7449
7486
  let { style } = useText(props());
7450
7487
 
7451
- console.log($.get(value));
7452
-
7453
7488
  $.legacy_pre_effect(
7454
7489
  () => (
7455
7490
  $countdownStore(),
@@ -7524,7 +7559,6 @@ function ClipCopy($$anchor, $$props) {
7524
7559
 
7525
7560
  const targetText = props().content ?? $.get(buttonElement)?.innerText ?? '';
7526
7561
 
7527
- console.log(targetText);
7528
7562
  navigator.clipboard.writeText(targetText);
7529
7563
  send_event('_click_copy', { text: targetText });
7530
7564
 
@@ -7692,6 +7726,7 @@ var sdk = /*#__PURE__*/Object.freeze({
7692
7726
  ICON_VARIANTS: ICON_VARIANTS,
7693
7727
  IMAGE_ASPECT_VARIANTS: IMAGE_ASPECT_VARIANTS,
7694
7728
  IMAGE_ROUND_SHAPE: IMAGE_ROUND_SHAPE,
7729
+ IMAGE_ROUND_STYLES: IMAGE_ROUND_STYLES,
7695
7730
  Justifies: Justifies,
7696
7731
  KARTE_MODAL_ROOT: KARTE_MODAL_ROOT,
7697
7732
  LAYER_TEXT_SIZE: LAYER_TEXT_SIZE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.264-29046374.a006e69f",
3
+ "version": "1.1.264-29052187.465265af",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",