@enonic/nextjs-adapter 0.0.1-alpha.1

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 (46) hide show
  1. package/ComponentRegistry.d.ts +61 -0
  2. package/ComponentRegistry.js +115 -0
  3. package/README.md +39 -0
  4. package/UrlProcessor.d.ts +21 -0
  5. package/UrlProcessor.js +54 -0
  6. package/baseMappings.d.ts +1 -0
  7. package/baseMappings.js +38 -0
  8. package/guillotine/fetchContent.d.ts +82 -0
  9. package/guillotine/fetchContent.js +644 -0
  10. package/guillotine/getMetaData.d.ts +91 -0
  11. package/guillotine/getMetaData.js +128 -0
  12. package/index.d.ts +2 -0
  13. package/index.js +2 -0
  14. package/package.json +33 -0
  15. package/utils.d.ts +64 -0
  16. package/utils.js +146 -0
  17. package/views/BaseComponent.d.ts +25 -0
  18. package/views/BaseComponent.jsx +114 -0
  19. package/views/BaseContent.d.ts +4 -0
  20. package/views/BaseContent.jsx +41 -0
  21. package/views/BaseLayout.d.ts +17 -0
  22. package/views/BaseLayout.jsx +24 -0
  23. package/views/BaseMacro.d.ts +16 -0
  24. package/views/BaseMacro.jsx +85 -0
  25. package/views/BasePage.d.ts +19 -0
  26. package/views/BasePage.jsx +34 -0
  27. package/views/BasePart.d.ts +19 -0
  28. package/views/BasePart.jsx +24 -0
  29. package/views/Empty.d.ts +3 -0
  30. package/views/Empty.jsx +3 -0
  31. package/views/Fragment.d.ts +10 -0
  32. package/views/Fragment.jsx +25 -0
  33. package/views/MainView.d.ts +4 -0
  34. package/views/MainView.jsx +14 -0
  35. package/views/Region.d.ts +20 -0
  36. package/views/Region.jsx +57 -0
  37. package/views/RichTextView.d.ts +15 -0
  38. package/views/RichTextView.jsx +55 -0
  39. package/views/SingleComponent.d.ts +5 -0
  40. package/views/SingleComponent.jsx +11 -0
  41. package/views/Text.d.ts +9 -0
  42. package/views/Text.jsx +4 -0
  43. package/views/macros/DefaultMacro.d.ts +4 -0
  44. package/views/macros/DefaultMacro.jsx +3 -0
  45. package/views/macros/DisableMacro.d.ts +3 -0
  46. package/views/macros/DisableMacro.jsx +2 -0
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { ComponentRegistry } from '../ComponentRegistry';
3
+ import { XP_COMPONENT_TYPE } from '../utils';
4
+ import { MissingComponent, shouldShowMissingView } from './BaseComponent';
5
+ const BaseLayout = (props) => {
6
+ const { component, common, regions, meta, path } = props;
7
+ let layoutSelection;
8
+ if (component) {
9
+ layoutSelection = ComponentRegistry.getLayout(component.descriptor);
10
+ }
11
+ const SelectedLayoutView = layoutSelection === null || layoutSelection === void 0 ? void 0 : layoutSelection.view;
12
+ if (SelectedLayoutView) {
13
+ return <SelectedLayoutView layout={{ descriptor: component === null || component === void 0 ? void 0 : component.descriptor, regions: regions || {}, config: component === null || component === void 0 ? void 0 : component.config }} path={path} common={common} meta={meta}/>;
14
+ }
15
+ else if (component === null || component === void 0 ? void 0 : component.descriptor) {
16
+ // empty descriptor usually means uninitialized layout
17
+ console.warn(`BaseLayout: can not render layout '${component === null || component === void 0 ? void 0 : component.descriptor}': no next view or catch-all defined`);
18
+ if (shouldShowMissingView(meta)) {
19
+ return <MissingComponent type={XP_COMPONENT_TYPE.LAYOUT} descriptor={component.descriptor}/>;
20
+ }
21
+ }
22
+ return null;
23
+ };
24
+ export default BaseLayout;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { MacroConfig, MacroData, MetaData } from '../guillotine/getMetaData';
3
+ export declare const MACRO_DISABLE = "system:disable";
4
+ export declare const MACRO_EMBED = "system:embed";
5
+ interface BaseMacroProps {
6
+ data: MacroData;
7
+ meta: MetaData;
8
+ renderInEditMode?: boolean;
9
+ }
10
+ export interface MacroProps {
11
+ name: string;
12
+ config: MacroConfig;
13
+ meta: MetaData;
14
+ }
15
+ declare const BaseMacro: (props: BaseMacroProps) => JSX.Element;
16
+ export default BaseMacro;
@@ -0,0 +1,85 @@
1
+ import React from 'react';
2
+ import { ComponentRegistry } from '../ComponentRegistry';
3
+ import { RENDER_MODE, sanitizeGraphqlName } from '../utils';
4
+ import HTMLReactParser from 'html-react-parser';
5
+ const unescape = require('unescape');
6
+ export const MACRO_DISABLE = 'system:disable';
7
+ export const MACRO_EMBED = 'system:embed';
8
+ const BaseMacro = (props) => {
9
+ const { data, meta, renderInEditMode } = props;
10
+ let config = data.config[sanitizeGraphqlName(data.name)] || {};
11
+ if (data.descriptor !== MACRO_DISABLE) {
12
+ // do not do any processing for disable macro
13
+ config = normalizeValue(config);
14
+ }
15
+ if (!renderInEditMode && (meta === null || meta === void 0 ? void 0 : meta.renderMode) === RENDER_MODE.EDIT) {
16
+ const attrs = formatAttributes(config);
17
+ if (config.body) {
18
+ // do not parse system macros (embed, disable) in edit mode
19
+ // but parse others because panel macros (for instance) wants its content to be html, not string
20
+ // TODO: should we make this behavior configurable ?
21
+ const bodyString = !data.descriptor.startsWith('system:') ? HTMLReactParser(config.body) : config.body;
22
+ return <>
23
+ {`[${data.name}${attrs}]`}
24
+ {bodyString}
25
+ {`[/${data.name}]`}
26
+ </>;
27
+ }
28
+ else {
29
+ return <>
30
+ {`[${data.name}${attrs}/]`}
31
+ </>;
32
+ }
33
+ }
34
+ const macro = ComponentRegistry.getMacro(data.descriptor);
35
+ const MacroView = macro === null || macro === void 0 ? void 0 : macro.view;
36
+ if (MacroView) {
37
+ return <MacroView name={data.name} config={config} meta={meta}/>;
38
+ }
39
+ else if (data.descriptor) {
40
+ console.warn(`BaseMacro: can not render macro '${data.descriptor}': no next view or catch-all defined`);
41
+ }
42
+ return null;
43
+ };
44
+ function normalizeValue(value) {
45
+ let parsedVal;
46
+ if (value instanceof Array) {
47
+ parsedVal = value.map(normalizeValue);
48
+ }
49
+ else if (value instanceof Object) {
50
+ parsedVal = {};
51
+ Object.entries(value).forEach(entry => parsedVal[entry[0]] = normalizeValue(entry[1]));
52
+ }
53
+ else if (typeof value === 'string') {
54
+ const unescapedValue = unescape(value);
55
+ if (unescapedValue.startsWith('[') && unescapedValue.endsWith(']')) {
56
+ // Wicked array notation: "[Value 1, Value 2]"
57
+ parsedVal = unescapedValue.substring(1, unescapedValue.length - 1).split(/,\s*/);
58
+ }
59
+ else {
60
+ try {
61
+ parsedVal = JSON.parse(unescapedValue);
62
+ }
63
+ catch (e) {
64
+ // simple string or wrongly formatted JSON
65
+ parsedVal = unescapedValue;
66
+ }
67
+ }
68
+ }
69
+ else {
70
+ // most likely a number or unknown type
71
+ parsedVal = value;
72
+ }
73
+ return parsedVal;
74
+ }
75
+ function formatAttributes(config) {
76
+ const attrs = Object.entries(config)
77
+ .filter(entry => entry[0] !== 'body')
78
+ .reduce((accum, entry) => {
79
+ // concat to make sure we account for arrays
80
+ [].concat(normalizeValue(entry[1])).forEach(val => accum.push(`${entry[0]}="${val}"`));
81
+ return accum;
82
+ }, []);
83
+ return attrs.length ? ` ${attrs.join(' ')}` : '';
84
+ }
85
+ export default BaseMacro;
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { MetaData, PageData } from '../guillotine/getMetaData';
3
+ export interface PageProps {
4
+ page: PageData;
5
+ path: string;
6
+ data?: any;
7
+ common?: any;
8
+ meta: MetaData;
9
+ }
10
+ export interface BasePageProps {
11
+ component?: PageData;
12
+ path?: string;
13
+ common?: any;
14
+ data?: any;
15
+ error?: string;
16
+ meta: MetaData;
17
+ }
18
+ declare const BasePage: (props: BasePageProps) => JSX.Element;
19
+ export default BasePage;
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import { ComponentRegistry } from '../ComponentRegistry';
3
+ import { XP_COMPONENT_TYPE } from '../utils';
4
+ import { ErrorComponent, MissingComponent, shouldShowErrorView, shouldShowMissingView } from './BaseComponent';
5
+ const BasePage = (props) => {
6
+ const { component, data, common, error, meta, path } = props;
7
+ const desc = component === null || component === void 0 ? void 0 : component.descriptor;
8
+ if (error) {
9
+ console.warn(`BasePage: '${desc}' error: ${error}`);
10
+ if (shouldShowErrorView(meta)) {
11
+ return <ErrorComponent reason={error} descriptor={desc} type={XP_COMPONENT_TYPE.PAGE}/>;
12
+ }
13
+ else {
14
+ return null;
15
+ }
16
+ }
17
+ let pageDef;
18
+ if (desc) {
19
+ pageDef = ComponentRegistry.getPage(desc);
20
+ }
21
+ const PageView = pageDef === null || pageDef === void 0 ? void 0 : pageDef.view;
22
+ if (PageView) {
23
+ return <PageView page={component} path={path} data={data} common={common} meta={meta}/>;
24
+ }
25
+ else if (component === null || component === void 0 ? void 0 : component.descriptor) {
26
+ // empty descriptor usually means uninitialized page
27
+ console.warn(`BasePage: can not render page '${desc}': no next view or catch-all defined`);
28
+ if (shouldShowMissingView(meta)) {
29
+ return <MissingComponent type={XP_COMPONENT_TYPE.PAGE} descriptor={component.descriptor}/>;
30
+ }
31
+ }
32
+ return null;
33
+ };
34
+ export default BasePage;
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { MetaData, PartData } from '../guillotine/getMetaData';
3
+ export interface PartProps {
4
+ part: PartData;
5
+ path: string;
6
+ data?: any;
7
+ common?: any;
8
+ meta: MetaData;
9
+ }
10
+ interface BasePartProps {
11
+ component?: PartData;
12
+ path: string;
13
+ common?: any;
14
+ data?: any;
15
+ error?: string;
16
+ meta: MetaData;
17
+ }
18
+ declare const BasePart: (props: BasePartProps) => JSX.Element;
19
+ export default BasePart;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { ComponentRegistry } from '../ComponentRegistry';
3
+ import { XP_COMPONENT_TYPE } from '../utils';
4
+ import { MissingComponent, shouldShowMissingView } from './BaseComponent';
5
+ const BasePart = (props) => {
6
+ const { component, data, common, meta, path } = props;
7
+ let partSelection;
8
+ if (component) {
9
+ partSelection = ComponentRegistry.getPart(component.descriptor);
10
+ }
11
+ const SelectedPartView = partSelection === null || partSelection === void 0 ? void 0 : partSelection.view;
12
+ if (SelectedPartView) {
13
+ return <SelectedPartView part={component} path={path} data={data} common={common} meta={meta}/>;
14
+ }
15
+ else if (component === null || component === void 0 ? void 0 : component.descriptor) {
16
+ // empty descriptor usually means uninitialized part
17
+ console.warn(`BasePart: can not render part '${component.descriptor}': no next view or catch-all defined`);
18
+ if (shouldShowMissingView(meta)) {
19
+ return <MissingComponent type={XP_COMPONENT_TYPE.PART} descriptor={component.descriptor}/>;
20
+ }
21
+ }
22
+ return null;
23
+ };
24
+ export default BasePart;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Empty: () => JSX.Element;
3
+ export default Empty;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ const Empty = () => <></>;
3
+ export default Empty;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { FragmentData, MetaData, PageData } from '../guillotine/getMetaData';
3
+ interface FragmentProps {
4
+ page?: PageData;
5
+ component?: FragmentData;
6
+ common?: any;
7
+ meta: MetaData;
8
+ }
9
+ declare const FragmentView: (props: FragmentProps) => JSX.Element;
10
+ export default FragmentView;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import BaseComponent from './BaseComponent';
3
+ import { FRAGMENT_DEFAULT_REGION_NAME } from '../utils';
4
+ const FragmentView = (props) => {
5
+ var _a;
6
+ const { component, page } = props;
7
+ const comps = [];
8
+ if (page) {
9
+ // rendering whole page
10
+ const regions = page.regions || {};
11
+ const regionComps = (_a = regions[FRAGMENT_DEFAULT_REGION_NAME]) === null || _a === void 0 ? void 0 : _a.components;
12
+ if (regionComps) {
13
+ comps.push(...regionComps);
14
+ }
15
+ }
16
+ else if (component) {
17
+ // rendering a part of a page
18
+ comps.push(...component.fragment.components);
19
+ }
20
+ const { common, meta } = props;
21
+ return (<>
22
+ {comps.map((comp, i) => (<BaseComponent key={i} component={comp} common={common} meta={meta}/>))}
23
+ </>);
24
+ };
25
+ export default FragmentView;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { FetchContentResult } from '../guillotine/fetchContent';
3
+ declare const _MainView: (props: FetchContentResult) => JSX.Element;
4
+ export default _MainView;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import SingleComponent from './SingleComponent';
3
+ import BaseContent from './BaseContent';
4
+ import { XP_REQUEST_TYPE } from '../utils';
5
+ const _MainView = (props) => {
6
+ const { meta } = props;
7
+ // Single-component render:
8
+ if ((meta === null || meta === void 0 ? void 0 : meta.requestType) === XP_REQUEST_TYPE.COMPONENT) {
9
+ return <SingleComponent {...props}/>;
10
+ }
11
+ // meta.requestType="type", and hence content-type based, is standard view for now.
12
+ return <BaseContent {...props}/>;
13
+ };
14
+ export default _MainView;
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { MetaData, PageComponent, PageData } from '../guillotine/getMetaData';
3
+ export interface RegionProps {
4
+ name: string;
5
+ components?: PageComponent[];
6
+ className?: string;
7
+ common?: any;
8
+ meta: MetaData;
9
+ }
10
+ export interface RegionsProps {
11
+ page: PageData | null;
12
+ name?: string;
13
+ common?: any;
14
+ meta: MetaData;
15
+ }
16
+ /** Single region */
17
+ export declare const RegionView: (props: RegionProps) => JSX.Element;
18
+ /** Multiple regions, or only one if named in props.selected */
19
+ declare const RegionsView: (props: RegionsProps) => JSX.Element;
20
+ export default RegionsView;
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ import { PORTAL_REGION_ATTRIBUTE, RENDER_MODE } from '../utils';
3
+ import BaseComponent from './BaseComponent';
4
+ /** Single region */
5
+ export const RegionView = (props) => {
6
+ const { name, components, common, meta, className } = props;
7
+ const regionAttrs = {};
8
+ if (className) {
9
+ regionAttrs.className = className;
10
+ }
11
+ const children = (components || [])
12
+ .sort(sortPageComponentsByPath)
13
+ .map((component, i) => (<BaseComponent key={`${regionAttrs.id}-${i}`} component={component} common={common} meta={meta}/>));
14
+ if (meta.renderMode === RENDER_MODE.EDIT) {
15
+ regionAttrs.id = name + 'Region';
16
+ regionAttrs[PORTAL_REGION_ATTRIBUTE] = name;
17
+ }
18
+ if (Object.keys(regionAttrs).length) {
19
+ return <div {...regionAttrs}>{children}</div>;
20
+ }
21
+ else {
22
+ return <>{children}</>;
23
+ }
24
+ };
25
+ /** Multiple regions, or only one if named in props.selected */
26
+ const RegionsView = (props) => {
27
+ const { page, name, meta, common } = props;
28
+ const regions = page === null || page === void 0 ? void 0 : page.regions;
29
+ if (!regions || !Object.keys(regions)) {
30
+ return null;
31
+ }
32
+ // Detect if any single region is selected for rendering and if so, handle that
33
+ if (name) {
34
+ const selectedRegion = regions[name];
35
+ if (!selectedRegion) {
36
+ console.warn(`Region name '${name}' was selected but not found among regions (${JSON.stringify(Object.keys(regions))}). Skipping.`); // TODO: Throw error instead of this? Return null?
37
+ return null;
38
+ }
39
+ return <RegionView {...selectedRegion} common={common} meta={meta}/>;
40
+ }
41
+ return (<>
42
+ {Object.keys(regions).map((name, i) => {
43
+ const region = regions[name];
44
+ return <RegionView key={i} {...region} common={common} meta={meta}/>;
45
+ })}
46
+ </>);
47
+ };
48
+ function sortPageComponentsByPath(aComp, bComp) {
49
+ // sort according to index in region, otherwise there will be a mismatch of views and data
50
+ // because after 10 components the order will be: /main/1, /main/11, /main/2, /main/3,...
51
+ let pathArr = aComp.path.split('/');
52
+ const aIndex = +(pathArr[pathArr.length - 1] || 0);
53
+ pathArr = bComp.path.split('/');
54
+ const bIndex = +(pathArr[pathArr.length - 1] || 0);
55
+ return aIndex - bIndex;
56
+ }
57
+ export default RegionsView;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import { MetaData, RichTextData } from '../guillotine/getMetaData';
3
+ import { DOMNode } from 'html-react-parser';
4
+ export declare type ReplacerResult = JSX.Element | object | void | undefined | null | false;
5
+ export declare type Replacer = (domNode: DOMNode, data: RichTextData, meta: MetaData, renderMacroInEditMode: boolean) => ReplacerResult;
6
+ declare type Props = {
7
+ data: RichTextData;
8
+ meta: MetaData;
9
+ tag?: string;
10
+ renderMacroInEditMode?: boolean;
11
+ customReplacer?: Replacer;
12
+ };
13
+ export declare function createReplacer(allData: RichTextData, meta: MetaData, renderMacroInEditMode?: boolean, customReplacer?: Replacer): (domNode: DOMNode) => ReplacerResult;
14
+ declare const RichTextView: ({ tag, data, meta, renderMacroInEditMode, customReplacer }: Props) => JSX.Element;
15
+ export default RichTextView;
@@ -0,0 +1,55 @@
1
+ import React from 'react';
2
+ import { getUrl, UrlProcessor } from '../UrlProcessor';
3
+ import HTMLReactParser from 'html-react-parser';
4
+ import { ElementType } from 'domelementtype';
5
+ import BaseMacro from './BaseMacro';
6
+ export function createReplacer(allData, meta, renderMacroInEditMode = true, customReplacer) {
7
+ // eslint-disable-next-line react/display-name
8
+ return (domNode) => {
9
+ if (domNode.type !== ElementType.Tag) {
10
+ return domNode;
11
+ }
12
+ const el = domNode;
13
+ let ref;
14
+ switch (el.tagName) {
15
+ case UrlProcessor.IMG_TAG:
16
+ ref = el.attribs[UrlProcessor.IMG_ATTR];
17
+ const src = el.attribs['src'];
18
+ // do not process content images in next to keep it absolute
19
+ if (ref && src && UrlProcessor.isContentImage(ref, allData.images)) {
20
+ el.attribs['src'] = getUrl(src, meta);
21
+ }
22
+ break;
23
+ case UrlProcessor.LINK_TAG:
24
+ ref = el.attribs[UrlProcessor.LINK_ATTR];
25
+ const href = el.attribs['href'];
26
+ if (ref && href) {
27
+ el.attribs['href'] = getUrl(href, meta);
28
+ }
29
+ break;
30
+ case UrlProcessor.MACRO_TAG:
31
+ ref = el.attribs[UrlProcessor.MACRO_ATTR];
32
+ const data = ref && allData.macros.find((d) => d.ref === ref);
33
+ if (data) {
34
+ return <BaseMacro data={data} meta={meta} renderInEditMode={renderMacroInEditMode}/>;
35
+ }
36
+ break;
37
+ default:
38
+ if (customReplacer) {
39
+ const result = customReplacer(domNode, allData, meta, renderMacroInEditMode);
40
+ if (result) {
41
+ return result;
42
+ }
43
+ }
44
+ break;
45
+ }
46
+ return el;
47
+ };
48
+ }
49
+ const RichTextView = ({ tag, data, meta, renderMacroInEditMode, customReplacer }) => {
50
+ const CustomTag = tag || 'section';
51
+ return <CustomTag>
52
+ {data.processedHtml ? HTMLReactParser(data.processedHtml, { replace: createReplacer(data, meta, renderMacroInEditMode, customReplacer) }) : ''}
53
+ </CustomTag>;
54
+ };
55
+ export default RichTextView;
@@ -0,0 +1,5 @@
1
+ /** Render only one component as a result of a request from XP-side .../_/component/... during edit refresh. */
2
+ /// <reference types="react" />
3
+ import { FetchContentResult } from '../guillotine/fetchContent';
4
+ declare const SingleComponent: ({ meta, common }: FetchContentResult) => JSX.Element;
5
+ export default SingleComponent;
@@ -0,0 +1,11 @@
1
+ /** Render only one component as a result of a request from XP-side .../_/component/... during edit refresh. */
2
+ import BaseComponent from './BaseComponent';
3
+ import React from 'react';
4
+ const SingleComponent = ({ meta, common }) => {
5
+ if (!(meta === null || meta === void 0 ? void 0 : meta.requestedComponent)) {
6
+ // TODO: Handle missing target region (Throw a 404, "component path not found"?)
7
+ return null;
8
+ }
9
+ return <BaseComponent component={meta.requestedComponent} common={common} meta={meta}/>;
10
+ };
11
+ export default SingleComponent;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { MetaData, TextData } from '../guillotine/getMetaData';
3
+ declare type Props = {
4
+ meta: MetaData;
5
+ component: TextData;
6
+ path: string;
7
+ };
8
+ declare const DefaultTextView: ({ component, meta, path }: Props) => JSX.Element;
9
+ export default DefaultTextView;
package/views/Text.jsx ADDED
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import RichTextView from './RichTextView';
3
+ const DefaultTextView = ({ component, meta, path }) => (<RichTextView data={component.value} meta={meta} renderMacroInEditMode={false}/>);
4
+ export default DefaultTextView;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { MacroProps } from '../BaseMacro';
3
+ declare const DefaultMacro: ({ name, config, meta }: MacroProps) => JSX.Element;
4
+ export default DefaultMacro;
@@ -0,0 +1,3 @@
1
+ import HTMLReactParser from 'html-react-parser';
2
+ const DefaultMacro = ({ name, config, meta }) => HTMLReactParser(config.body);
3
+ export default DefaultMacro;
@@ -0,0 +1,3 @@
1
+ import { MacroProps } from '../BaseMacro';
2
+ declare const DisableMacro: ({ name, config, meta }: MacroProps) => any;
3
+ export default DisableMacro;
@@ -0,0 +1,2 @@
1
+ const DisableMacro = ({ name, config, meta }) => (config.body);
2
+ export default DisableMacro;