@makeswift/runtime 0.0.3 → 0.0.6

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.
Files changed (49) hide show
  1. package/dist/actions.cjs.js +6 -1
  2. package/dist/actions.cjs.js.map +1 -1
  3. package/dist/actions.es.js +6 -2
  4. package/dist/actions.es.js.map +1 -1
  5. package/dist/components.cjs.js +1 -0
  6. package/dist/components.cjs.js.map +1 -1
  7. package/dist/components.es.js +1 -0
  8. package/dist/components.es.js.map +1 -1
  9. package/dist/descriptors.cjs.js.map +1 -1
  10. package/dist/descriptors.es.js.map +1 -1
  11. package/dist/index.cjs.js +457 -79
  12. package/dist/index.cjs.js.map +1 -1
  13. package/dist/index.es.js +464 -86
  14. package/dist/index.es.js.map +1 -1
  15. package/dist/next.cjs.js +1 -0
  16. package/dist/next.cjs.js.map +1 -1
  17. package/dist/next.es.js +1 -0
  18. package/dist/next.es.js.map +1 -1
  19. package/dist/react-builder-preview.cjs.js +34 -2
  20. package/dist/react-builder-preview.cjs.js.map +1 -1
  21. package/dist/react-builder-preview.es.js +36 -4
  22. package/dist/react-builder-preview.es.js.map +1 -1
  23. package/dist/react-page.cjs.js +32 -19
  24. package/dist/react-page.cjs.js.map +1 -1
  25. package/dist/react-page.es.js +26 -15
  26. package/dist/react-page.es.js.map +1 -1
  27. package/dist/react.cjs.js +1 -0
  28. package/dist/react.cjs.js.map +1 -1
  29. package/dist/react.es.js +1 -0
  30. package/dist/react.es.js.map +1 -1
  31. package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
  32. package/dist/types/components/builtin/Navigation/components/DropDownButton/index.d.ts +1 -1
  33. package/dist/types/components/builtin/Navigation/components/DropDownButton/index.d.ts.map +1 -1
  34. package/dist/types/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts +1 -1
  35. package/dist/types/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts.map +1 -1
  36. package/dist/types/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
  37. package/dist/types/prop-controllers/descriptors.d.ts +1 -1
  38. package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
  39. package/dist/types/runtimes/react/controls/style.d.ts.map +1 -1
  40. package/dist/types/runtimes/react/find-dom-node.d.ts +7 -0
  41. package/dist/types/runtimes/react/find-dom-node.d.ts.map +1 -0
  42. package/dist/types/runtimes/react/index.d.ts.map +1 -1
  43. package/dist/types/state/actions.d.ts +8 -1
  44. package/dist/types/state/actions.d.ts.map +1 -1
  45. package/dist/types/state/modules/is-in-builder.d.ts +6 -0
  46. package/dist/types/state/modules/is-in-builder.d.ts.map +1 -0
  47. package/dist/types/state/react-builder-preview.d.ts.map +1 -1
  48. package/dist/types/state/react-page.d.ts.map +1 -1
  49. package/package.json +1 -1
@@ -35,7 +35,7 @@ function createDocumentReference(key) {
35
35
  function createDocument(key, rootElement) {
36
36
  return { key, rootElement };
37
37
  }
38
- function getInitialState$3({
38
+ function getInitialState$4({
39
39
  rootElements = /* @__PURE__ */ new Map()
40
40
  } = {}) {
41
41
  const initialState = /* @__PURE__ */ new Map();
@@ -51,7 +51,7 @@ function getDocument$1(state, documentKey) {
51
51
  var _a;
52
52
  return (_a = getDocuments(state).get(documentKey)) != null ? _a : null;
53
53
  }
54
- function reducer$4(state = getInitialState$3(), action) {
54
+ function reducer$5(state = getInitialState$4(), action) {
55
55
  switch (action.type) {
56
56
  case actions.ActionTypes.REGISTER_DOCUMENT:
57
57
  return new Map(state).set(action.payload.documentKey, action.payload.document);
@@ -64,7 +64,7 @@ function reducer$4(state = getInitialState$3(), action) {
64
64
  return state;
65
65
  }
66
66
  }
67
- function getInitialState$2({
67
+ function getInitialState$3({
68
68
  reactComponents = /* @__PURE__ */ new Map()
69
69
  } = {}) {
70
70
  return reactComponents;
@@ -76,7 +76,7 @@ function getReactComponent$1(state, type) {
76
76
  var _a;
77
77
  return (_a = getReactComponents(state).get(type)) != null ? _a : null;
78
78
  }
79
- function reducer$3(state = getInitialState$2(), action) {
79
+ function reducer$4(state = getInitialState$3(), action) {
80
80
  switch (action.type) {
81
81
  case actions.ActionTypes.REGISTER_REACT_COMPONENT:
82
82
  return new Map(state).set(action.payload.type, action.payload.component);
@@ -89,7 +89,7 @@ function reducer$3(state = getInitialState$2(), action) {
89
89
  return state;
90
90
  }
91
91
  }
92
- function getInitialState$1({
92
+ function getInitialState$2({
93
93
  componentsMeta = /* @__PURE__ */ new Map()
94
94
  } = {}) {
95
95
  return componentsMeta;
@@ -97,7 +97,7 @@ function getInitialState$1({
97
97
  function getComponentsMeta(state) {
98
98
  return state;
99
99
  }
100
- function reducer$2(state = getInitialState$1(), action) {
100
+ function reducer$3(state = getInitialState$2(), action) {
101
101
  switch (action.type) {
102
102
  case actions.ActionTypes.REGISTER_COMPONENT:
103
103
  return new Map(state).set(action.payload.type, action.payload.meta);
@@ -110,7 +110,7 @@ function reducer$2(state = getInitialState$1(), action) {
110
110
  return state;
111
111
  }
112
112
  }
113
- function getInitialState({
113
+ function getInitialState$1({
114
114
  propControllerDescriptors = /* @__PURE__ */ new Map()
115
115
  } = {}) {
116
116
  return propControllerDescriptors;
@@ -122,7 +122,7 @@ function getComponentPropControllerDescriptors$1(state, componentType) {
122
122
  var _a;
123
123
  return (_a = getPropControllerDescriptors$1(state).get(componentType)) != null ? _a : null;
124
124
  }
125
- function reducer$1(state = getInitialState(), action) {
125
+ function reducer$2(state = getInitialState$1(), action) {
126
126
  switch (action.type) {
127
127
  case actions.ActionTypes.REGISTER_COMPONENT:
128
128
  return new Map(state).set(action.payload.type, action.payload.propControllerDescriptors);
@@ -135,6 +135,17 @@ function reducer$1(state = getInitialState(), action) {
135
135
  return state;
136
136
  }
137
137
  }
138
+ function getInitialState() {
139
+ return false;
140
+ }
141
+ function reducer$1(state = getInitialState(), action) {
142
+ switch (action.type) {
143
+ case actions.ActionTypes.SET_IS_IN_BUILDER:
144
+ return action.payload;
145
+ default:
146
+ return state;
147
+ }
148
+ }
138
149
  function getElementChildren(descriptor, prop) {
139
150
  if (prop == null)
140
151
  return [];
@@ -156,11 +167,11 @@ function getElementId$1(descriptor, prop) {
156
167
  }
157
168
  }
158
169
  const reducer = redux.combineReducers({
159
- documents: reducer$4,
160
- reactComponents: reducer$3,
161
- componentsMeta: reducer$2,
162
- propControllers: reducer$1,
163
- isInBuilder: (_state = false, _action) => false
170
+ documents: reducer$5,
171
+ reactComponents: reducer$4,
172
+ componentsMeta: reducer$3,
173
+ propControllers: reducer$2,
174
+ isInBuilder: reducer$1
164
175
  });
165
176
  function getDocumentsStateSlice(state) {
166
177
  return state.documents;
@@ -240,7 +251,7 @@ function configureStore({
240
251
  rootElements,
241
252
  preloadedState
242
253
  } = {}) {
243
- return redux.createStore(reducer, __spreadProps(__spreadValues({}, preloadedState), { documents: getInitialState$3({ rootElements }) }), redux.applyMiddleware(thunk__default["default"]));
254
+ return redux.createStore(reducer, __spreadProps(__spreadValues({}, preloadedState), { documents: getInitialState$4({ rootElements }) }), redux.applyMiddleware(thunk__default["default"]));
244
255
  }
245
256
  exports.configureStore = configureStore;
246
257
  exports.createDocument = createDocument;
@@ -250,14 +261,16 @@ exports.getComponentPropControllerDescriptors$1 = getComponentPropControllerDesc
250
261
  exports.getComponentsMeta = getComponentsMeta;
251
262
  exports.getDocument = getDocument;
252
263
  exports.getDocument$1 = getDocument$1;
264
+ exports.getElement = getElement;
253
265
  exports.getElementId = getElementId;
254
266
  exports.getElementPropControllerDescriptors = getElementPropControllerDescriptors;
255
- exports.getInitialState = getInitialState$3;
267
+ exports.getInitialState = getInitialState$4;
256
268
  exports.getIsInBuilder = getIsInBuilder;
257
269
  exports.getReactComponent = getReactComponent;
258
270
  exports.isElementReference = isElementReference;
259
- exports.reducer = reducer$4;
260
- exports.reducer$1 = reducer$3;
261
- exports.reducer$2 = reducer$2;
262
- exports.reducer$3 = reducer$1;
271
+ exports.reducer = reducer$5;
272
+ exports.reducer$1 = reducer$4;
273
+ exports.reducer$2 = reducer$3;
274
+ exports.reducer$3 = reducer$2;
275
+ exports.reducer$4 = reducer$1;
263
276
  //# sourceMappingURL=react-page.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-page.cjs.js","sources":["../src/state/modules/read-only-documents.ts","../src/state/modules/react-components.tsx","../src/state/modules/components-meta.ts","../src/state/modules/prop-controllers.ts","../src/prop-controllers/introspection.ts","../src/state/react-page.ts"],"sourcesContent":["import { Action, ActionTypes } from '../actions'\n\nexport type Data = undefined | null | boolean | number | string | Data[] | { [key: string]: Data }\n\nexport type ElementData = { type: string; key: string; props: Record<string, Data> }\n\nexport type ElementReference = { type: 'reference'; key: string; value: string }\n\nexport type Element = ElementData | ElementReference\n\nexport function isElementReference(element: Element): element is ElementReference {\n return !('props' in element)\n}\n\nexport type DocumentReference = {\n key: string\n}\n\nexport function createDocumentReference(key: string): DocumentReference {\n return { key }\n}\n\nexport type Document = {\n key: string\n rootElement: Element\n}\n\nexport function createDocument(key: string, rootElement: Element): Document {\n return { key, rootElement }\n}\n\nexport type State = Map<string, Document>\n\nexport function getInitialState({\n rootElements = new Map(),\n}: { rootElements?: Map<string, Element> } = {}): State {\n const initialState = new Map()\n\n rootElements.forEach((rootElement, documentKey) => {\n initialState.set(documentKey, createDocument(documentKey, rootElement))\n })\n\n return initialState\n}\n\nfunction getDocuments(state: State): Map<string, Document> {\n return state\n}\n\nexport function getDocument(state: State, documentKey: string): Document | null {\n return getDocuments(state).get(documentKey) ?? null\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.REGISTER_DOCUMENT:\n return new Map(state).set(action.payload.documentKey, action.payload.document)\n\n case ActionTypes.UNREGISTER_DOCUMENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.documentKey)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import type {\n ClassAttributes,\n ComponentClass,\n PropsWithoutRef,\n RefAttributes,\n VoidFunctionComponent,\n} from 'react'\n\nimport { Action, ActionTypes } from '../actions'\n\nexport type ComponentType<P = Record<string, any>, T = any> =\n | ComponentClass<PropsWithoutRef<P> & ClassAttributes<T>>\n | VoidFunctionComponent<PropsWithoutRef<P> & RefAttributes<T>>\n\nexport type State = Map<string, ComponentType>\n\nexport function getInitialState({\n reactComponents = new Map(),\n}: { reactComponents?: Map<string, ComponentType> } = {}): State {\n return reactComponents\n}\n\nfunction getReactComponents(state: State): Map<string, ComponentType> {\n return state\n}\n\nexport function getReactComponent(state: State, type: string): ComponentType | null {\n return getReactComponents(state).get(type) ?? null\n}\n\nexport function reducer(state: State = getInitialState(), action: Action) {\n switch (action.type) {\n case ActionTypes.REGISTER_REACT_COMPONENT:\n return new Map(state).set(action.payload.type, action.payload.component)\n\n case ActionTypes.UNREGISTER_REACT_COMPONENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.type)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import { Action, ActionTypes } from '../actions'\n\nexport type ComponentIcon =\n | 'Carousel40'\n | 'Code40'\n | 'Countdown40'\n | 'Cube40'\n | 'Divider40'\n | 'Form40'\n | 'Navigation40'\n | 'SocialLinks40'\n | 'Video40'\n\nexport type ComponentMeta = { label: string; icon: ComponentIcon; hidden: boolean }\n\nexport type State = Map<string, ComponentMeta>\n\nexport function getInitialState({\n componentsMeta = new Map(),\n}: { componentsMeta?: Map<string, ComponentMeta> } = {}): State {\n return componentsMeta\n}\n\nexport function getComponentsMeta(state: State): Map<string, ComponentMeta> {\n return state\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.REGISTER_COMPONENT:\n return new Map(state).set(action.payload.type, action.payload.meta)\n\n case ActionTypes.UNREGISTER_COMPONENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.type)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import { Action, ActionTypes } from '../actions'\nimport { PropControllerDescriptor } from '../../prop-controllers'\n\nexport type { PropControllerDescriptor }\n\nexport type State = Map<string, Record<string, PropControllerDescriptor>>\n\nexport function getInitialState({\n propControllerDescriptors = new Map(),\n}: {\n propControllerDescriptors?: Map<string, Record<string, PropControllerDescriptor>>\n} = {}): State {\n return propControllerDescriptors\n}\n\nexport function getPropControllerDescriptors(\n state: State,\n): Map<string, Record<string, PropControllerDescriptor>> {\n return state\n}\n\nexport function getComponentPropControllerDescriptors(\n state: State,\n componentType: string,\n): Record<string, PropControllerDescriptor> | null {\n return getPropControllerDescriptors(state).get(componentType) ?? null\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.REGISTER_COMPONENT:\n return new Map(state).set(action.payload.type, action.payload.propControllerDescriptors)\n\n case ActionTypes.UNREGISTER_COMPONENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.type)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import { Descriptor, ElementIDValue, GridValue, Types } from './descriptors'\nimport { Data, Element } from '../state/react-page'\n\nexport function getElementChildren<T extends Data>(\n descriptor: Descriptor<T>,\n prop: T | undefined,\n): Element[] {\n if (prop == null) return []\n\n switch (descriptor.type) {\n case Types.Grid:\n return (prop as GridValue).elements\n\n default:\n return []\n }\n}\n\nexport function getElementId<T extends Data>(\n descriptor: Descriptor<T>,\n prop: T | undefined,\n): string | null {\n if (prop == null) return null\n\n switch (descriptor.type) {\n case Types.ElementID:\n return prop as ElementIDValue\n\n default:\n return null\n }\n}\n","import {\n applyMiddleware,\n combineReducers,\n createStore,\n PreloadedState,\n Store as ReduxStore,\n} from 'redux'\nimport thunk, { ThunkDispatch } from 'redux-thunk'\n\nimport * as Documents from './modules/read-only-documents'\nimport * as ReactComponents from './modules/react-components'\nimport * as ComponentsMeta from './modules/components-meta'\nimport * as PropControllers from './modules/prop-controllers'\nimport * as Introspection from '../prop-controllers/introspection'\nimport { Action } from './actions'\n\nexport type {\n Data,\n Document,\n DocumentReference,\n Element,\n ElementData,\n ElementReference,\n} from './modules/read-only-documents'\nexport {\n createDocument,\n createDocumentReference,\n isElementReference,\n} from './modules/read-only-documents'\nexport type { ComponentType } from './modules/react-components'\n\nconst reducer = combineReducers({\n documents: Documents.reducer,\n reactComponents: ReactComponents.reducer,\n componentsMeta: ComponentsMeta.reducer,\n propControllers: PropControllers.reducer,\n isInBuilder: (_state: boolean = false, _action: Action): boolean => false,\n})\n\nexport type State = ReturnType<typeof reducer>\n\nfunction getDocumentsStateSlice(state: State): Documents.State {\n return state.documents\n}\n\nexport function getDocument(state: State, documentKey: string): Documents.Document | null {\n return Documents.getDocument(getDocumentsStateSlice(state), documentKey)\n}\n\nfunction getReactComponentsStateSlice(state: State): ReactComponents.State {\n return state.reactComponents\n}\n\nexport function getReactComponent(\n state: State,\n type: string,\n): ReactComponents.ComponentType | null {\n return ReactComponents.getReactComponent(getReactComponentsStateSlice(state), type)\n}\n\nfunction getPropControllersStateSlice(state: State): PropControllers.State {\n return state.propControllers\n}\n\nfunction getPropControllerDescriptors(\n state: State,\n): Map<string, Record<string, PropControllers.PropControllerDescriptor>> {\n return PropControllers.getPropControllerDescriptors(getPropControllersStateSlice(state))\n}\n\nexport function getComponentPropControllerDescriptors(\n state: State,\n componentType: string,\n): Record<string, PropControllers.PropControllerDescriptor> | null {\n return PropControllers.getComponentPropControllerDescriptors(\n getPropControllersStateSlice(state),\n componentType,\n )\n}\n\nfunction normalizeElement(\n element: Documents.Element,\n descriptors: Map<string, Record<string, PropControllers.PropControllerDescriptor>>,\n): Map<string, Documents.Element> {\n const elements = new Map<string, Documents.Element>()\n const remaining = [element]\n let current: Documents.Element | undefined\n\n while ((current = remaining.pop())) {\n elements.set(current.key, current)\n\n if (Documents.isElementReference(current)) continue\n\n const elementDescriptors = descriptors.get(current.type)\n\n if (elementDescriptors == null) continue\n\n const parent = current\n const children = Object.entries(elementDescriptors).reduce((acc, [propName, descriptor]) => {\n return [...acc, ...Introspection.getElementChildren(descriptor, parent.props[propName])]\n }, [] as Documents.Element[])\n\n remaining.push(...children)\n }\n\n return elements\n}\n\nfunction getDocumentElements(state: State, documentKey: string): Map<string, Documents.Element> {\n const document = getDocument(state, documentKey)\n const descriptors = getPropControllerDescriptors(state)\n\n if (document == null) return new Map()\n\n return normalizeElement(document.rootElement, descriptors)\n}\n\nexport function getElement(\n state: State,\n documentKey: string,\n elementKey: string,\n): Documents.Element | null {\n return getDocumentElements(state, documentKey).get(elementKey) ?? null\n}\n\nexport function getElementPropControllerDescriptors(\n state: State,\n documentKey: string,\n elementKey: string,\n): Record<string, PropControllers.PropControllerDescriptor> | null {\n const element = getElement(state, documentKey, elementKey)\n\n if (element == null || Documents.isElementReference(element)) return null\n\n return getComponentPropControllerDescriptors(state, element.type)\n}\n\nexport function getElementId(state: State, documentKey: string, elementKey: string): string | null {\n const element = getElement(state, documentKey, elementKey)\n\n if (element == null || Documents.isElementReference(element)) return null\n\n const descriptors = getComponentPropControllerDescriptors(state, element.type)\n\n if (descriptors == null) return null\n\n const elementId = Object.entries(descriptors).reduce((acc, [propName, descriptor]) => {\n if (acc != null) return acc\n\n return Introspection.getElementId(descriptor, element.props[propName])\n }, null as string | null)\n\n return elementId\n}\n\nexport function getIsInBuilder(state: State): boolean {\n return state.isInBuilder\n}\n\nexport type Dispatch = ThunkDispatch<State, unknown, Action>\n\nexport type Store = ReduxStore<State, Action> & { dispatch: Dispatch }\n\nexport function configureStore({\n rootElements,\n preloadedState,\n}: {\n rootElements?: Map<string, Documents.Element>\n preloadedState?: PreloadedState<State>\n} = {}): Store {\n return createStore(\n reducer,\n { ...preloadedState, documents: Documents.getInitialState({ rootElements }) },\n applyMiddleware(thunk),\n )\n}\n"],"names":["getInitialState","ActionTypes","reactComponents","Map","state","type","getReactComponents","get","action","REGISTER_REACT_COMPONENT","set","payload","component","UNREGISTER_REACT_COMPONENT","nextState","deleted","delete","getPropControllerDescriptors","Types","combineReducers","Documents.reducer","ReactComponents.reducer","ComponentsMeta.reducer","PropControllers.reducer","Documents.getDocument","ReactComponents.getReactComponent","PropControllers.getPropControllerDescriptors","PropControllers.getComponentPropControllerDescriptors","Documents.isElementReference","Introspection.getElementChildren","Introspection.getElementId","createStore","Documents.getInitialState","applyMiddleware","thunk"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,4BAA4B,SAA+C;AAChF,SAAO,CAAa,YAAA;AACtB;AAMO,iCAAiC,KAAgC;AACtE,SAAO,EAAE,IAAI;AACf;AAOO,wBAAwB,KAAa,aAAgC;AACnE,SAAA,EAAE,KAAK;AAChB;AAIgC,2BAAA;AAAA,EAC9B,mCAAmB,IAAI;AAAA,IACoB,IAAW;AAChD,QAAA,mCAAmB;AAEZ,eAAA,QAAQ,CAAC,aAAa,gBAAgB;AACjD,iBAAa,IAAI,aAAa,eAAe,aAAa,WAAW,CAAC;AAAA,EAAA,CACvE;AAEM,SAAA;AACT;AAEA,sBAAsB,OAAqC;AAClD,SAAA;AACT;AAEO,uBAAqB,OAAc,aAAsC;;AAC9E,SAAO,mBAAa,KAAK,EAAE,IAAI,WAAW,MAAnC,YAAwC;AACjD;AAEwB,mBAAA,QAAeA,kBAAgB,GAAG,QAAuB;AAC/E,UAAQ,OAAO;AAAA,SACRC,QAAY,YAAA;AACR,aAAA,IAAI,IAAI,KAAK,EAAE,IAAI,OAAO,QAAQ,aAAa,OAAO,QAAQ,QAAQ;AAAA,SAE1EA,QAAAA,YAAY,qBAAqB;AAC9B,YAAA,YAAY,IAAI,IAAI,KAAK;AAE/B,YAAM,UAAU,UAAU,OAAO,OAAO,QAAQ,WAAW;AAE3D,aAAO,UAAU,YAAY;AAAA,IAC/B;AAAA;AAGS,aAAA;AAAA;AAEb;ACrDgC,2BAAA;AAAA,EAC9BC,sCAAsBC,IAAJ;AAAA,IACkC,IAAW;AACxDD,SAAAA;AACR;AAED,4BAA4BE,OAA0C;AAC7DA,SAAAA;AACR;AAEM,6BAA2BA,OAAcC,MAAoC;;AAC3EC,SAAAA,yBAAmBF,KAAD,EA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B,WAAOE,eAA2B,YAAY,QAAQ,MAAM,SAAS;AAAA,KACpE,IAAqB;AAEjB,SAAA;AACT;AAEO,wBAAwB,OAAuB;AACpD,SAAO,MAAM;AACf;AAM+B,wBAAA;AAAA,EAC7B;AAAA,EACA;AAAA,IAIE,IAAW;AACb,SAAOC,MACL,YAAA,SACA,iCAAK,iBAAL,EAAqB,WAAWC,kBAA0B,EAAE,aAAc,CAAA,EAC1E,IAAAC,sBAAgBC,eAAAA,UAAK,CACvB;AACF;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"react-page.cjs.js","sources":["../src/state/modules/read-only-documents.ts","../src/state/modules/react-components.tsx","../src/state/modules/components-meta.ts","../src/state/modules/prop-controllers.ts","../src/state/modules/is-in-builder.ts","../src/prop-controllers/introspection.ts","../src/state/react-page.ts"],"sourcesContent":["import { Action, ActionTypes } from '../actions'\n\nexport type Data = undefined | null | boolean | number | string | Data[] | { [key: string]: Data }\n\nexport type ElementData = { type: string; key: string; props: Record<string, Data> }\n\nexport type ElementReference = { type: 'reference'; key: string; value: string }\n\nexport type Element = ElementData | ElementReference\n\nexport function isElementReference(element: Element): element is ElementReference {\n return !('props' in element)\n}\n\nexport type DocumentReference = {\n key: string\n}\n\nexport function createDocumentReference(key: string): DocumentReference {\n return { key }\n}\n\nexport type Document = {\n key: string\n rootElement: Element\n}\n\nexport function createDocument(key: string, rootElement: Element): Document {\n return { key, rootElement }\n}\n\nexport type State = Map<string, Document>\n\nexport function getInitialState({\n rootElements = new Map(),\n}: { rootElements?: Map<string, Element> } = {}): State {\n const initialState = new Map()\n\n rootElements.forEach((rootElement, documentKey) => {\n initialState.set(documentKey, createDocument(documentKey, rootElement))\n })\n\n return initialState\n}\n\nfunction getDocuments(state: State): Map<string, Document> {\n return state\n}\n\nexport function getDocument(state: State, documentKey: string): Document | null {\n return getDocuments(state).get(documentKey) ?? null\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.REGISTER_DOCUMENT:\n return new Map(state).set(action.payload.documentKey, action.payload.document)\n\n case ActionTypes.UNREGISTER_DOCUMENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.documentKey)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import type {\n ClassAttributes,\n ComponentClass,\n PropsWithoutRef,\n RefAttributes,\n VoidFunctionComponent,\n} from 'react'\n\nimport { Action, ActionTypes } from '../actions'\n\nexport type ComponentType<P = Record<string, any>, T = any> =\n | ComponentClass<PropsWithoutRef<P> & ClassAttributes<T>>\n | VoidFunctionComponent<PropsWithoutRef<P> & RefAttributes<T>>\n\nexport type State = Map<string, ComponentType>\n\nexport function getInitialState({\n reactComponents = new Map(),\n}: { reactComponents?: Map<string, ComponentType> } = {}): State {\n return reactComponents\n}\n\nfunction getReactComponents(state: State): Map<string, ComponentType> {\n return state\n}\n\nexport function getReactComponent(state: State, type: string): ComponentType | null {\n return getReactComponents(state).get(type) ?? null\n}\n\nexport function reducer(state: State = getInitialState(), action: Action) {\n switch (action.type) {\n case ActionTypes.REGISTER_REACT_COMPONENT:\n return new Map(state).set(action.payload.type, action.payload.component)\n\n case ActionTypes.UNREGISTER_REACT_COMPONENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.type)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import { Action, ActionTypes } from '../actions'\n\nexport type ComponentIcon =\n | 'Carousel40'\n | 'Code40'\n | 'Countdown40'\n | 'Cube40'\n | 'Divider40'\n | 'Form40'\n | 'Navigation40'\n | 'SocialLinks40'\n | 'Video40'\n\nexport type ComponentMeta = { label: string; icon: ComponentIcon; hidden: boolean }\n\nexport type State = Map<string, ComponentMeta>\n\nexport function getInitialState({\n componentsMeta = new Map(),\n}: { componentsMeta?: Map<string, ComponentMeta> } = {}): State {\n return componentsMeta\n}\n\nexport function getComponentsMeta(state: State): Map<string, ComponentMeta> {\n return state\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.REGISTER_COMPONENT:\n return new Map(state).set(action.payload.type, action.payload.meta)\n\n case ActionTypes.UNREGISTER_COMPONENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.type)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import { Action, ActionTypes } from '../actions'\nimport { PropControllerDescriptor } from '../../prop-controllers'\n\nexport type { PropControllerDescriptor }\n\nexport type State = Map<string, Record<string, PropControllerDescriptor>>\n\nexport function getInitialState({\n propControllerDescriptors = new Map(),\n}: {\n propControllerDescriptors?: Map<string, Record<string, PropControllerDescriptor>>\n} = {}): State {\n return propControllerDescriptors\n}\n\nexport function getPropControllerDescriptors(\n state: State,\n): Map<string, Record<string, PropControllerDescriptor>> {\n return state\n}\n\nexport function getComponentPropControllerDescriptors(\n state: State,\n componentType: string,\n): Record<string, PropControllerDescriptor> | null {\n return getPropControllerDescriptors(state).get(componentType) ?? null\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.REGISTER_COMPONENT:\n return new Map(state).set(action.payload.type, action.payload.propControllerDescriptors)\n\n case ActionTypes.UNREGISTER_COMPONENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.type)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import { Action, ActionTypes } from '../actions'\n\nexport type State = boolean\n\nexport function getInitialState(): State {\n return false\n}\n\nexport function getIsInBuilder(state: State): boolean {\n return state\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.SET_IS_IN_BUILDER:\n return action.payload\n\n default:\n return state\n }\n}\n","import { Descriptor, ElementIDValue, GridValue, Types } from './descriptors'\nimport { Data, Element } from '../state/react-page'\n\nexport function getElementChildren<T extends Data>(\n descriptor: Descriptor<T>,\n prop: T | undefined,\n): Element[] {\n if (prop == null) return []\n\n switch (descriptor.type) {\n case Types.Grid:\n return (prop as GridValue).elements\n\n default:\n return []\n }\n}\n\nexport function getElementId<T extends Data>(\n descriptor: Descriptor<T>,\n prop: T | undefined,\n): string | null {\n if (prop == null) return null\n\n switch (descriptor.type) {\n case Types.ElementID:\n return prop as ElementIDValue\n\n default:\n return null\n }\n}\n","import {\n applyMiddleware,\n combineReducers,\n createStore,\n PreloadedState,\n Store as ReduxStore,\n} from 'redux'\nimport thunk, { ThunkDispatch } from 'redux-thunk'\n\nimport * as Documents from './modules/read-only-documents'\nimport * as ReactComponents from './modules/react-components'\nimport * as ComponentsMeta from './modules/components-meta'\nimport * as PropControllers from './modules/prop-controllers'\nimport * as IsInBuilder from './modules/is-in-builder'\nimport * as Introspection from '../prop-controllers/introspection'\nimport { Action } from './actions'\n\nexport type {\n Data,\n Document,\n DocumentReference,\n Element,\n ElementData,\n ElementReference,\n} from './modules/read-only-documents'\nexport {\n createDocument,\n createDocumentReference,\n isElementReference,\n} from './modules/read-only-documents'\nexport type { ComponentType } from './modules/react-components'\n\nconst reducer = combineReducers({\n documents: Documents.reducer,\n reactComponents: ReactComponents.reducer,\n componentsMeta: ComponentsMeta.reducer,\n propControllers: PropControllers.reducer,\n isInBuilder: IsInBuilder.reducer,\n})\n\nexport type State = ReturnType<typeof reducer>\n\nfunction getDocumentsStateSlice(state: State): Documents.State {\n return state.documents\n}\n\nexport function getDocument(state: State, documentKey: string): Documents.Document | null {\n return Documents.getDocument(getDocumentsStateSlice(state), documentKey)\n}\n\nfunction getReactComponentsStateSlice(state: State): ReactComponents.State {\n return state.reactComponents\n}\n\nexport function getReactComponent(\n state: State,\n type: string,\n): ReactComponents.ComponentType | null {\n return ReactComponents.getReactComponent(getReactComponentsStateSlice(state), type)\n}\n\nfunction getPropControllersStateSlice(state: State): PropControllers.State {\n return state.propControllers\n}\n\nfunction getPropControllerDescriptors(\n state: State,\n): Map<string, Record<string, PropControllers.PropControllerDescriptor>> {\n return PropControllers.getPropControllerDescriptors(getPropControllersStateSlice(state))\n}\n\nexport function getComponentPropControllerDescriptors(\n state: State,\n componentType: string,\n): Record<string, PropControllers.PropControllerDescriptor> | null {\n return PropControllers.getComponentPropControllerDescriptors(\n getPropControllersStateSlice(state),\n componentType,\n )\n}\n\nfunction normalizeElement(\n element: Documents.Element,\n descriptors: Map<string, Record<string, PropControllers.PropControllerDescriptor>>,\n): Map<string, Documents.Element> {\n const elements = new Map<string, Documents.Element>()\n const remaining = [element]\n let current: Documents.Element | undefined\n\n while ((current = remaining.pop())) {\n elements.set(current.key, current)\n\n if (Documents.isElementReference(current)) continue\n\n const elementDescriptors = descriptors.get(current.type)\n\n if (elementDescriptors == null) continue\n\n const parent = current\n const children = Object.entries(elementDescriptors).reduce((acc, [propName, descriptor]) => {\n return [...acc, ...Introspection.getElementChildren(descriptor, parent.props[propName])]\n }, [] as Documents.Element[])\n\n remaining.push(...children)\n }\n\n return elements\n}\n\nfunction getDocumentElements(state: State, documentKey: string): Map<string, Documents.Element> {\n const document = getDocument(state, documentKey)\n const descriptors = getPropControllerDescriptors(state)\n\n if (document == null) return new Map()\n\n return normalizeElement(document.rootElement, descriptors)\n}\n\nexport function getElement(\n state: State,\n documentKey: string,\n elementKey: string,\n): Documents.Element | null {\n return getDocumentElements(state, documentKey).get(elementKey) ?? null\n}\n\nexport function getElementPropControllerDescriptors(\n state: State,\n documentKey: string,\n elementKey: string,\n): Record<string, PropControllers.PropControllerDescriptor> | null {\n const element = getElement(state, documentKey, elementKey)\n\n if (element == null || Documents.isElementReference(element)) return null\n\n return getComponentPropControllerDescriptors(state, element.type)\n}\n\nexport function getElementId(state: State, documentKey: string, elementKey: string): string | null {\n const element = getElement(state, documentKey, elementKey)\n\n if (element == null || Documents.isElementReference(element)) return null\n\n const descriptors = getComponentPropControllerDescriptors(state, element.type)\n\n if (descriptors == null) return null\n\n const elementId = Object.entries(descriptors).reduce((acc, [propName, descriptor]) => {\n if (acc != null) return acc\n\n return Introspection.getElementId(descriptor, element.props[propName])\n }, null as string | null)\n\n return elementId\n}\n\nexport function getIsInBuilder(state: State): boolean {\n return state.isInBuilder\n}\n\nexport type Dispatch = ThunkDispatch<State, unknown, Action>\n\nexport type Store = ReduxStore<State, Action> & { dispatch: Dispatch }\n\nexport function configureStore({\n rootElements,\n preloadedState,\n}: {\n rootElements?: Map<string, Documents.Element>\n preloadedState?: PreloadedState<State>\n} = {}): Store {\n return createStore(\n reducer,\n { ...preloadedState, documents: Documents.getInitialState({ rootElements }) },\n applyMiddleware(thunk),\n )\n}\n"],"names":["getInitialState","ActionTypes","reactComponents","Map","state","type","getReactComponents","get","action","REGISTER_REACT_COMPONENT","set","payload","component","UNREGISTER_REACT_COMPONENT","nextState","deleted","delete","getPropControllerDescriptors","Types","combineReducers","Documents.reducer","ReactComponents.reducer","ComponentsMeta.reducer","PropControllers.reducer","IsInBuilder.reducer","Documents.getDocument","ReactComponents.getReactComponent","PropControllers.getPropControllerDescriptors","PropControllers.getComponentPropControllerDescriptors","Documents.isElementReference","Introspection.getElementChildren","Introspection.getElementId","createStore","Documents.getInitialState","applyMiddleware","thunk"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,4BAA4B,SAA+C;AAChF,SAAO,CAAa,YAAA;AACtB;AAMO,iCAAiC,KAAgC;AACtE,SAAO,EAAE,IAAI;AACf;AAOO,wBAAwB,KAAa,aAAgC;AACnE,SAAA,EAAE,KAAK;AAChB;AAIgC,2BAAA;AAAA,EAC9B,mCAAmB,IAAI;AAAA,IACoB,IAAW;AAChD,QAAA,mCAAmB;AAEZ,eAAA,QAAQ,CAAC,aAAa,gBAAgB;AACjD,iBAAa,IAAI,aAAa,eAAe,aAAa,WAAW,CAAC;AAAA,EAAA,CACvE;AAEM,SAAA;AACT;AAEA,sBAAsB,OAAqC;AAClD,SAAA;AACT;AAEO,uBAAqB,OAAc,aAAsC;;AAC9E,SAAO,mBAAa,KAAK,EAAE,IAAI,WAAW,MAAnC,YAAwC;AACjD;AAEwB,mBAAA,QAAeA,kBAAgB,GAAG,QAAuB;AAC/E,UA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SAAA,iBAAiB,SAAS,aAAa,YAAW;AAC3D;AAGE,oBAAA,OACA,aACA,YAC0B;;AAC1B,SAAO,0BAAoB,OAAO,WAAW,EAAE,IAAI,UAAU,MAAtD,YAA2D;AACpE;AAGE,6CAAA,OACA,aACA,YACiE;AACjE,QAAM,UAAU,WAAW,OAAO,aAAa,UAAU;AAEzD,MAAI,WAAW,QAAQD,mBAA6B,OAAO;AAAU,WAAA;AAE9D,SAAA,sCAAsC,OAAO,QAAQ,IAAI;AAClE;AAE6B,sBAAA,OAAc,aAAqB,YAAmC;AACjG,QAAM,UAAU,WAAW,OAAO,aAAa,UAAU;AAEzD,MAAI,WAAW,QAAQA,mBAA6B,OAAO;AAAU,WAAA;AAErE,QAAM,eAAc,sCAAsC,OAAO,QAAQ,IAAI;AAE7E,MAAI,gBAAe;AAAa,WAAA;AAE1B,QAAA,YAAY,OAAO,QAAQ,YAAW,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,gBAAgB;AACpF,QAAI,OAAO;AAAa,aAAA;AAExB,WAAOE,eAA2B,YAAY,QAAQ,MAAM,SAAS;AAAA,KACpE,IAAqB;AAEjB,SAAA;AACT;AAEO,wBAAwB,OAAuB;AACpD,SAAO,MAAM;AACf;AAM+B,wBAAA;AAAA,EAC7B;AAAA,EACA;AAAA,IAIE,IAAW;AACb,SAAOC,MACL,YAAA,SACA,iCAAK,iBAAL,EAAqB,WAAWC,kBAA0B,EAAE,aAAc,CAAA,EAC1E,IAAAC,sBAAgBC,eAAAA,UAAK,CACvB;AACF;;;;;;;;;;;;;;;;;;;;;"}
@@ -30,7 +30,7 @@ function createDocumentReference(key) {
30
30
  function createDocument(key, rootElement) {
31
31
  return { key, rootElement };
32
32
  }
33
- function getInitialState$3({
33
+ function getInitialState$4({
34
34
  rootElements = /* @__PURE__ */ new Map()
35
35
  } = {}) {
36
36
  const initialState = /* @__PURE__ */ new Map();
@@ -46,7 +46,7 @@ function getDocument$1(state, documentKey) {
46
46
  var _a;
47
47
  return (_a = getDocuments(state).get(documentKey)) != null ? _a : null;
48
48
  }
49
- function reducer$4(state = getInitialState$3(), action) {
49
+ function reducer$5(state = getInitialState$4(), action) {
50
50
  switch (action.type) {
51
51
  case ActionTypes.REGISTER_DOCUMENT:
52
52
  return new Map(state).set(action.payload.documentKey, action.payload.document);
@@ -59,7 +59,7 @@ function reducer$4(state = getInitialState$3(), action) {
59
59
  return state;
60
60
  }
61
61
  }
62
- function getInitialState$2({
62
+ function getInitialState$3({
63
63
  reactComponents = /* @__PURE__ */ new Map()
64
64
  } = {}) {
65
65
  return reactComponents;
@@ -71,7 +71,7 @@ function getReactComponent$1(state, type) {
71
71
  var _a;
72
72
  return (_a = getReactComponents(state).get(type)) != null ? _a : null;
73
73
  }
74
- function reducer$3(state = getInitialState$2(), action) {
74
+ function reducer$4(state = getInitialState$3(), action) {
75
75
  switch (action.type) {
76
76
  case ActionTypes.REGISTER_REACT_COMPONENT:
77
77
  return new Map(state).set(action.payload.type, action.payload.component);
@@ -84,7 +84,7 @@ function reducer$3(state = getInitialState$2(), action) {
84
84
  return state;
85
85
  }
86
86
  }
87
- function getInitialState$1({
87
+ function getInitialState$2({
88
88
  componentsMeta = /* @__PURE__ */ new Map()
89
89
  } = {}) {
90
90
  return componentsMeta;
@@ -92,7 +92,7 @@ function getInitialState$1({
92
92
  function getComponentsMeta(state) {
93
93
  return state;
94
94
  }
95
- function reducer$2(state = getInitialState$1(), action) {
95
+ function reducer$3(state = getInitialState$2(), action) {
96
96
  switch (action.type) {
97
97
  case ActionTypes.REGISTER_COMPONENT:
98
98
  return new Map(state).set(action.payload.type, action.payload.meta);
@@ -105,7 +105,7 @@ function reducer$2(state = getInitialState$1(), action) {
105
105
  return state;
106
106
  }
107
107
  }
108
- function getInitialState({
108
+ function getInitialState$1({
109
109
  propControllerDescriptors = /* @__PURE__ */ new Map()
110
110
  } = {}) {
111
111
  return propControllerDescriptors;
@@ -117,7 +117,7 @@ function getComponentPropControllerDescriptors$1(state, componentType) {
117
117
  var _a;
118
118
  return (_a = getPropControllerDescriptors$1(state).get(componentType)) != null ? _a : null;
119
119
  }
120
- function reducer$1(state = getInitialState(), action) {
120
+ function reducer$2(state = getInitialState$1(), action) {
121
121
  switch (action.type) {
122
122
  case ActionTypes.REGISTER_COMPONENT:
123
123
  return new Map(state).set(action.payload.type, action.payload.propControllerDescriptors);
@@ -130,6 +130,17 @@ function reducer$1(state = getInitialState(), action) {
130
130
  return state;
131
131
  }
132
132
  }
133
+ function getInitialState() {
134
+ return false;
135
+ }
136
+ function reducer$1(state = getInitialState(), action) {
137
+ switch (action.type) {
138
+ case ActionTypes.SET_IS_IN_BUILDER:
139
+ return action.payload;
140
+ default:
141
+ return state;
142
+ }
143
+ }
133
144
  function getElementChildren(descriptor, prop) {
134
145
  if (prop == null)
135
146
  return [];
@@ -151,11 +162,11 @@ function getElementId$1(descriptor, prop) {
151
162
  }
152
163
  }
153
164
  const reducer = combineReducers({
154
- documents: reducer$4,
155
- reactComponents: reducer$3,
156
- componentsMeta: reducer$2,
157
- propControllers: reducer$1,
158
- isInBuilder: (_state = false, _action) => false
165
+ documents: reducer$5,
166
+ reactComponents: reducer$4,
167
+ componentsMeta: reducer$3,
168
+ propControllers: reducer$2,
169
+ isInBuilder: reducer$1
159
170
  });
160
171
  function getDocumentsStateSlice(state) {
161
172
  return state.documents;
@@ -235,7 +246,7 @@ function configureStore({
235
246
  rootElements,
236
247
  preloadedState
237
248
  } = {}) {
238
- return createStore(reducer, __spreadProps(__spreadValues({}, preloadedState), { documents: getInitialState$3({ rootElements }) }), applyMiddleware(thunk));
249
+ return createStore(reducer, __spreadProps(__spreadValues({}, preloadedState), { documents: getInitialState$4({ rootElements }) }), applyMiddleware(thunk));
239
250
  }
240
- export { createDocumentReference as a, getIsInBuilder as b, createDocument as c, configureStore as d, getElementId as e, getReactComponent as f, getComponentPropControllerDescriptors as g, getDocument as h, isElementReference as i, getInitialState$3 as j, getDocument$1 as k, reducer$3 as l, reducer$2 as m, reducer$1 as n, getComponentsMeta as o, getComponentPropControllerDescriptors$1 as p, getElementPropControllerDescriptors as q, reducer$4 as r };
251
+ export { createDocumentReference as a, getIsInBuilder as b, createDocument as c, configureStore as d, getElementId as e, getReactComponent as f, getComponentPropControllerDescriptors as g, getDocument as h, isElementReference as i, getInitialState$4 as j, getDocument$1 as k, reducer$4 as l, reducer$3 as m, reducer$2 as n, reducer$1 as o, getComponentsMeta as p, getComponentPropControllerDescriptors$1 as q, reducer$5 as r, getElement as s, getElementPropControllerDescriptors as t };
241
252
  //# sourceMappingURL=react-page.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-page.es.js","sources":["../src/state/modules/read-only-documents.ts","../src/state/modules/react-components.tsx","../src/state/modules/components-meta.ts","../src/state/modules/prop-controllers.ts","../src/prop-controllers/introspection.ts","../src/state/react-page.ts"],"sourcesContent":["import { Action, ActionTypes } from '../actions'\n\nexport type Data = undefined | null | boolean | number | string | Data[] | { [key: string]: Data }\n\nexport type ElementData = { type: string; key: string; props: Record<string, Data> }\n\nexport type ElementReference = { type: 'reference'; key: string; value: string }\n\nexport type Element = ElementData | ElementReference\n\nexport function isElementReference(element: Element): element is ElementReference {\n return !('props' in element)\n}\n\nexport type DocumentReference = {\n key: string\n}\n\nexport function createDocumentReference(key: string): DocumentReference {\n return { key }\n}\n\nexport type Document = {\n key: string\n rootElement: Element\n}\n\nexport function createDocument(key: string, rootElement: Element): Document {\n return { key, rootElement }\n}\n\nexport type State = Map<string, Document>\n\nexport function getInitialState({\n rootElements = new Map(),\n}: { rootElements?: Map<string, Element> } = {}): State {\n const initialState = new Map()\n\n rootElements.forEach((rootElement, documentKey) => {\n initialState.set(documentKey, createDocument(documentKey, rootElement))\n })\n\n return initialState\n}\n\nfunction getDocuments(state: State): Map<string, Document> {\n return state\n}\n\nexport function getDocument(state: State, documentKey: string): Document | null {\n return getDocuments(state).get(documentKey) ?? null\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.REGISTER_DOCUMENT:\n return new Map(state).set(action.payload.documentKey, action.payload.document)\n\n case ActionTypes.UNREGISTER_DOCUMENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.documentKey)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import type {\n ClassAttributes,\n ComponentClass,\n PropsWithoutRef,\n RefAttributes,\n VoidFunctionComponent,\n} from 'react'\n\nimport { Action, ActionTypes } from '../actions'\n\nexport type ComponentType<P = Record<string, any>, T = any> =\n | ComponentClass<PropsWithoutRef<P> & ClassAttributes<T>>\n | VoidFunctionComponent<PropsWithoutRef<P> & RefAttributes<T>>\n\nexport type State = Map<string, ComponentType>\n\nexport function getInitialState({\n reactComponents = new Map(),\n}: { reactComponents?: Map<string, ComponentType> } = {}): State {\n return reactComponents\n}\n\nfunction getReactComponents(state: State): Map<string, ComponentType> {\n return state\n}\n\nexport function getReactComponent(state: State, type: string): ComponentType | null {\n return getReactComponents(state).get(type) ?? null\n}\n\nexport function reducer(state: State = getInitialState(), action: Action) {\n switch (action.type) {\n case ActionTypes.REGISTER_REACT_COMPONENT:\n return new Map(state).set(action.payload.type, action.payload.component)\n\n case ActionTypes.UNREGISTER_REACT_COMPONENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.type)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import { Action, ActionTypes } from '../actions'\n\nexport type ComponentIcon =\n | 'Carousel40'\n | 'Code40'\n | 'Countdown40'\n | 'Cube40'\n | 'Divider40'\n | 'Form40'\n | 'Navigation40'\n | 'SocialLinks40'\n | 'Video40'\n\nexport type ComponentMeta = { label: string; icon: ComponentIcon; hidden: boolean }\n\nexport type State = Map<string, ComponentMeta>\n\nexport function getInitialState({\n componentsMeta = new Map(),\n}: { componentsMeta?: Map<string, ComponentMeta> } = {}): State {\n return componentsMeta\n}\n\nexport function getComponentsMeta(state: State): Map<string, ComponentMeta> {\n return state\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.REGISTER_COMPONENT:\n return new Map(state).set(action.payload.type, action.payload.meta)\n\n case ActionTypes.UNREGISTER_COMPONENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.type)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import { Action, ActionTypes } from '../actions'\nimport { PropControllerDescriptor } from '../../prop-controllers'\n\nexport type { PropControllerDescriptor }\n\nexport type State = Map<string, Record<string, PropControllerDescriptor>>\n\nexport function getInitialState({\n propControllerDescriptors = new Map(),\n}: {\n propControllerDescriptors?: Map<string, Record<string, PropControllerDescriptor>>\n} = {}): State {\n return propControllerDescriptors\n}\n\nexport function getPropControllerDescriptors(\n state: State,\n): Map<string, Record<string, PropControllerDescriptor>> {\n return state\n}\n\nexport function getComponentPropControllerDescriptors(\n state: State,\n componentType: string,\n): Record<string, PropControllerDescriptor> | null {\n return getPropControllerDescriptors(state).get(componentType) ?? null\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.REGISTER_COMPONENT:\n return new Map(state).set(action.payload.type, action.payload.propControllerDescriptors)\n\n case ActionTypes.UNREGISTER_COMPONENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.type)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import { Descriptor, ElementIDValue, GridValue, Types } from './descriptors'\nimport { Data, Element } from '../state/react-page'\n\nexport function getElementChildren<T extends Data>(\n descriptor: Descriptor<T>,\n prop: T | undefined,\n): Element[] {\n if (prop == null) return []\n\n switch (descriptor.type) {\n case Types.Grid:\n return (prop as GridValue).elements\n\n default:\n return []\n }\n}\n\nexport function getElementId<T extends Data>(\n descriptor: Descriptor<T>,\n prop: T | undefined,\n): string | null {\n if (prop == null) return null\n\n switch (descriptor.type) {\n case Types.ElementID:\n return prop as ElementIDValue\n\n default:\n return null\n }\n}\n","import {\n applyMiddleware,\n combineReducers,\n createStore,\n PreloadedState,\n Store as ReduxStore,\n} from 'redux'\nimport thunk, { ThunkDispatch } from 'redux-thunk'\n\nimport * as Documents from './modules/read-only-documents'\nimport * as ReactComponents from './modules/react-components'\nimport * as ComponentsMeta from './modules/components-meta'\nimport * as PropControllers from './modules/prop-controllers'\nimport * as Introspection from '../prop-controllers/introspection'\nimport { Action } from './actions'\n\nexport type {\n Data,\n Document,\n DocumentReference,\n Element,\n ElementData,\n ElementReference,\n} from './modules/read-only-documents'\nexport {\n createDocument,\n createDocumentReference,\n isElementReference,\n} from './modules/read-only-documents'\nexport type { ComponentType } from './modules/react-components'\n\nconst reducer = combineReducers({\n documents: Documents.reducer,\n reactComponents: ReactComponents.reducer,\n componentsMeta: ComponentsMeta.reducer,\n propControllers: PropControllers.reducer,\n isInBuilder: (_state: boolean = false, _action: Action): boolean => false,\n})\n\nexport type State = ReturnType<typeof reducer>\n\nfunction getDocumentsStateSlice(state: State): Documents.State {\n return state.documents\n}\n\nexport function getDocument(state: State, documentKey: string): Documents.Document | null {\n return Documents.getDocument(getDocumentsStateSlice(state), documentKey)\n}\n\nfunction getReactComponentsStateSlice(state: State): ReactComponents.State {\n return state.reactComponents\n}\n\nexport function getReactComponent(\n state: State,\n type: string,\n): ReactComponents.ComponentType | null {\n return ReactComponents.getReactComponent(getReactComponentsStateSlice(state), type)\n}\n\nfunction getPropControllersStateSlice(state: State): PropControllers.State {\n return state.propControllers\n}\n\nfunction getPropControllerDescriptors(\n state: State,\n): Map<string, Record<string, PropControllers.PropControllerDescriptor>> {\n return PropControllers.getPropControllerDescriptors(getPropControllersStateSlice(state))\n}\n\nexport function getComponentPropControllerDescriptors(\n state: State,\n componentType: string,\n): Record<string, PropControllers.PropControllerDescriptor> | null {\n return PropControllers.getComponentPropControllerDescriptors(\n getPropControllersStateSlice(state),\n componentType,\n )\n}\n\nfunction normalizeElement(\n element: Documents.Element,\n descriptors: Map<string, Record<string, PropControllers.PropControllerDescriptor>>,\n): Map<string, Documents.Element> {\n const elements = new Map<string, Documents.Element>()\n const remaining = [element]\n let current: Documents.Element | undefined\n\n while ((current = remaining.pop())) {\n elements.set(current.key, current)\n\n if (Documents.isElementReference(current)) continue\n\n const elementDescriptors = descriptors.get(current.type)\n\n if (elementDescriptors == null) continue\n\n const parent = current\n const children = Object.entries(elementDescriptors).reduce((acc, [propName, descriptor]) => {\n return [...acc, ...Introspection.getElementChildren(descriptor, parent.props[propName])]\n }, [] as Documents.Element[])\n\n remaining.push(...children)\n }\n\n return elements\n}\n\nfunction getDocumentElements(state: State, documentKey: string): Map<string, Documents.Element> {\n const document = getDocument(state, documentKey)\n const descriptors = getPropControllerDescriptors(state)\n\n if (document == null) return new Map()\n\n return normalizeElement(document.rootElement, descriptors)\n}\n\nexport function getElement(\n state: State,\n documentKey: string,\n elementKey: string,\n): Documents.Element | null {\n return getDocumentElements(state, documentKey).get(elementKey) ?? null\n}\n\nexport function getElementPropControllerDescriptors(\n state: State,\n documentKey: string,\n elementKey: string,\n): Record<string, PropControllers.PropControllerDescriptor> | null {\n const element = getElement(state, documentKey, elementKey)\n\n if (element == null || Documents.isElementReference(element)) return null\n\n return getComponentPropControllerDescriptors(state, element.type)\n}\n\nexport function getElementId(state: State, documentKey: string, elementKey: string): string | null {\n const element = getElement(state, documentKey, elementKey)\n\n if (element == null || Documents.isElementReference(element)) return null\n\n const descriptors = getComponentPropControllerDescriptors(state, element.type)\n\n if (descriptors == null) return null\n\n const elementId = Object.entries(descriptors).reduce((acc, [propName, descriptor]) => {\n if (acc != null) return acc\n\n return Introspection.getElementId(descriptor, element.props[propName])\n }, null as string | null)\n\n return elementId\n}\n\nexport function getIsInBuilder(state: State): boolean {\n return state.isInBuilder\n}\n\nexport type Dispatch = ThunkDispatch<State, unknown, Action>\n\nexport type Store = ReduxStore<State, Action> & { dispatch: Dispatch }\n\nexport function configureStore({\n rootElements,\n preloadedState,\n}: {\n rootElements?: Map<string, Documents.Element>\n preloadedState?: PreloadedState<State>\n} = {}): Store {\n return createStore(\n reducer,\n { ...preloadedState, documents: Documents.getInitialState({ rootElements }) },\n applyMiddleware(thunk),\n )\n}\n"],"names":["getInitialState","reactComponents","Map","state","type","getReactComponents","get","action","ActionTypes","REGISTER_REACT_COMPONENT","set","payload","component","UNREGISTER_REACT_COMPONENT","nextState","deleted","delete","getPropControllerDescriptors","Documents.reducer","ReactComponents.reducer","ComponentsMeta.reducer","PropControllers.reducer","Documents.getDocument","ReactComponents.getReactComponent","PropControllers.getPropControllerDescriptors","PropControllers.getComponentPropControllerDescriptors","Documents.isElementReference","Introspection.getElementChildren","Introspection.getElementId","Documents.getInitialState"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAUO,4BAA4B,SAA+C;AAChF,SAAO,CAAa,YAAA;AACtB;AAMO,iCAAiC,KAAgC;AACtE,SAAO,EAAE,IAAI;AACf;AAOO,wBAAwB,KAAa,aAAgC;AACnE,SAAA,EAAE,KAAK;AAChB;AAIgC,2BAAA;AAAA,EAC9B,mCAAmB,IAAI;AAAA,IACoB,IAAW;AAChD,QAAA,mCAAmB;AAEZ,eAAA,QAAQ,CAAC,aAAa,gBAAgB;AACjD,iBAAa,IAAI,aAAa,eAAe,aAAa,WAAW,CAAC;AAAA,EAAA,CACvE;AAEM,SAAA;AACT;AAEA,sBAAsB,OAAqC;AAClD,SAAA;AACT;AAEO,uBAAqB,OAAc,aAAsC;;AAC9E,SAAO,mBAAa,KAAK,EAAE,IAAI,WAAW,MAAnC,YAAwC;AACjD;AAEwB,mBAAA,QAAeA,kBAAgB,GAAG,QAAuB;AAC/E,UAAQ,OAAO;AAAA,SACR,YAAY;AACR,aAAA,IAAI,IAAI,KAAK,EAAE,IAAI,OAAO,QAAQ,aAAa,OAAO,QAAQ,QAAQ;AAAA,SAE1E,YAAY,qBAAqB;AAC9B,YAAA,YAAY,IAAI,IAAI,KAAK;AAE/B,YAAM,UAAU,UAAU,OAAO,OAAO,QAAQ,WAAW;AAE3D,aAAO,UAAU,YAAY;AAAA,IAC/B;AAAA;A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MAAI,eAAe;AAAa,WAAA;AAE1B,QAAA,YAAY,OAAO,QAAQ,WAAW,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,gBAAgB;AACpF,QAAI,OAAO;AAAa,aAAA;AAExB,WAAOE,eAA2B,YAAY,QAAQ,MAAM,SAAS;AAAA,KACpE,IAAqB;AAEjB,SAAA;AACT;AAEO,wBAAwB,OAAuB;AACpD,SAAO,MAAM;AACf;AAM+B,wBAAA;AAAA,EAC7B;AAAA,EACA;AAAA,IAIE,IAAW;AACb,SAAO,YACL,SACA,iCAAK,iBAAL,EAAqB,WAAWC,kBAA0B,EAAE,aAAc,CAAA,EAC1E,IAAA,gBAAgB,KAAK,CACvB;AACF;;"}
1
+ {"version":3,"file":"react-page.es.js","sources":["../src/state/modules/read-only-documents.ts","../src/state/modules/react-components.tsx","../src/state/modules/components-meta.ts","../src/state/modules/prop-controllers.ts","../src/state/modules/is-in-builder.ts","../src/prop-controllers/introspection.ts","../src/state/react-page.ts"],"sourcesContent":["import { Action, ActionTypes } from '../actions'\n\nexport type Data = undefined | null | boolean | number | string | Data[] | { [key: string]: Data }\n\nexport type ElementData = { type: string; key: string; props: Record<string, Data> }\n\nexport type ElementReference = { type: 'reference'; key: string; value: string }\n\nexport type Element = ElementData | ElementReference\n\nexport function isElementReference(element: Element): element is ElementReference {\n return !('props' in element)\n}\n\nexport type DocumentReference = {\n key: string\n}\n\nexport function createDocumentReference(key: string): DocumentReference {\n return { key }\n}\n\nexport type Document = {\n key: string\n rootElement: Element\n}\n\nexport function createDocument(key: string, rootElement: Element): Document {\n return { key, rootElement }\n}\n\nexport type State = Map<string, Document>\n\nexport function getInitialState({\n rootElements = new Map(),\n}: { rootElements?: Map<string, Element> } = {}): State {\n const initialState = new Map()\n\n rootElements.forEach((rootElement, documentKey) => {\n initialState.set(documentKey, createDocument(documentKey, rootElement))\n })\n\n return initialState\n}\n\nfunction getDocuments(state: State): Map<string, Document> {\n return state\n}\n\nexport function getDocument(state: State, documentKey: string): Document | null {\n return getDocuments(state).get(documentKey) ?? null\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.REGISTER_DOCUMENT:\n return new Map(state).set(action.payload.documentKey, action.payload.document)\n\n case ActionTypes.UNREGISTER_DOCUMENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.documentKey)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import type {\n ClassAttributes,\n ComponentClass,\n PropsWithoutRef,\n RefAttributes,\n VoidFunctionComponent,\n} from 'react'\n\nimport { Action, ActionTypes } from '../actions'\n\nexport type ComponentType<P = Record<string, any>, T = any> =\n | ComponentClass<PropsWithoutRef<P> & ClassAttributes<T>>\n | VoidFunctionComponent<PropsWithoutRef<P> & RefAttributes<T>>\n\nexport type State = Map<string, ComponentType>\n\nexport function getInitialState({\n reactComponents = new Map(),\n}: { reactComponents?: Map<string, ComponentType> } = {}): State {\n return reactComponents\n}\n\nfunction getReactComponents(state: State): Map<string, ComponentType> {\n return state\n}\n\nexport function getReactComponent(state: State, type: string): ComponentType | null {\n return getReactComponents(state).get(type) ?? null\n}\n\nexport function reducer(state: State = getInitialState(), action: Action) {\n switch (action.type) {\n case ActionTypes.REGISTER_REACT_COMPONENT:\n return new Map(state).set(action.payload.type, action.payload.component)\n\n case ActionTypes.UNREGISTER_REACT_COMPONENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.type)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import { Action, ActionTypes } from '../actions'\n\nexport type ComponentIcon =\n | 'Carousel40'\n | 'Code40'\n | 'Countdown40'\n | 'Cube40'\n | 'Divider40'\n | 'Form40'\n | 'Navigation40'\n | 'SocialLinks40'\n | 'Video40'\n\nexport type ComponentMeta = { label: string; icon: ComponentIcon; hidden: boolean }\n\nexport type State = Map<string, ComponentMeta>\n\nexport function getInitialState({\n componentsMeta = new Map(),\n}: { componentsMeta?: Map<string, ComponentMeta> } = {}): State {\n return componentsMeta\n}\n\nexport function getComponentsMeta(state: State): Map<string, ComponentMeta> {\n return state\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.REGISTER_COMPONENT:\n return new Map(state).set(action.payload.type, action.payload.meta)\n\n case ActionTypes.UNREGISTER_COMPONENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.type)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import { Action, ActionTypes } from '../actions'\nimport { PropControllerDescriptor } from '../../prop-controllers'\n\nexport type { PropControllerDescriptor }\n\nexport type State = Map<string, Record<string, PropControllerDescriptor>>\n\nexport function getInitialState({\n propControllerDescriptors = new Map(),\n}: {\n propControllerDescriptors?: Map<string, Record<string, PropControllerDescriptor>>\n} = {}): State {\n return propControllerDescriptors\n}\n\nexport function getPropControllerDescriptors(\n state: State,\n): Map<string, Record<string, PropControllerDescriptor>> {\n return state\n}\n\nexport function getComponentPropControllerDescriptors(\n state: State,\n componentType: string,\n): Record<string, PropControllerDescriptor> | null {\n return getPropControllerDescriptors(state).get(componentType) ?? null\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.REGISTER_COMPONENT:\n return new Map(state).set(action.payload.type, action.payload.propControllerDescriptors)\n\n case ActionTypes.UNREGISTER_COMPONENT: {\n const nextState = new Map(state)\n\n const deleted = nextState.delete(action.payload.type)\n\n return deleted ? nextState : state\n }\n\n default:\n return state\n }\n}\n","import { Action, ActionTypes } from '../actions'\n\nexport type State = boolean\n\nexport function getInitialState(): State {\n return false\n}\n\nexport function getIsInBuilder(state: State): boolean {\n return state\n}\n\nexport function reducer(state: State = getInitialState(), action: Action): State {\n switch (action.type) {\n case ActionTypes.SET_IS_IN_BUILDER:\n return action.payload\n\n default:\n return state\n }\n}\n","import { Descriptor, ElementIDValue, GridValue, Types } from './descriptors'\nimport { Data, Element } from '../state/react-page'\n\nexport function getElementChildren<T extends Data>(\n descriptor: Descriptor<T>,\n prop: T | undefined,\n): Element[] {\n if (prop == null) return []\n\n switch (descriptor.type) {\n case Types.Grid:\n return (prop as GridValue).elements\n\n default:\n return []\n }\n}\n\nexport function getElementId<T extends Data>(\n descriptor: Descriptor<T>,\n prop: T | undefined,\n): string | null {\n if (prop == null) return null\n\n switch (descriptor.type) {\n case Types.ElementID:\n return prop as ElementIDValue\n\n default:\n return null\n }\n}\n","import {\n applyMiddleware,\n combineReducers,\n createStore,\n PreloadedState,\n Store as ReduxStore,\n} from 'redux'\nimport thunk, { ThunkDispatch } from 'redux-thunk'\n\nimport * as Documents from './modules/read-only-documents'\nimport * as ReactComponents from './modules/react-components'\nimport * as ComponentsMeta from './modules/components-meta'\nimport * as PropControllers from './modules/prop-controllers'\nimport * as IsInBuilder from './modules/is-in-builder'\nimport * as Introspection from '../prop-controllers/introspection'\nimport { Action } from './actions'\n\nexport type {\n Data,\n Document,\n DocumentReference,\n Element,\n ElementData,\n ElementReference,\n} from './modules/read-only-documents'\nexport {\n createDocument,\n createDocumentReference,\n isElementReference,\n} from './modules/read-only-documents'\nexport type { ComponentType } from './modules/react-components'\n\nconst reducer = combineReducers({\n documents: Documents.reducer,\n reactComponents: ReactComponents.reducer,\n componentsMeta: ComponentsMeta.reducer,\n propControllers: PropControllers.reducer,\n isInBuilder: IsInBuilder.reducer,\n})\n\nexport type State = ReturnType<typeof reducer>\n\nfunction getDocumentsStateSlice(state: State): Documents.State {\n return state.documents\n}\n\nexport function getDocument(state: State, documentKey: string): Documents.Document | null {\n return Documents.getDocument(getDocumentsStateSlice(state), documentKey)\n}\n\nfunction getReactComponentsStateSlice(state: State): ReactComponents.State {\n return state.reactComponents\n}\n\nexport function getReactComponent(\n state: State,\n type: string,\n): ReactComponents.ComponentType | null {\n return ReactComponents.getReactComponent(getReactComponentsStateSlice(state), type)\n}\n\nfunction getPropControllersStateSlice(state: State): PropControllers.State {\n return state.propControllers\n}\n\nfunction getPropControllerDescriptors(\n state: State,\n): Map<string, Record<string, PropControllers.PropControllerDescriptor>> {\n return PropControllers.getPropControllerDescriptors(getPropControllersStateSlice(state))\n}\n\nexport function getComponentPropControllerDescriptors(\n state: State,\n componentType: string,\n): Record<string, PropControllers.PropControllerDescriptor> | null {\n return PropControllers.getComponentPropControllerDescriptors(\n getPropControllersStateSlice(state),\n componentType,\n )\n}\n\nfunction normalizeElement(\n element: Documents.Element,\n descriptors: Map<string, Record<string, PropControllers.PropControllerDescriptor>>,\n): Map<string, Documents.Element> {\n const elements = new Map<string, Documents.Element>()\n const remaining = [element]\n let current: Documents.Element | undefined\n\n while ((current = remaining.pop())) {\n elements.set(current.key, current)\n\n if (Documents.isElementReference(current)) continue\n\n const elementDescriptors = descriptors.get(current.type)\n\n if (elementDescriptors == null) continue\n\n const parent = current\n const children = Object.entries(elementDescriptors).reduce((acc, [propName, descriptor]) => {\n return [...acc, ...Introspection.getElementChildren(descriptor, parent.props[propName])]\n }, [] as Documents.Element[])\n\n remaining.push(...children)\n }\n\n return elements\n}\n\nfunction getDocumentElements(state: State, documentKey: string): Map<string, Documents.Element> {\n const document = getDocument(state, documentKey)\n const descriptors = getPropControllerDescriptors(state)\n\n if (document == null) return new Map()\n\n return normalizeElement(document.rootElement, descriptors)\n}\n\nexport function getElement(\n state: State,\n documentKey: string,\n elementKey: string,\n): Documents.Element | null {\n return getDocumentElements(state, documentKey).get(elementKey) ?? null\n}\n\nexport function getElementPropControllerDescriptors(\n state: State,\n documentKey: string,\n elementKey: string,\n): Record<string, PropControllers.PropControllerDescriptor> | null {\n const element = getElement(state, documentKey, elementKey)\n\n if (element == null || Documents.isElementReference(element)) return null\n\n return getComponentPropControllerDescriptors(state, element.type)\n}\n\nexport function getElementId(state: State, documentKey: string, elementKey: string): string | null {\n const element = getElement(state, documentKey, elementKey)\n\n if (element == null || Documents.isElementReference(element)) return null\n\n const descriptors = getComponentPropControllerDescriptors(state, element.type)\n\n if (descriptors == null) return null\n\n const elementId = Object.entries(descriptors).reduce((acc, [propName, descriptor]) => {\n if (acc != null) return acc\n\n return Introspection.getElementId(descriptor, element.props[propName])\n }, null as string | null)\n\n return elementId\n}\n\nexport function getIsInBuilder(state: State): boolean {\n return state.isInBuilder\n}\n\nexport type Dispatch = ThunkDispatch<State, unknown, Action>\n\nexport type Store = ReduxStore<State, Action> & { dispatch: Dispatch }\n\nexport function configureStore({\n rootElements,\n preloadedState,\n}: {\n rootElements?: Map<string, Documents.Element>\n preloadedState?: PreloadedState<State>\n} = {}): Store {\n return createStore(\n reducer,\n { ...preloadedState, documents: Documents.getInitialState({ rootElements }) },\n applyMiddleware(thunk),\n )\n}\n"],"names":["getInitialState","reactComponents","Map","state","type","getReactComponents","get","action","ActionTypes","REGISTER_REACT_COMPONENT","set","payload","component","UNREGISTER_REACT_COMPONENT","nextState","deleted","delete","getPropControllerDescriptors","Documents.reducer","ReactComponents.reducer","ComponentsMeta.reducer","PropControllers.reducer","IsInBuilder.reducer","Documents.getDocument","ReactComponents.getReactComponent","PropControllers.getPropControllerDescriptors","PropControllers.getComponentPropControllerDescriptors","Documents.isElementReference","Introspection.getElementChildren","Introspection.getElementId","Documents.getInitialState"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAUO,4BAA4B,SAA+C;AAChF,SAAO,CAAa,YAAA;AACtB;AAMO,iCAAiC,KAAgC;AACtE,SAAO,EAAE,IAAI;AACf;AAOO,wBAAwB,KAAa,aAAgC;AACnE,SAAA,EAAE,KAAK;AAChB;AAIgC,2BAAA;AAAA,EAC9B,mCAAmB,IAAI;AAAA,IACoB,IAAW;AAChD,QAAA,mCAAmB;AAEZ,eAAA,QAAQ,CAAC,aAAa,gBAAgB;AACjD,iBAAa,IAAI,aAAa,eAAe,aAAa,WAAW,CAAC;AAAA,EAAA,CACvE;AAEM,SAAA;AACT;AAEA,sBAAsB,OAAqC;AAClD,SAAA;AACT;AAEO,uBAAqB,OAAc,aAAsC;;AAC9E,SAAO,mBAAa,KAAK,EAAE,IAAI,WAAW,MAAnC,Y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AAW;AAC3D;AAGE,oBAAA,OACA,aACA,YAC0B;;AAC1B,SAAO,0BAAoB,OAAO,WAAW,EAAE,IAAI,UAAU,MAAtD,YAA2D;AACpE;AAGE,6CAAA,OACA,aACA,YACiE;AACjE,QAAM,UAAU,WAAW,OAAO,aAAa,UAAU;AAEzD,MAAI,WAAW,QAAQD,mBAA6B,OAAO;AAAU,WAAA;AAE9D,SAAA,sCAAsC,OAAO,QAAQ,IAAI;AAClE;AAE6B,sBAAA,OAAc,aAAqB,YAAmC;AACjG,QAAM,UAAU,WAAW,OAAO,aAAa,UAAU;AAEzD,MAAI,WAAW,QAAQA,mBAA6B,OAAO;AAAU,WAAA;AAErE,QAAM,cAAc,sCAAsC,OAAO,QAAQ,IAAI;AAE7E,MAAI,eAAe;AAAa,WAAA;AAE1B,QAAA,YAAY,OAAO,QAAQ,WAAW,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,gBAAgB;AACpF,QAAI,OAAO;AAAa,aAAA;AAExB,WAAOE,eAA2B,YAAY,QAAQ,MAAM,SAAS;AAAA,KACpE,IAAqB;AAEjB,SAAA;AACT;AAEO,wBAAwB,OAAuB;AACpD,SAAO,MAAM;AACf;AAM+B,wBAAA;AAAA,EAC7B;AAAA,EACA;AAAA,IAIE,IAAW;AACb,SAAO,YACL,SACA,iCAAK,iBAAL,EAAqB,WAAWC,kBAA0B,EAAE,aAAc,CAAA,EAC1E,IAAA,gBAAgB,KAAK,CACvB;AACF;;"}
package/dist/react.cjs.js CHANGED
@@ -34,6 +34,7 @@ require("slate-hotkeys");
34
34
  require("corporate-ipsum");
35
35
  require("slate-react");
36
36
  require("@convertkit/slate-lists");
37
+ require("react-dom");
37
38
  exports.ActionTypes = actions.ActionTypes;
38
39
  exports.changeDocument = actions.changeDocument;
39
40
  exports.DocumentReference = index.DocumentReference;
@@ -1 +1 @@
1
- {"version":3,"file":"react.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"react.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/react.es.js CHANGED
@@ -32,4 +32,5 @@ import "slate-hotkeys";
32
32
  import "corporate-ipsum";
33
33
  import "slate-react";
34
34
  import "@convertkit/slate-lists";
35
+ import "react-dom";
35
36
  //# sourceMappingURL=react.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"react.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Navigation/Navigation.tsx"],"names":[],"mappings":";AAYA,OAAO,EAEL,aAAa,EACb,cAAc,EACd,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,cAAc,EACf,MAAM,uCAAuC,CAAA;AAI9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAGlE,aAAK,KAAK,GAAG;IACX,EAAE,CAAC,EAAE,cAAc,CAAA;IACnB,KAAK,CAAC,EAAE,oBAAoB,CAAA;IAC5B,aAAa,CAAC,EAAE,cAAc,CAAA;IAC9B,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,SAAS,CAAC,EAAE,qBAAqB,CAAA;IACjC,WAAW,CAAC,EAAE,cAAc,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,CAAA;IACjC,WAAW,CAAC,EAAE,cAAc,CAAA;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,SAAS,CAAC,EAAE,6BAA6B,CAAC,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC,CAAA;IAC/E,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,mBAAmB,CAAC,EAAE,qBAAqB,CAAC,YAAY,GAAG,WAAW,CAAC,CAAA;IACvE,uBAAuB,CAAC,EAAE,eAAe,CAAA;IACzC,wBAAwB,CAAC,EAAE,eAAe,CAAA;IAC1C,yBAAyB,CAAC,EAAE,eAAe,CAAA;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AA2ED,QAAA,MAAM,UAAU,kGAiFd,CAAA;AAEF,eAAe,UAAU,CAAA;AAEzB,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,cAmGtD"}
@@ -95,6 +95,6 @@ declare type Props = ComponentPropsWithoutRef<typeof Button> & {
95
95
  };
96
96
  }>;
97
97
  };
98
- export default function DropDownButton({ label, caret, links, ...restOfProps }: Props): JSX.Element;
98
+ export default function DropDownButton({ label, caret, links, textColor, color, ...restOfProps }: Props): JSX.Element;
99
99
  export {};
100
100
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/builtin/Navigation/components/DropDownButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAqC,MAAM,OAAO,CAAA;AAQnF,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,SAAS,EACV,MAAM,6CAA6C,CAAA;AACpD,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAK7D,OAAO,MAAM,MAAM,iBAAiB,CAAA;AA8CpC,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAgCvB,CAAA;AAED,aAAK,qBAAqB,GAAG;IAC3B,KAAK,CAAC,EAAE,oBAAoB,CAAA;IAC5B,SAAS,CAAC,EAAE,cAAc,CAAA;CAC3B,CAAA;AAED,aAAK,iBAAiB,GAAG,qBAAqB,GAC5C,IAAI,CAAC,wBAAwB,CAAC,OAAO,kBAAkB,CAAC,EAAE,MAAM,qBAAqB,CAAC,CAAA;AAExF,iBAAS,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,EAAE,iBAAiB,eAGjE;AAED,aAAK,KAAK,GAAG,wBAAwB,CAAC,OAAO,MAAM,CAAC,GAAG;IACrD,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,YAAY,GAAG,cAAc,CAAA;IACxD,KAAK,CAAC,EAAE,KAAK,CAAC;QACZ,EAAE,EAAE,MAAM,CAAA;QACV,OAAO,EAAE,wBAAwB,CAAC,OAAO,YAAY,CAAC,GAAG;YACvD,IAAI,CAAC,EAAE,SAAS,CAAA;YAChB,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;KACF,CAAC,CAAA;CACH,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,KAAK,EACL,KAAe,EACf,KAAU,EACV,GAAG,WAAW,EACf,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAsCrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/builtin/Navigation/components/DropDownButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAqC,MAAM,OAAO,CAAA;AAQnF,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,SAAS,EACV,MAAM,6CAA6C,CAAA;AACpD,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAK7D,OAAO,MAAM,MAAM,iBAAiB,CAAA;AA8CpC,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAgCvB,CAAA;AAED,aAAK,qBAAqB,GAAG;IAC3B,KAAK,CAAC,EAAE,oBAAoB,CAAA;IAC5B,SAAS,CAAC,EAAE,cAAc,CAAA;CAC3B,CAAA;AAED,aAAK,iBAAiB,GAAG,qBAAqB,GAC5C,IAAI,CAAC,wBAAwB,CAAC,OAAO,kBAAkB,CAAC,EAAE,MAAM,qBAAqB,CAAC,CAAA;AAExF,iBAAS,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,EAAE,iBAAiB,eAGjE;AAED,aAAK,KAAK,GAAG,wBAAwB,CAAC,OAAO,MAAM,CAAC,GAAG;IACrD,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,YAAY,GAAG,cAAc,CAAA;IACxD,KAAK,CAAC,EAAE,KAAK,CAAC;QACZ,EAAE,EAAE,MAAM,CAAA;QACV,OAAO,EAAE,wBAAwB,CAAC,OAAO,YAAY,CAAC,GAAG;YACvD,IAAI,CAAC,EAAE,SAAS,CAAA;YAChB,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;KACF,CAAC,CAAA;CACH,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,KAAK,EACL,KAAe,EACf,KAAU,EACV,SAAS,EACT,KAAK,EACL,GAAG,WAAW,EACf,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAsCrB"}
@@ -96,6 +96,6 @@ declare type Props = ComponentPropsWithoutRef<typeof Button> & {
96
96
  onClose?: () => unknown;
97
97
  caret?: string;
98
98
  };
99
- export default function MobileDropDownButton({ label, caret, links, onClose, ...restOfProps }: Props): JSX.Element;
99
+ export default function MobileDropDownButton({ label, caret, links, onClose, color, textColor, ...restOfProps }: Props): JSX.Element;
100
100
  export {};
101
101
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAY,MAAM,OAAO,CAAA;AAI1D,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,SAAS,EACV,MAAM,mDAAmD,CAAA;AAC1D,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,+BAA+B,CAAA;AAUnE,OAAO,MAAM,MAAM,uBAAuB,CAAA;AAY1C,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAgBf,CAAA;AAED,aAAK,qBAAqB,GAAG;IAC3B,KAAK,CAAC,EAAE,oBAAoB,CAAA;IAC5B,SAAS,CAAC,EAAE,cAAc,CAAA;CAC3B,CAAA;AAED,aAAK,iBAAiB,GAAG,qBAAqB,GAC5C,IAAI,CAAC,wBAAwB,CAAC,OAAO,UAAU,CAAC,EAAE,MAAM,qBAAqB,CAAC,CAAA;AAEhF,iBAAS,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,EAAE,iBAAiB,eAGjE;AAED,aAAK,KAAK,GAAG,wBAAwB,CAAC,OAAO,MAAM,CAAC,GAAG;IACrD,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;QACZ,EAAE,EAAE,MAAM,CAAA;QACV,OAAO,EAAE,wBAAwB,CAAC,OAAO,YAAY,CAAC,GAAG;YACvD,IAAI,CAAC,EAAE,SAAS,CAAA;YAChB,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;KACF,CAAC,CAAA;IACF,OAAO,CAAC,EAAE,MAAM,OAAO,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,KAAK,EACL,KAAK,EACL,KAAU,EACV,OAAkB,EAClB,GAAG,WAAW,EACf,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA0BrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAY,MAAM,OAAO,CAAA;AAI1D,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,SAAS,EACV,MAAM,mDAAmD,CAAA;AAC1D,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,+BAA+B,CAAA;AAUnE,OAAO,MAAM,MAAM,uBAAuB,CAAA;AAY1C,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAgBf,CAAA;AAED,aAAK,qBAAqB,GAAG;IAC3B,KAAK,CAAC,EAAE,oBAAoB,CAAA;IAC5B,SAAS,CAAC,EAAE,cAAc,CAAA;CAC3B,CAAA;AAED,aAAK,iBAAiB,GAAG,qBAAqB,GAC5C,IAAI,CAAC,wBAAwB,CAAC,OAAO,UAAU,CAAC,EAAE,MAAM,qBAAqB,CAAC,CAAA;AAEhF,iBAAS,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,EAAE,iBAAiB,eAGjE;AAED,aAAK,KAAK,GAAG,wBAAwB,CAAC,OAAO,MAAM,CAAC,GAAG;IACrD,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;QACZ,EAAE,EAAE,MAAM,CAAA;QACV,OAAO,EAAE,wBAAwB,CAAC,OAAO,YAAY,CAAC,GAAG;YACvD,IAAI,CAAC,EAAE,SAAS,CAAA;YAChB,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;KACF,CAAC,CAAA;IACF,OAAO,CAAC,EAAE,MAAM,OAAO,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,KAAK,EACL,KAAK,EACL,KAAU,EACV,OAAkB,EAClB,KAAK,EACL,SAAS,EACT,GAAG,WAAW,EACf,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA+BrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/builtin/Navigation/components/MobileMenu/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AAOnG,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAyDxE,aAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,eAAe,CAAC,YAAY,GAAG,WAAW,CAAC,CAAA;IACvD,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,cAAc,CAAC,EAAE,eAAe,CAAA;IAChC,KAAK,CAAC,EAAE,oBAAoB,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,OAAO,CAAA;IACvB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,SAAS,EACT,eAAe,EACf,IAAY,EACZ,cAAc,EACd,KAAU,EACV,OAAkB,GACnB,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAuBrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/builtin/Navigation/components/MobileMenu/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EACL,eAAe,EACf,oBAAoB,EAErB,MAAM,6CAA6C,CAAA;AAOpD,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAmExE,aAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,eAAe,CAAC,YAAY,GAAG,WAAW,CAAC,CAAA;IACvD,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,cAAc,CAAC,EAAE,eAAe,CAAA;IAChC,KAAK,CAAC,EAAE,oBAAoB,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,OAAO,CAAA;IACvB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,SAAS,EACT,eAAe,EACf,IAAY,EACZ,cAAc,EACd,KAAU,EACV,OAAkB,GACnB,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAuBrB"}
@@ -365,7 +365,7 @@ export declare function Margin(options?: MarginOptions): MarginDescriptor;
365
365
  declare type ButtonVariant = 'flat' | 'outline' | 'shadow' | 'clear' | 'blocky' | 'bubbly' | 'skewed';
366
366
  declare type ButtonShape = 'pill' | 'rounded' | 'square';
367
367
  declare type ButtonSize = 'small' | 'medium' | 'large';
368
- declare type NavigationButton = {
368
+ export declare type NavigationButton = {
369
369
  id: string;
370
370
  type: 'button';
371
371
  payload: {