@plaidev/karte-action-sdk 1.1.266 → 1.1.267-29071733.fabf64a6
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/hydrate/index.es.js +328 -255
- package/dist/index.es.js +279 -254
- package/dist/svelte5/hydrate/index.es.js +102 -43
- package/dist/svelte5/index.es.js +41 -41
- package/dist/svelte5/index.front2.es.js +41 -43
- package/package.json +1 -1
@@ -3467,7 +3467,7 @@ const EASING = {
|
|
3467
3467
|
none: linear,
|
3468
3468
|
};
|
3469
3469
|
/**
|
3470
|
-
* The function to activate svelte animation.
|
3470
|
+
* The function to activate svelte animation v2.
|
3471
3471
|
*
|
3472
3472
|
* @param node - A target node of animation. This argument is passed by svelte, by default.
|
3473
3473
|
* @param customAnimationOptions - A custom animation option object
|
@@ -3476,7 +3476,10 @@ const EASING = {
|
|
3476
3476
|
*
|
3477
3477
|
* @internal
|
3478
3478
|
*/
|
3479
|
-
function
|
3479
|
+
function customAnimationV2(node, { transforms, animationStyle, delay = 0, duration = 1000, disabled, }) {
|
3480
|
+
if (disabled) {
|
3481
|
+
return {};
|
3482
|
+
}
|
3480
3483
|
let [x, y] = [0, 0];
|
3481
3484
|
for (const { query, x: tx, y: ty } of transforms) {
|
3482
3485
|
if (query == null || window.matchMedia(query).matches) {
|
@@ -5251,11 +5254,11 @@ const IMAGE_ROUND_STYLES = {
|
|
5251
5254
|
},
|
5252
5255
|
};
|
5253
5256
|
|
5254
|
-
var root_1$3 = $.template(`<img class="image-img svelte-
|
5257
|
+
var root_1$3 = $.template(`<img class="image-img svelte-rewdem">`);
|
5255
5258
|
|
5256
5259
|
const $$css$g = {
|
5257
|
-
hash: 'svelte-
|
5258
|
-
code: '.image.svelte-
|
5260
|
+
hash: 'svelte-rewdem',
|
5261
|
+
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;}'
|
5259
5262
|
};
|
5260
5263
|
|
5261
5264
|
function Image($$anchor, $$props) {
|
@@ -5270,6 +5273,7 @@ function Image($$anchor, $$props) {
|
|
5270
5273
|
|
5271
5274
|
const { attributes, element, handleClick } = useClickable(props());
|
5272
5275
|
const aspectVariantStyles = ASPECT_VARIANT[props().aspectVariant]?.getProps();
|
5276
|
+
const width = props().width ?? '100%';
|
5273
5277
|
|
5274
5278
|
$.legacy_pre_effect(
|
5275
5279
|
() => (
|
@@ -5279,7 +5283,8 @@ function Image($$anchor, $$props) {
|
|
5279
5283
|
() => {
|
5280
5284
|
$.set(style, objToStyle({
|
5281
5285
|
...props().borderTopLeftRadius ? toCssRadius(props()) : IMAGE_ROUND_STYLES[props().shape ?? 'square'],
|
5282
|
-
width
|
5286
|
+
width,
|
5287
|
+
flexShrink: String(width).indexOf('px') !== -1 ? 0 : 1,
|
5283
5288
|
height: props().height ?? 'auto',
|
5284
5289
|
aspectRatio: props().aspect ?? aspectVariantStyles?.aspect,
|
5285
5290
|
...toCssCommon(props()),
|
@@ -5306,7 +5311,7 @@ function Image($$anchor, $$props) {
|
|
5306
5311
|
style: $.get(style),
|
5307
5312
|
'data-layer-id': layerId()
|
5308
5313
|
},
|
5309
|
-
'svelte-
|
5314
|
+
'svelte-rewdem'
|
5310
5315
|
));
|
5311
5316
|
|
5312
5317
|
$.event('click', $$element, handleClick);
|
@@ -6345,7 +6350,6 @@ function Modal($$anchor, $$props) {
|
|
6345
6350
|
const backgroundClickSP = $.mutable_state();
|
6346
6351
|
const handle_keydown = $.mutable_state();
|
6347
6352
|
const visible = $.mutable_state();
|
6348
|
-
const style = $.mutable_state();
|
6349
6353
|
let useBreakPoint = $.prop($$props, 'useBreakPoint', 8, false);
|
6350
6354
|
let placement = $.prop($$props, 'placement', 8);
|
6351
6355
|
let breakPoint = $.prop($$props, 'breakPoint', 8);
|
@@ -6356,8 +6360,11 @@ function Modal($$anchor, $$props) {
|
|
6356
6360
|
let closeEventValue = $.prop($$props, 'closeEventValue', 8, null);
|
6357
6361
|
let layerId = $.prop($$props, 'layerId', 8, '');
|
6358
6362
|
const { brandKit } = useBrandKit();
|
6359
|
-
|
6360
|
-
const isOnSite = (document.querySelector('#preview')?.getAttribute('data-on-site') ?? 'true')
|
6363
|
+
const isCanvasPreview = (document.querySelector('#preview')?.getAttribute('data-canvas-preview') ?? 'false') === 'true';
|
6364
|
+
const isOnSite = (document.querySelector('#preview')?.getAttribute('data-on-site') ?? 'true') === 'true';
|
6365
|
+
|
6366
|
+
console.log('isOnSite', isOnSite);
|
6367
|
+
|
6361
6368
|
// モーダル背景の設定
|
6362
6369
|
const isExistBackgroundOverlayValue = placement() && placement().backgroundOverlay !== undefined;
|
6363
6370
|
let backgroundOverlay = $.mutable_state(DefaultModalPlacement.backgroundOverlay);
|
@@ -6403,7 +6410,7 @@ function Modal($$anchor, $$props) {
|
|
6403
6410
|
$.deep_read_state(breakPoint())
|
6404
6411
|
),
|
6405
6412
|
() => {
|
6406
|
-
if (
|
6413
|
+
if (!isCanvasPreview && isExistBackgroundOverlayValue) {
|
6407
6414
|
$.set(backgroundOverlay, placement().backgroundOverlay);
|
6408
6415
|
}
|
6409
6416
|
|
@@ -6509,7 +6516,7 @@ function Modal($$anchor, $$props) {
|
|
6509
6516
|
// 表示位置のスタイルの設定
|
6510
6517
|
let position = DefaultModalPlacement.position;
|
6511
6518
|
|
6512
|
-
if (
|
6519
|
+
if (!isCanvasPreview && placement() && placement().position !== null) {
|
6513
6520
|
position = placement().position;
|
6514
6521
|
}
|
6515
6522
|
|
@@ -6526,7 +6533,7 @@ function Modal($$anchor, $$props) {
|
|
6526
6533
|
$.set(transforms, []);
|
6527
6534
|
|
6528
6535
|
DEVICE_IDS.forEach((deviceId) => {
|
6529
|
-
if (
|
6536
|
+
if (!isCanvasPreview && useBreakPoint()) {
|
6530
6537
|
const positionWithBp = breakPoint()[deviceId]?.placement?.position;
|
6531
6538
|
|
6532
6539
|
$.get(transforms).push({
|
@@ -6556,12 +6563,13 @@ function Modal($$anchor, $$props) {
|
|
6556
6563
|
$.deep_read_state(placement()),
|
6557
6564
|
$.deep_read_state(useBreakPoint()),
|
6558
6565
|
$.deep_read_state(breakPoint()),
|
6559
|
-
|
6566
|
+
$.deep_read_state(props()),
|
6567
|
+
toCssBorder
|
6560
6568
|
),
|
6561
6569
|
() => {
|
6562
6570
|
let margin = DefaultModalPlacement.margin;
|
6563
6571
|
|
6564
|
-
if (
|
6572
|
+
if (!isCanvasPreview && placement() && placement().margin !== null) {
|
6565
6573
|
margin = placement().margin;
|
6566
6574
|
}
|
6567
6575
|
|
@@ -6572,7 +6580,7 @@ function Modal($$anchor, $$props) {
|
|
6572
6580
|
}
|
6573
6581
|
|
6574
6582
|
DEVICE_IDS.forEach((deviceId) => {
|
6575
|
-
if (
|
6583
|
+
if (!isCanvasPreview && useBreakPoint()) {
|
6576
6584
|
const marginWithBp = breakPoint()[deviceId]?.placement?.margin;
|
6577
6585
|
|
6578
6586
|
marginStyle = getMarginStyle(marginWithBp);
|
@@ -6586,6 +6594,18 @@ function Modal($$anchor, $$props) {
|
|
6586
6594
|
|
6587
6595
|
modalStyles.add(marginVariables);
|
6588
6596
|
});
|
6597
|
+
|
6598
|
+
const propsStyle = objToStyle({
|
6599
|
+
width: props().width,
|
6600
|
+
...toCssOverflow(props()),
|
6601
|
+
...toCssShadow(props()),
|
6602
|
+
...toCssRadius(props()),
|
6603
|
+
...toCssBackgroundImage(props()),
|
6604
|
+
...toCssBackgroundColor(props()),
|
6605
|
+
...toCssBorder(props())
|
6606
|
+
});
|
6607
|
+
|
6608
|
+
modalStyles.add(propsStyle);
|
6589
6609
|
}
|
6590
6610
|
);
|
6591
6611
|
|
@@ -6601,24 +6621,6 @@ function Modal($$anchor, $$props) {
|
|
6601
6621
|
$.set(visible, false);
|
6602
6622
|
});
|
6603
6623
|
|
6604
|
-
$.legacy_pre_effect(
|
6605
|
-
() => (
|
6606
|
-
$.deep_read_state(props()),
|
6607
|
-
toCssBorder
|
6608
|
-
),
|
6609
|
-
() => {
|
6610
|
-
$.set(style, objToStyle({
|
6611
|
-
width: props().width,
|
6612
|
-
...toCssOverflow(props()),
|
6613
|
-
...toCssShadow(props()),
|
6614
|
-
...toCssRadius(props()),
|
6615
|
-
...toCssBackgroundImage(props()),
|
6616
|
-
...toCssBackgroundColor(props()),
|
6617
|
-
...toCssBorder(props())
|
6618
|
-
}));
|
6619
|
-
}
|
6620
|
-
);
|
6621
|
-
|
6622
6624
|
$.legacy_pre_effect_reset();
|
6623
6625
|
$.init();
|
6624
6626
|
|
@@ -6692,7 +6694,7 @@ function Modal($$anchor, $$props) {
|
|
6692
6694
|
};
|
6693
6695
|
|
6694
6696
|
$.if(node, ($$render) => {
|
6695
|
-
if (
|
6697
|
+
if (isCanvasPreview) $$render(consequent); else $$render(alternate, false);
|
6696
6698
|
});
|
6697
6699
|
}
|
6698
6700
|
|
@@ -6718,17 +6720,15 @@ function Modal($$anchor, $$props) {
|
|
6718
6720
|
'modal',
|
6719
6721
|
useBreakPoint() ? 'modal-bp' : ''
|
6720
6722
|
].join(' ')),
|
6721
|
-
() =>
|
6722
|
-
Array.from(modalStyles).join(';'),
|
6723
|
-
$.get(style)
|
6724
|
-
].join(' ')
|
6723
|
+
() => Array.from(modalStyles).join(';')
|
6725
6724
|
],
|
6726
6725
|
$.derived_safe_equal
|
6727
6726
|
);
|
6728
6727
|
|
6729
|
-
$.transition(1, div, () =>
|
6728
|
+
$.transition(1, div, () => customAnimationV2, () => ({
|
6730
6729
|
transforms: $.get(transforms),
|
6731
|
-
animationStyle: animation()
|
6730
|
+
animationStyle: animation(),
|
6731
|
+
disabled: !isOnSite
|
6732
6732
|
}));
|
6733
6733
|
|
6734
6734
|
$.append($$anchor, div);
|
@@ -8052,8 +8052,6 @@ function ThumbnailPreview($$anchor, $$props) {
|
|
8052
8052
|
let option = $.prop($$props, 'option', 24, () => ({}));
|
8053
8053
|
let customBrandKit = $.prop($$props, 'customBrandKit', 8, undefined);
|
8054
8054
|
|
8055
|
-
console.log('option', option());
|
8056
|
-
|
8057
8055
|
const getComponent = (key) => {
|
8058
8056
|
return key in sdk ? sdk[key] : null;
|
8059
8057
|
};
|