@gxpl/sdk 0.0.34 → 0.0.35

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.
@@ -135,7 +135,7 @@ const Scene = ({ children, id, styles: sceneStyles, elRef }) => {
135
135
  }, [isTransitioning, actorRef, id]);
136
136
  const isFixed = isControlledTransitioning || isSettling || isInstantTransitioning;
137
137
  const transitionStyle = type === 'slide' ? 'transform' : 'opacity';
138
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { ref: elRef, className: "article-wrapper", style: Object.assign(Object.assign({}, layoutDeviationStyle), { width: '100vw', height: '100%', position: isFixed ? 'fixed' : 'absolute', transform: sceneStyles && (sceneStyles.x !== 0 || sceneStyles.y !== 0) ? `translate(${sceneStyles.x}px, ${sceneStyles.y}px)` : 'none', transition: isSettling || isInstantTransitioning ? `${transitionStyle} 0.25s ease-out` : 'none', overflowY: isFixed ? 'hidden' : 'scroll', overflowX: 'clip', opacity: (_a = sceneStyles === null || sceneStyles === void 0 ? void 0 : sceneStyles.opacity) !== null && _a !== void 0 ? _a : 1, 'WebkitOverflowScrolling': 'touch' // prevent glitch on Safari (fast scroll to top/bottom sides)
138
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { ref: elRef, className: "article-wrapper", style: Object.assign(Object.assign({}, layoutDeviationStyle), { width: '100vw', height: '100%', zIndex: 1, position: isFixed ? 'fixed' : 'absolute', transform: sceneStyles && (sceneStyles.x !== 0 || sceneStyles.y !== 0) ? `translate(${sceneStyles.x}px, ${sceneStyles.y}px)` : 'none', transition: isSettling || isInstantTransitioning ? `${transitionStyle} 0.25s ease-out` : 'none', overflowY: isFixed ? 'hidden' : 'scroll', overflowX: 'clip', opacity: (_a = sceneStyles === null || sceneStyles === void 0 ? void 0 : sceneStyles.opacity) !== null && _a !== void 0 ? _a : 1, 'WebkitOverflowScrolling': 'touch' // prevent glitch on Safari (fast scroll to top/bottom sides)
139
139
  }), children: children }) }));
140
140
  };
141
141
  exports.Scene = Scene;
@@ -43,7 +43,7 @@ const FixedLayer = ({ layer, type }) => {
43
43
  width: 100%;
44
44
  height: 100%;
45
45
  overflow: clip;
46
- ${type === 'foreground' ? 'z-index: 1;' : 'z-index: -1;'}
46
+ ${type === 'foreground' ? 'z-index: 2;' : 'z-index: 0;'}
47
47
  }
48
48
  ` })] }) }) }));
49
49
  };
@@ -17,7 +17,6 @@ export declare class FixedLayerTransitionsRegistry implements InteractionsRegist
17
17
  private unpackItems;
18
18
  private getNestedItems;
19
19
  private getDefaultItemStages;
20
- notifyItemTrigger(itemId: string, triggerType: TriggerType): void;
21
20
  notifyOnActiveSceneChange(sceneId: SceneId): void;
22
21
  notifyPrepareTransition(to: SceneId): void;
23
22
  notifyTransitionStartForItems(activeStateId: string): void;
@@ -108,9 +108,6 @@ class FixedLayerTransitionsRegistry {
108
108
  }
109
109
  return stages;
110
110
  }
111
- notifyItemTrigger(itemId, triggerType) {
112
- throw new Error('Not implemented');
113
- }
114
111
  notifyOnActiveSceneChange(sceneId) {
115
112
  this.itemsStages = this.itemsStages.map((stage) => {
116
113
  return {
@@ -56,6 +56,8 @@ class ItemInteractionController {
56
56
  return triggers.has(triggerType);
57
57
  }
58
58
  sendTrigger(type) {
59
+ if (!this.registry.notifyItemTrigger)
60
+ return;
59
61
  this.registry.notifyItemTrigger(this.itemId, type);
60
62
  }
61
63
  receiveAction(type) {
@@ -15,7 +15,7 @@ export interface InteractionsRegistryPort {
15
15
  register(itemId: string, ctrl: ItemInteractionCtrl): void;
16
16
  getStatePropsForItem(itemId: string): StateProps<unknown>;
17
17
  getItemAvailableTriggers(itemId: string): Set<InteractionItemTrigger['type']>;
18
- notifyItemTrigger(itemId: string, type: TriggerType): void;
18
+ notifyItemTrigger?: (itemId: string, type: TriggerType) => void;
19
19
  notifyTransitionEnd(itemId: string): void;
20
20
  }
21
21
  type StateCSSInfo<T> = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gxpl/sdk",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "description": "Generic SDK for use in public websites.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",