import { UIDLUtils } from '@teleporthq/teleport-shared' import { ProjectUIDL, UIDLAttributeValue, UIDLElement, UIDLNode } from '@teleporthq/teleport-types' import { MOTION_ATTR_BY_PROP, MOTION_ELEMENT_TYPE, MOTION_MARKER_ATTR, SCENE_ATTR_BY_PROP, SCENE_ELEMENT_TYPE, SCENE_LAYOUT_ATTR, SCENE_LENGTH_ATTR, SCENE_PIN_ATTR, SCENE_STAGE_ATTR, SCENE_TRACK_ATTR, SCROLL_VIDEO_ATTR, SCROLL_VIDEO_ATTR_BY_PROP, SCROLL_VIDEO_ELEMENT_TYPE, normalizeSceneLength, } from './contract' /** * Turns the three motion elements into the markup a static page can run. * * The editor exports them the way the Next generator wants them: an element * type per widget (`scroll-scene-node`, `motion-node`, `scroll-video-node`) * with the widget's camelCase props as attributes. The HTML generator has no * widget to hand those to, so until now it printed them as unknown tags with * props an HTML parser lower-cases. Here each becomes a plain
that * carries its settings as `data-*` attributes, in the very structure the Next * widgets render: a scene is a track holding a sticky stage, a scroll video is * a host holding its