Skip to content

Commit

Permalink
- Added support for SceneGallery and SceneGalleryImage types
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidArayan committed Oct 31, 2024
1 parent 918c591 commit 9cb76f5
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plattar-api/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export { SceneVideo } from "./types/scene/scene-video";
export { SceneVolumetric } from "./types/scene/scene-volumetric";
export { SceneYoutube } from "./types/scene/scene-youtube";
export { SceneScript } from "./types/scene/scene-script";
export { SceneGallery } from "./types/scene/scene-gallery";
export { SceneGalleryImage } from "./types/scene/scene-gallery-image";

// export Page and its types
export { Page } from "./types/page/page";
Expand Down
4 changes: 4 additions & 0 deletions plattar-api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const SceneVideo = require("./types/scene/scene-video.js");
const SceneVolumetric = require("./types/scene/scene-volumetric.js");
const SceneYoutube = require("./types/scene/scene-youtube.js");
const SceneScript = require("./types/scene/scene-script.js");
const SceneGallery = require("./types/scene/scene-gallery.js");
const SceneGalleryImage = require("./types/scene/scene-gallery-image.js");

// import Page and its types
const Page = require("./types/page/page.js");
Expand Down Expand Up @@ -103,6 +105,8 @@ module.exports = {
SceneVolumetric,
SceneYoutube,
SceneScript,
SceneGallery,
SceneGalleryImage,
// page and types
Page,
CardButton,
Expand Down
8 changes: 8 additions & 0 deletions plattar-api/types/scene/scene-gallery-image.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { SceneBase } from "./scene-base";

export class SceneGalleryImage extends SceneBase {
static type(): "scenegalleryimage";

get attributes(): any;
set overrideAttributes(attributes: any);
}
9 changes: 9 additions & 0 deletions plattar-api/types/scene/scene-gallery-image.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const PlattarBase = require("../interfaces/plattar-base.js");

class SceneGalleryImage extends PlattarBase {
static type() {
return "scenegalleryimage";
}
}

module.exports = SceneGalleryImage;
8 changes: 8 additions & 0 deletions plattar-api/types/scene/scene-gallery.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { SceneBase } from "./scene-base";

export class SceneGallery extends SceneBase {
static type(): "scenegallery";

get attributes(): any;
set overrideAttributes(attributes: any);
}
9 changes: 9 additions & 0 deletions plattar-api/types/scene/scene-gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const PlattarBase = require("../interfaces/plattar-base.js");

class SceneGallery extends PlattarBase {
static type() {
return "scenegallery";
}
}

module.exports = SceneGallery;
4 changes: 4 additions & 0 deletions plattar-api/util/plattar-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const SceneVideo = require("../types/scene/scene-video.js");
const SceneVolumetric = require("../types/scene/scene-volumetric.js");
const SceneYoutube = require("../types/scene/scene-youtube.js");
const SceneScript = require("../types/scene/scene-script.js");
const SceneGallery = require("../types/scene/scene-gallery.js");
const SceneGalleryImage = require("../types/scene/scene-gallery-image.js");

// import Page types and its children
const Page = require("../types/page/page.js");
Expand Down Expand Up @@ -183,6 +185,8 @@ PlattarUtil.match = (type) => {
case SceneVolumetric.type(): return SceneVolumetric;
case SceneYoutube.type(): return SceneYoutube;
case SceneScript.type(): return SceneScript;
case SceneGallery.type(): return SceneGallery;
case SceneGalleryImage.type(): return SceneGalleryImage;
case Page.type(): return Page;
case CardButton.type(): return CardButton;
case CardHTML.type(): return CardHTML;
Expand Down

0 comments on commit 9cb76f5

Please sign in to comment.