@cntrl-site/sdk 1.22.7 → 1.22.9-alpha.0

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.d.ts CHANGED
@@ -13,7 +13,7 @@ export type { Item, ImageItem, ItemAny, CustomItem, ItemCommonParamsMap, ItemLay
13
13
  export type { RichTextBlock, RichTextEntity, RichTextStyle } from './types/article/RichText';
14
14
  export type { ItemArea } from './types/article/ItemArea';
15
15
  export type { ItemState, ItemStateParams, StateParams, ItemStatesMap } from './types/article/ItemState';
16
- export type { Interaction, InteractionTrigger, InteractionState } from './types/article/Interaction';
16
+ export type { Interaction, InteractionItemTrigger, InteractionScrollTrigger, InteractionState } from './types/article/Interaction';
17
17
  export type { Layout } from './types/project/Layout';
18
18
  export type { Project } from './types/project/Project';
19
19
  export type { Meta } from './types/project/Meta';
package/dist/index.js CHANGED
@@ -542,6 +542,12 @@ const TriggerSchema = zod.z.object({
542
542
  from: zod.z.string(),
543
543
  to: zod.z.string()
544
544
  });
545
+ const ScrollTriggerSchema = zod.z.object({
546
+ position: zod.z.number(),
547
+ from: zod.z.string(),
548
+ to: zod.z.string(),
549
+ isReverse: zod.z.boolean()
550
+ });
545
551
  const VideoInteractionActionSchema = zod.z.object({
546
552
  type: zod.z.enum(["play", "pause"]),
547
553
  itemId: zod.z.string()
@@ -552,7 +558,7 @@ const StateSchema = zod.z.object({
552
558
  });
553
559
  const InteractionSchema = zod.z.object({
554
560
  id: zod.z.string(),
555
- triggers: zod.z.array(TriggerSchema),
561
+ triggers: zod.z.array(zod.z.union([TriggerSchema, ScrollTriggerSchema])),
556
562
  states: zod.z.array(StateSchema),
557
563
  startStateId: zod.z.string()
558
564
  });
package/dist/index.mjs CHANGED
@@ -523,6 +523,12 @@ const TriggerSchema = z.object({
523
523
  from: z.string(),
524
524
  to: z.string()
525
525
  });
526
+ const ScrollTriggerSchema = z.object({
527
+ position: z.number(),
528
+ from: z.string(),
529
+ to: z.string(),
530
+ isReverse: z.boolean()
531
+ });
526
532
  const VideoInteractionActionSchema = z.object({
527
533
  type: z.enum(["play", "pause"]),
528
534
  itemId: z.string()
@@ -533,7 +539,7 @@ const StateSchema = z.object({
533
539
  });
534
540
  const InteractionSchema = z.object({
535
541
  id: z.string(),
536
- triggers: z.array(TriggerSchema),
542
+ triggers: z.array(z.union([TriggerSchema, ScrollTriggerSchema])),
537
543
  states: z.array(StateSchema),
538
544
  startStateId: z.string()
539
545
  });
@@ -76,7 +76,7 @@ export declare const ArticleSchema: z.ZodObject<{
76
76
  }>, "many">;
77
77
  interactions: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
78
78
  id: z.ZodString;
79
- triggers: z.ZodArray<z.ZodObject<{
79
+ triggers: z.ZodArray<z.ZodUnion<[z.ZodObject<{
80
80
  itemId: z.ZodString;
81
81
  type: z.ZodEnum<["hover-in", "hover-out", "click"]>;
82
82
  from: z.ZodString;
@@ -91,7 +91,22 @@ export declare const ArticleSchema: z.ZodObject<{
91
91
  from: string;
92
92
  to: string;
93
93
  itemId: string;
94
- }>, "many">;
94
+ }>, z.ZodObject<{
95
+ position: z.ZodNumber;
96
+ from: z.ZodString;
97
+ to: z.ZodString;
98
+ isReverse: z.ZodBoolean;
99
+ }, "strip", z.ZodTypeAny, {
100
+ position: number;
101
+ from: string;
102
+ to: string;
103
+ isReverse: boolean;
104
+ }, {
105
+ position: number;
106
+ from: string;
107
+ to: string;
108
+ isReverse: boolean;
109
+ }>]>, "many">;
95
110
  states: z.ZodArray<z.ZodObject<{
96
111
  id: z.ZodString;
97
112
  actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -120,12 +135,17 @@ export declare const ArticleSchema: z.ZodObject<{
120
135
  startStateId: z.ZodString;
121
136
  }, "strip", z.ZodTypeAny, {
122
137
  id: string;
123
- triggers: {
138
+ triggers: ({
124
139
  type: "hover-in" | "hover-out" | "click";
125
140
  from: string;
126
141
  to: string;
127
142
  itemId: string;
128
- }[];
143
+ } | {
144
+ position: number;
145
+ from: string;
146
+ to: string;
147
+ isReverse: boolean;
148
+ })[];
129
149
  states: {
130
150
  id: string;
131
151
  actions?: {
@@ -136,12 +156,17 @@ export declare const ArticleSchema: z.ZodObject<{
136
156
  startStateId: string;
137
157
  }, {
138
158
  id: string;
139
- triggers: {
159
+ triggers: ({
140
160
  type: "hover-in" | "hover-out" | "click";
141
161
  from: string;
142
162
  to: string;
143
163
  itemId: string;
144
- }[];
164
+ } | {
165
+ position: number;
166
+ from: string;
167
+ to: string;
168
+ isReverse: boolean;
169
+ })[];
145
170
  states: {
146
171
  id: string;
147
172
  actions?: {
@@ -174,12 +199,17 @@ export declare const ArticleSchema: z.ZodObject<{
174
199
  }[];
175
200
  interactions: Record<string, {
176
201
  id: string;
177
- triggers: {
202
+ triggers: ({
178
203
  type: "hover-in" | "hover-out" | "click";
179
204
  from: string;
180
205
  to: string;
181
206
  itemId: string;
182
- }[];
207
+ } | {
208
+ position: number;
209
+ from: string;
210
+ to: string;
211
+ isReverse: boolean;
212
+ })[];
183
213
  states: {
184
214
  id: string;
185
215
  actions?: {
@@ -212,12 +242,17 @@ export declare const ArticleSchema: z.ZodObject<{
212
242
  }[];
213
243
  interactions: Record<string, {
214
244
  id: string;
215
- triggers: {
245
+ triggers: ({
216
246
  type: "hover-in" | "hover-out" | "click";
217
247
  from: string;
218
248
  to: string;
219
249
  itemId: string;
220
- }[];
250
+ } | {
251
+ position: number;
252
+ from: string;
253
+ to: string;
254
+ isReverse: boolean;
255
+ })[];
221
256
  states: {
222
257
  id: string;
223
258
  actions?: {
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const InteractionSchema: z.ZodObject<{
3
3
  id: z.ZodString;
4
- triggers: z.ZodArray<z.ZodObject<{
4
+ triggers: z.ZodArray<z.ZodUnion<[z.ZodObject<{
5
5
  itemId: z.ZodString;
6
6
  type: z.ZodEnum<["hover-in", "hover-out", "click"]>;
7
7
  from: z.ZodString;
@@ -16,7 +16,22 @@ export declare const InteractionSchema: z.ZodObject<{
16
16
  from: string;
17
17
  to: string;
18
18
  itemId: string;
19
- }>, "many">;
19
+ }>, z.ZodObject<{
20
+ position: z.ZodNumber;
21
+ from: z.ZodString;
22
+ to: z.ZodString;
23
+ isReverse: z.ZodBoolean;
24
+ }, "strip", z.ZodTypeAny, {
25
+ position: number;
26
+ from: string;
27
+ to: string;
28
+ isReverse: boolean;
29
+ }, {
30
+ position: number;
31
+ from: string;
32
+ to: string;
33
+ isReverse: boolean;
34
+ }>]>, "many">;
20
35
  states: z.ZodArray<z.ZodObject<{
21
36
  id: z.ZodString;
22
37
  actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -45,12 +60,17 @@ export declare const InteractionSchema: z.ZodObject<{
45
60
  startStateId: z.ZodString;
46
61
  }, "strip", z.ZodTypeAny, {
47
62
  id: string;
48
- triggers: {
63
+ triggers: ({
49
64
  type: "hover-in" | "hover-out" | "click";
50
65
  from: string;
51
66
  to: string;
52
67
  itemId: string;
53
- }[];
68
+ } | {
69
+ position: number;
70
+ from: string;
71
+ to: string;
72
+ isReverse: boolean;
73
+ })[];
54
74
  states: {
55
75
  id: string;
56
76
  actions?: {
@@ -61,12 +81,17 @@ export declare const InteractionSchema: z.ZodObject<{
61
81
  startStateId: string;
62
82
  }, {
63
83
  id: string;
64
- triggers: {
84
+ triggers: ({
65
85
  type: "hover-in" | "hover-out" | "click";
66
86
  from: string;
67
87
  to: string;
68
88
  itemId: string;
69
- }[];
89
+ } | {
90
+ position: number;
91
+ from: string;
92
+ to: string;
93
+ isReverse: boolean;
94
+ })[];
70
95
  states: {
71
96
  id: string;
72
97
  actions?: {
@@ -8,6 +8,12 @@ const TriggerSchema = zod_1.z.object({
8
8
  from: zod_1.z.string(),
9
9
  to: zod_1.z.string()
10
10
  });
11
+ const ScrollTriggerSchema = zod_1.z.object({
12
+ position: zod_1.z.number(),
13
+ from: zod_1.z.string(),
14
+ to: zod_1.z.string(),
15
+ isReverse: zod_1.z.boolean()
16
+ });
11
17
  const VideoInteractionActionSchema = zod_1.z.object({
12
18
  type: zod_1.z.enum(['play', 'pause']),
13
19
  itemId: zod_1.z.string()
@@ -18,7 +24,7 @@ const StateSchema = zod_1.z.object({
18
24
  });
19
25
  exports.InteractionSchema = zod_1.z.object({
20
26
  id: zod_1.z.string(),
21
- triggers: zod_1.z.array(TriggerSchema),
27
+ triggers: zod_1.z.array(zod_1.z.union([TriggerSchema, ScrollTriggerSchema])),
22
28
  states: zod_1.z.array(StateSchema),
23
29
  startStateId: zod_1.z.string(),
24
30
  });
package/dist/sdk.css CHANGED
@@ -1 +1 @@
1
- .ControlSlider-module__wrapper___sHEkd{position:relative;width:100%;height:100%}.ControlSlider-module__slider___R3i9-{width:100%;height:100%}.ControlSlider-module__sliderItems___1MgPL{display:flex;overflow:hidden;width:100%;height:100%;transition:transform .3s ease-in-out}.ControlSlider-module__sliderItem___QQSkR{width:100%;height:100%;display:flex;position:relative}.ControlSlider-module__sliderImage___9hRl-{width:100%;height:100%;object-fit:cover}.ControlSlider-module__arrow___05ghY{position:absolute;display:flex;align-items:center;justify-content:center;border:none;background-color:transparent;top:50%;left:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);z-index:1;transform:translate(-50%,-50%);padding:0;width:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw);height:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw)}.ControlSlider-module__arrow___05ghY.ControlSlider-module__arrowVertical___tBfVN{left:50%;top:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);transform:translate(-50%,-50%)}.ControlSlider-module__nextArrow___-30Yc{left:unset;right:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);transform:translate(50%,-50%)}.ControlSlider-module__nextArrow___-30Yc.ControlSlider-module__arrowVertical___tBfVN{left:50%;right:unset;top:unset;bottom:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);transform:translate(-50%,50%)}.ControlSlider-module__arrowInner___aEra3{all:unset;cursor:pointer;width:100%;height:100%}.ControlSlider-module__arrowInner___aEra3:hover .ControlSlider-module__arrowIcon___S4ztF path{stroke:var(--arrow-hover-color)!important}.ControlSlider-module__arrowImg___2dwJW{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.ControlSlider-module__arrowIcon___S4ztF{width:100%;height:100%}.ControlSlider-module__arrowIcon___S4ztF path{transition:stroke .15s ease-in-out}.ControlSlider-module__prevIcon___v8NAK{transform:rotate(180deg)}.ControlSlider-module__pagination___bicLF{position:absolute;z-index:1;border-radius:50%}.ControlSlider-module__paginationInner___bT-P-{display:flex;gap:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);padding-top:calc(var(--is-editor, 0) * .6944444444vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * .6944444444vw);padding-bottom:calc(var(--is-editor, 0) * .6944444444vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * .6944444444vw);padding-left:calc(var(--is-editor, 0) * 1.25vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.25vw);padding-right:calc(var(--is-editor, 0) * 1.25vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.25vw);border-radius:calc(var(--is-editor, 0) * 2.3611111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.3611111111vw)}.ControlSlider-module__paginationVertical___zYqKw{flex-direction:column}.ControlSlider-module__paginationItem___nTRbk{all:unset;flex-shrink:0;position:relative;width:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);height:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);cursor:pointer}.ControlSlider-module__paginationItem___nTRbk:hover .ControlSlider-module__dot___p1Qun{background-color:var(--pagination-hover-color)!important}.ControlSlider-module__dot___p1Qun{border-radius:50%;scale:.5;transition:background-color .3s ease-in-out,transform .3s ease-in-out;width:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);height:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw)}.ControlSlider-module__activeDot___LHFaj{transform:scale(2)}.ControlSlider-module__paginationInsideBottom___R3FWn{bottom:0;left:50%;transform:translate(-50%)}.ControlSlider-module__paginationInsideTop___V-qb-{left:50%;transform:translate(-50%);top:0}.ControlSlider-module__paginationOutsideBottom___14w8D{left:50%;transform:translate(-50%);bottom:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationOutsideTop___SCLqB{left:50%;transform:translate(-50%);top:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationInsideLeft___yOBRZ{top:50%;transform:translateY(-50%);left:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationInsideRight___Rtt3o{top:50%;transform:translateY(-50%);right:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationOutsideLeft___lahaw{top:50%;transform:translateY(-50%);left:calc(var(--is-editor, 0) * -5.4861111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -5.4861111111vw)}.ControlSlider-module__paginationOutsideRight___EtuQa{top:50%;transform:translateY(-50%);right:calc(var(--is-editor, 0) * -5.4861111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -5.4861111111vw)}.ControlSlider-module__imgWrapper___UjEgB,.ControlSlider-module__wrapperInner___DLAWV{width:100%;height:100%}.ControlSlider-module__captionBlock___dJ6-j{pointer-events:none;position:absolute;top:0;z-index:1;left:0;right:0;bottom:0}.ControlSlider-module__captionTextWrapper___HFlpf{position:relative;width:100%;height:100%}.ControlSlider-module__captionText___uGBVc{pointer-events:none;max-width:100%;transition:opacity .3s ease-in-out;position:absolute;display:inline-block;white-space:pre-wrap;overflow-wrap:break-word}.ControlSlider-module__withPointerEvents___t-18M{pointer-events:auto}.ControlSlider-module__absolute___KxmYB{position:absolute}.ControlSlider-module__topLeftAlignment___zjnGM{top:0;left:0}.ControlSlider-module__topCenterAlignment___gD1xW{top:0;left:50%;transform:translate(-50%)}.ControlSlider-module__topRightAlignment___NMapS{top:0;right:0}.ControlSlider-module__middleLeftAlignment___OnUrY{top:50%;transform:translateY(-50%);left:0}.ControlSlider-module__middleCenterAlignment___Tdkl0{top:50%;transform:translate(-50%,-50%);left:50%}.ControlSlider-module__middleRightAlignment___wEbfX{top:50%;transform:translateY(-50%);right:0}.ControlSlider-module__bottomLeftAlignment___cTP2-{bottom:0;left:0}.ControlSlider-module__bottomCenterAlignment___c54fB{bottom:0;left:50%;transform:translate(-50%)}.ControlSlider-module__bottomRightAlignment___kEwrz{bottom:0;right:0}.ControlSlider-module__clickOverlay___DZA28{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer}.ControlSlider-module__contain___pLyq7{object-fit:contain}.ControlSlider-module__cover___KdDat{object-fit:cover}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__track--draggable{-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.splide__track--fade>.splide__list>.splide__slide{margin:0!important;opacity:0;z-index:0}.splide__track--fade>.splide__list>.splide__slide.is-active{opacity:1;z-index:1}.splide--rtl{direction:rtl}.splide__track--ttb>.splide__list{display:block}.splide__container{box-sizing:border-box;position:relative}.splide__list{backface-visibility:hidden;display:-ms-flexbox;display:flex;height:100%;margin:0!important;padding:0!important}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide:not(.is-overflow) .splide__pagination{display:none}.splide__progress__bar{width:0}.splide{position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{backface-visibility:hidden;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;list-style-type:none!important;margin:0;position:relative}.splide__slide img{vertical-align:bottom}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #999;border-left-color:transparent;border-radius:50%;bottom:0;contain:strict;display:inline-block;height:20px;left:0;margin:auto;position:absolute;right:0;top:0;width:20px}.splide__sr{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.splide__toggle.is-active .splide__toggle__play,.splide__toggle__pause{display:none}.splide__toggle.is-active .splide__toggle__pause{display:inline}.splide__track{overflow:hidden;position:relative;z-index:0}.RichTextRenderer-module__link___BWeZ2{color:inherit;cursor:pointer;pointer-events:auto;transition:color .2s ease}.RichTextRenderer-module__link___BWeZ2:hover{color:var(--link-hover-color)}.SvgImage-module__svg___q3xE-{width:100%;height:100%;color:transparent;display:inline-block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:var(--fill);transition:background-color .2s;-webkit-mask:var(--svg) no-repeat center/contain;mask:var(--svg) no-repeat center/contain}.SvgImage-module__svg___q3xE-:hover{background-color:var(--hover-fill)}.SvgImage-module__img___VsTm-{width:100%;height:100%;object-fit:contain}
1
+ .ControlSlider-module__wrapper___sHEkd{position:relative;width:100%;height:100%}.ControlSlider-module__slider___R3i9-{width:100%;height:100%}.ControlSlider-module__sliderItems___1MgPL{display:flex;overflow:hidden;width:100%;height:100%;transition:transform .3s ease-in-out}.ControlSlider-module__sliderItem___QQSkR{width:100%;height:100%;display:flex;position:relative}.ControlSlider-module__sliderImage___9hRl-{width:100%;height:100%;object-fit:cover}.ControlSlider-module__arrow___05ghY{position:absolute;display:flex;align-items:center;justify-content:center;border:none;background-color:transparent;top:50%;left:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);z-index:1;transform:translate(-50%,-50%);padding:0;width:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw);height:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw)}.ControlSlider-module__arrow___05ghY.ControlSlider-module__arrowVertical___tBfVN{left:50%;top:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);transform:translate(-50%,-50%)}.ControlSlider-module__nextArrow___-30Yc{left:unset;right:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);transform:translate(50%,-50%)}.ControlSlider-module__nextArrow___-30Yc.ControlSlider-module__arrowVertical___tBfVN{left:50%;right:unset;top:unset;bottom:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);transform:translate(-50%,50%)}.ControlSlider-module__arrowInner___aEra3{all:unset;cursor:pointer;width:100%;height:100%}.ControlSlider-module__arrowInner___aEra3:hover .ControlSlider-module__arrowIcon___S4ztF path{fill:var(--arrow-hover-color)!important}.ControlSlider-module__arrowImg___2dwJW{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.ControlSlider-module__arrowIcon___S4ztF{width:100%;height:100%}.ControlSlider-module__arrowIcon___S4ztF path{transition:fill .15s ease-in-out}.ControlSlider-module__prevIcon___v8NAK{transform:rotate(180deg)}.ControlSlider-module__pagination___bicLF{position:absolute;z-index:1;border-radius:50%}.ControlSlider-module__paginationInner___bT-P-{display:flex;gap:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);padding-top:calc(var(--is-editor, 0) * .6944444444vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * .6944444444vw);padding-bottom:calc(var(--is-editor, 0) * .6944444444vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * .6944444444vw);padding-left:calc(var(--is-editor, 0) * 1.25vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.25vw);padding-right:calc(var(--is-editor, 0) * 1.25vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.25vw);border-radius:calc(var(--is-editor, 0) * 2.3611111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.3611111111vw)}.ControlSlider-module__paginationVertical___zYqKw{flex-direction:column}.ControlSlider-module__paginationItem___nTRbk{all:unset;flex-shrink:0;position:relative;width:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);height:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);cursor:pointer}.ControlSlider-module__paginationItem___nTRbk:hover .ControlSlider-module__dot___p1Qun{background-color:var(--pagination-hover-color)!important}.ControlSlider-module__dot___p1Qun{border-radius:50%;scale:.5;transition:background-color .3s ease-in-out,transform .3s ease-in-out;width:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);height:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw)}.ControlSlider-module__activeDot___LHFaj{transform:scale(2)}.ControlSlider-module__paginationInsideBottom___R3FWn{bottom:0;left:50%;transform:translate(-50%)}.ControlSlider-module__paginationInsideTop___V-qb-{left:50%;transform:translate(-50%);top:0}.ControlSlider-module__paginationOutsideBottom___14w8D{left:50%;transform:translate(-50%);bottom:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationOutsideTop___SCLqB{left:50%;transform:translate(-50%);top:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationInsideLeft___yOBRZ{top:50%;transform:translateY(-50%);left:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationInsideRight___Rtt3o{top:50%;transform:translateY(-50%);right:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationOutsideLeft___lahaw{top:50%;transform:translateY(-50%);left:calc(var(--is-editor, 0) * -5.4861111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -5.4861111111vw)}.ControlSlider-module__paginationOutsideRight___EtuQa{top:50%;transform:translateY(-50%);right:calc(var(--is-editor, 0) * -5.4861111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -5.4861111111vw)}.ControlSlider-module__imgWrapper___UjEgB,.ControlSlider-module__wrapperInner___DLAWV{width:100%;height:100%}.ControlSlider-module__captionBlock___dJ6-j{pointer-events:none;position:absolute;top:0;z-index:1;left:0;right:0;bottom:0}.ControlSlider-module__captionTextWrapper___HFlpf{position:relative;width:100%;height:100%}.ControlSlider-module__captionText___uGBVc{pointer-events:none;max-width:100%;transition:opacity .3s ease-in-out;position:absolute;display:inline-block;white-space:pre-wrap;overflow-wrap:break-word}.ControlSlider-module__withPointerEvents___t-18M{pointer-events:auto}.ControlSlider-module__absolute___KxmYB{position:absolute}.ControlSlider-module__topLeftAlignment___zjnGM{top:0;left:0}.ControlSlider-module__topCenterAlignment___gD1xW{top:0;left:50%;transform:translate(-50%)}.ControlSlider-module__topRightAlignment___NMapS{top:0;right:0}.ControlSlider-module__middleLeftAlignment___OnUrY{top:50%;transform:translateY(-50%);left:0}.ControlSlider-module__middleCenterAlignment___Tdkl0{top:50%;transform:translate(-50%,-50%);left:50%}.ControlSlider-module__middleRightAlignment___wEbfX{top:50%;transform:translateY(-50%);right:0}.ControlSlider-module__bottomLeftAlignment___cTP2-{bottom:0;left:0}.ControlSlider-module__bottomCenterAlignment___c54fB{bottom:0;left:50%;transform:translate(-50%)}.ControlSlider-module__bottomRightAlignment___kEwrz{bottom:0;right:0}.ControlSlider-module__clickOverlay___DZA28{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer}.ControlSlider-module__contain___pLyq7{object-fit:contain}.ControlSlider-module__cover___KdDat{object-fit:cover}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__track--draggable{-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.splide__track--fade>.splide__list>.splide__slide{margin:0!important;opacity:0;z-index:0}.splide__track--fade>.splide__list>.splide__slide.is-active{opacity:1;z-index:1}.splide--rtl{direction:rtl}.splide__track--ttb>.splide__list{display:block}.splide__container{box-sizing:border-box;position:relative}.splide__list{backface-visibility:hidden;display:-ms-flexbox;display:flex;height:100%;margin:0!important;padding:0!important}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide:not(.is-overflow) .splide__pagination{display:none}.splide__progress__bar{width:0}.splide{position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{backface-visibility:hidden;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;list-style-type:none!important;margin:0;position:relative}.splide__slide img{vertical-align:bottom}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #999;border-left-color:transparent;border-radius:50%;bottom:0;contain:strict;display:inline-block;height:20px;left:0;margin:auto;position:absolute;right:0;top:0;width:20px}.splide__sr{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.splide__toggle.is-active .splide__toggle__play,.splide__toggle__pause{display:none}.splide__toggle.is-active .splide__toggle__pause{display:inline}.splide__track{overflow:hidden;position:relative;z-index:0}.RichTextRenderer-module__link___BWeZ2{color:inherit;cursor:pointer;pointer-events:auto;transition:color .2s ease}.RichTextRenderer-module__link___BWeZ2:hover{color:var(--link-hover-color)}.SvgImage-module__svg___q3xE-{width:100%;height:100%;color:transparent;display:inline-block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:var(--fill);transition:background-color .2s;-webkit-mask:var(--svg) no-repeat center/contain;mask:var(--svg) no-repeat center/contain}.SvgImage-module__svg___q3xE-:hover{background-color:var(--hover-fill)}.SvgImage-module__img___VsTm-{width:100%;height:100%;object-fit:contain}
@@ -1,15 +1,21 @@
1
1
  export interface Interaction {
2
2
  id: string;
3
- triggers: InteractionTrigger[];
3
+ triggers: (InteractionItemTrigger | InteractionScrollTrigger)[];
4
4
  states: InteractionState[];
5
5
  startStateId: string;
6
6
  }
7
- export interface InteractionTrigger {
7
+ export interface InteractionItemTrigger {
8
8
  itemId: string;
9
9
  type: 'hover-in' | 'hover-out' | 'click';
10
10
  from: StateId;
11
11
  to: StateId;
12
12
  }
13
+ export interface InteractionScrollTrigger {
14
+ position: number;
15
+ from: StateId;
16
+ to: StateId;
17
+ isReverse: boolean;
18
+ }
13
19
  export type VideoInteractionAction = {
14
20
  type: 'play' | 'pause';
15
21
  itemId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk",
3
- "version": "1.22.7",
3
+ "version": "1.22.9-alpha.0",
4
4
  "description": "Generic SDK for use in public websites.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",