@readme/markdown 6.75.0-beta.37 → 6.75.0-beta.39

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.
@@ -4,7 +4,7 @@ interface Props extends React.PropsWithChildren<React.HTMLAttributes<HTMLQuoteEl
4
4
  attributes?: {};
5
5
  icon: string;
6
6
  theme?: string;
7
- heading?: React.ReactElement;
7
+ empty?: boolean;
8
8
  }
9
9
 
10
10
  const themes: Record<string, string> = {
@@ -23,20 +23,17 @@ const themes: Record<string, string> = {
23
23
  };
24
24
 
25
25
  const Callout = (props: Props) => {
26
- const { attributes, children, icon } = props;
27
-
26
+ const { attributes, children, icon, empty } = props;
28
27
  let theme = props.theme || themes[icon] || 'default';
29
- const [heading, ...body] = Array.isArray(children) ? children : [children];
30
- const empty = !heading.props.children;
31
28
 
32
29
  return (
33
30
  // @ts-ignore
34
31
  <blockquote {...attributes} className={`callout callout_${theme}`} theme={icon}>
35
32
  <h3 className={`callout-heading${empty ? ' empty' : ''}`}>
36
33
  <span className="callout-icon">{icon}</span>
37
- {!empty && heading}
34
+ {empty || children[0]}
38
35
  </h3>
39
- {body}
36
+ {empty ? children : React.Children.toArray(children).slice(1)}
40
37
  </blockquote>
41
38
  );
42
39
  };
@@ -3,7 +3,7 @@ interface Props extends React.PropsWithChildren<React.HTMLAttributes<HTMLQuoteEl
3
3
  attributes?: {};
4
4
  icon: string;
5
5
  theme?: string;
6
- heading?: React.ReactElement;
6
+ empty?: boolean;
7
7
  }
8
8
  declare const Callout: (props: Props) => React.JSX.Element;
9
9
  export default Callout;
package/dist/enums.d.ts CHANGED
@@ -5,5 +5,8 @@ export declare enum NodeTypes {
5
5
  i = "i",
6
6
  image = "image",
7
7
  htmlBlock = "html-block",
8
- embed = "rdme-embed"
8
+ embed = "embed",
9
+ variable = "readme-variable",
10
+ glossary = "readme-glossary-item",
11
+ reusableContent = "reusable-content"
9
12
  }
package/dist/index.d.ts CHANGED
@@ -4,9 +4,7 @@ import * as Components from './components';
4
4
  import { GlossaryTerm } from './contexts/GlossaryTerms';
5
5
  type ComponentOpts = Record<string, (props: any) => React.ReactNode>;
6
6
  interface Variables {
7
- user: {
8
- keys: string[];
9
- };
7
+ user: Record<string, string>;
10
8
  defaults: {
11
9
  name: string;
12
10
  default: string;
package/dist/main.js CHANGED
@@ -7062,7 +7062,7 @@ module.exports = function (argument) {
7062
7062
 
7063
7063
  var wellKnownSymbol = __webpack_require__(1602);
7064
7064
  var create = __webpack_require__(3105);
7065
- var defineProperty = (__webpack_require__(3610).f);
7065
+ var defineProperty = (__webpack_require__(8372).f);
7066
7066
 
7067
7067
  var UNSCOPABLES = wellKnownSymbol('unscopables');
7068
7068
  var ArrayPrototype = Array.prototype;
@@ -7554,7 +7554,7 @@ module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
7554
7554
  var hasOwn = __webpack_require__(6490);
7555
7555
  var ownKeys = __webpack_require__(5816);
7556
7556
  var getOwnPropertyDescriptorModule = __webpack_require__(7632);
7557
- var definePropertyModule = __webpack_require__(3610);
7557
+ var definePropertyModule = __webpack_require__(8372);
7558
7558
 
7559
7559
  module.exports = function (target, source, exceptions) {
7560
7560
  var keys = ownKeys(source);
@@ -7632,7 +7632,7 @@ module.exports = function (value, done) {
7632
7632
  "use strict";
7633
7633
 
7634
7634
  var DESCRIPTORS = __webpack_require__(5077);
7635
- var definePropertyModule = __webpack_require__(3610);
7635
+ var definePropertyModule = __webpack_require__(8372);
7636
7636
  var createPropertyDescriptor = __webpack_require__(6843);
7637
7637
 
7638
7638
  module.exports = DESCRIPTORS ? function (object, key, value) {
@@ -7668,7 +7668,7 @@ module.exports = function (bitmap, value) {
7668
7668
  "use strict";
7669
7669
 
7670
7670
  var DESCRIPTORS = __webpack_require__(5077);
7671
- var definePropertyModule = __webpack_require__(3610);
7671
+ var definePropertyModule = __webpack_require__(8372);
7672
7672
  var createPropertyDescriptor = __webpack_require__(6843);
7673
7673
 
7674
7674
  module.exports = function (object, key, value) {
@@ -7707,7 +7707,7 @@ module.exports = function (hint) {
7707
7707
  "use strict";
7708
7708
 
7709
7709
  var makeBuiltIn = __webpack_require__(8218);
7710
- var defineProperty = __webpack_require__(3610);
7710
+ var defineProperty = __webpack_require__(8372);
7711
7711
 
7712
7712
  module.exports = function (target, name, descriptor) {
7713
7713
  if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
@@ -7724,7 +7724,7 @@ module.exports = function (target, name, descriptor) {
7724
7724
  "use strict";
7725
7725
 
7726
7726
  var isCallable = __webpack_require__(8420);
7727
- var definePropertyModule = __webpack_require__(3610);
7727
+ var definePropertyModule = __webpack_require__(8372);
7728
7728
  var makeBuiltIn = __webpack_require__(8218);
7729
7729
  var defineGlobalProperty = __webpack_require__(9430);
7730
7730
 
@@ -9427,7 +9427,7 @@ module.exports = Object.create || function create(O, Properties) {
9427
9427
 
9428
9428
  var DESCRIPTORS = __webpack_require__(5077);
9429
9429
  var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(4491);
9430
- var definePropertyModule = __webpack_require__(3610);
9430
+ var definePropertyModule = __webpack_require__(8372);
9431
9431
  var anObject = __webpack_require__(3938);
9432
9432
  var toIndexedObject = __webpack_require__(5476);
9433
9433
  var objectKeys = __webpack_require__(1641);
@@ -9449,7 +9449,7 @@ exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties :
9449
9449
 
9450
9450
  /***/ }),
9451
9451
 
9452
- /***/ 3610:
9452
+ /***/ 8372:
9453
9453
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9454
9454
 
9455
9455
  "use strict";
@@ -10122,7 +10122,7 @@ module.exports = function (it) {
10122
10122
 
10123
10123
  "use strict";
10124
10124
 
10125
- var defineProperty = (__webpack_require__(3610).f);
10125
+ var defineProperty = (__webpack_require__(8372).f);
10126
10126
  var hasOwn = __webpack_require__(6490);
10127
10127
  var wellKnownSymbol = __webpack_require__(1602);
10128
10128
 
@@ -10632,7 +10632,7 @@ module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
10632
10632
  var path = __webpack_require__(9720);
10633
10633
  var hasOwn = __webpack_require__(6490);
10634
10634
  var wrappedWellKnownSymbolModule = __webpack_require__(802);
10635
- var defineProperty = (__webpack_require__(3610).f);
10635
+ var defineProperty = (__webpack_require__(8372).f);
10636
10636
 
10637
10637
  module.exports = function (NAME) {
10638
10638
  var Symbol = path.Symbol || (path.Symbol = {});
@@ -10912,7 +10912,7 @@ var toIndexedObject = __webpack_require__(5476);
10912
10912
  var addToUnscopables = __webpack_require__(298);
10913
10913
  var Iterators = __webpack_require__(2228);
10914
10914
  var InternalStateModule = __webpack_require__(9206);
10915
- var defineProperty = (__webpack_require__(3610).f);
10915
+ var defineProperty = (__webpack_require__(8372).f);
10916
10916
  var defineIterator = __webpack_require__(6409);
10917
10917
  var createIterResultObject = __webpack_require__(8296);
10918
10918
  var IS_PURE = __webpack_require__(6926);
@@ -11234,7 +11234,7 @@ var toPrimitive = __webpack_require__(874);
11234
11234
  var fails = __webpack_require__(2074);
11235
11235
  var getOwnPropertyNames = (__webpack_require__(4789).f);
11236
11236
  var getOwnPropertyDescriptor = (__webpack_require__(7632).f);
11237
- var defineProperty = (__webpack_require__(3610).f);
11237
+ var defineProperty = (__webpack_require__(8372).f);
11238
11238
  var thisNumberValue = __webpack_require__(7809);
11239
11239
  var trim = (__webpack_require__(9163).trim);
11240
11240
 
@@ -11381,7 +11381,7 @@ $({ target: 'Object', stat: true, forced: Object.defineProperties !== defineProp
11381
11381
 
11382
11382
  var $ = __webpack_require__(1605);
11383
11383
  var DESCRIPTORS = __webpack_require__(5077);
11384
- var defineProperty = (__webpack_require__(3610).f);
11384
+ var defineProperty = (__webpack_require__(8372).f);
11385
11385
 
11386
11386
  // `Object.defineProperty` method
11387
11387
  // https://tc39.es/ecma262/#sec-object.defineproperty
@@ -11719,7 +11719,7 @@ var getOwnPropertyNamesModule = __webpack_require__(4789);
11719
11719
  var getOwnPropertyNamesExternal = __webpack_require__(6509);
11720
11720
  var getOwnPropertySymbolsModule = __webpack_require__(8916);
11721
11721
  var getOwnPropertyDescriptorModule = __webpack_require__(7632);
11722
- var definePropertyModule = __webpack_require__(3610);
11722
+ var definePropertyModule = __webpack_require__(8372);
11723
11723
  var definePropertiesModule = __webpack_require__(5318);
11724
11724
  var propertyIsEnumerableModule = __webpack_require__(9304);
11725
11725
  var defineBuiltIn = __webpack_require__(7485);
@@ -60991,17 +60991,15 @@ const themes = {
60991
60991
  '\u26A0': 'warn',
60992
60992
  };
60993
60993
  const Callout = (props) => {
60994
- const { attributes, children, icon } = props;
60994
+ const { attributes, children, icon, empty } = props;
60995
60995
  let theme = props.theme || themes[icon] || 'default';
60996
- const [heading, ...body] = Array.isArray(children) ? children : [children];
60997
- const empty = !heading.props.children;
60998
60996
  return (
60999
60997
  // @ts-ignore
61000
60998
  external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("blockquote", Object.assign({}, attributes, { className: `callout callout_${theme}`, theme: icon }),
61001
60999
  external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("h3", { className: `callout-heading${empty ? ' empty' : ''}` },
61002
61000
  external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("span", { className: "callout-icon" }, icon),
61003
- !empty && heading),
61004
- body));
61001
+ empty || children[0]),
61002
+ empty ? children : external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.Children.toArray(children).slice(1)));
61005
61003
  };
61006
61004
  /* harmony default export */ const components_Callout = (Callout);
61007
61005
 
@@ -61415,7 +61413,10 @@ var NodeTypes;
61415
61413
  NodeTypes["i"] = "i";
61416
61414
  NodeTypes["image"] = "image";
61417
61415
  NodeTypes["htmlBlock"] = "html-block";
61418
- NodeTypes["embed"] = "rdme-embed";
61416
+ NodeTypes["embed"] = "embed";
61417
+ NodeTypes["variable"] = "readme-variable";
61418
+ NodeTypes["glossary"] = "readme-glossary-item";
61419
+ NodeTypes["reusableContent"] = "reusable-content";
61419
61420
  })(NodeTypes || (NodeTypes = {}));
61420
61421
 
61421
61422
  ;// CONCATENATED MODULE: ./processor/transform/callouts.ts
@@ -61433,13 +61434,16 @@ const calloutTransformer = () => {
61433
61434
  if (icon && match) {
61434
61435
  const heading = startText.slice(match.length);
61435
61436
  node.children[0].children[0].value = heading;
61436
- node.type = NodeTypes.callout;
61437
- node.data = {
61438
- hName: 'Callout',
61439
- hProperties: {
61440
- icon,
61437
+ Object.assign(node, {
61438
+ type: NodeTypes.callout,
61439
+ data: {
61440
+ hName: 'Callout',
61441
+ hProperties: {
61442
+ icon,
61443
+ empty: !heading.length,
61444
+ },
61441
61445
  },
61442
- };
61446
+ });
61443
61447
  }
61444
61448
  });
61445
61449
  };
@@ -78505,7 +78509,6 @@ const gemojiTransformer = () => (tree) => {
78505
78509
  ;// CONCATENATED MODULE: ./processor/transform/readme-components.ts
78506
78510
 
78507
78511
 
78508
-
78509
78512
  const readme_components_types = {
78510
78513
  Callout: NodeTypes['callout'],
78511
78514
  Code: 'code',
@@ -78522,7 +78525,6 @@ const attributes = (jsx) => jsx.attributes.reduce((memo, attr) => {
78522
78525
  return memo;
78523
78526
  }, {});
78524
78527
  const coerceJsxToMd = ({ components = {} } = {}) => (node, index, parent) => {
78525
- var _a;
78526
78528
  if (node.name in components)
78527
78529
  return;
78528
78530
  if (node.name === 'Code') {
@@ -78565,15 +78567,14 @@ const coerceJsxToMd = ({ components = {} } = {}) => (node, index, parent) => {
78565
78567
  parent.children[index] = mdNode;
78566
78568
  }
78567
78569
  else if (node.name === 'Callout') {
78568
- const { heading, icon } = attributes(node);
78569
- const child = mdast(heading);
78570
+ const { icon, empty = false } = attributes(node);
78570
78571
  // @ts-ignore
78571
78572
  const mdNode = {
78572
- children: [(_a = child === null || child === void 0 ? void 0 : child.children) === null || _a === void 0 ? void 0 : _a[0], ...node.children].filter(Boolean),
78573
+ children: node.children,
78573
78574
  type: NodeTypes.callout,
78574
78575
  data: {
78575
78576
  hName: node.name,
78576
- hProperties: { icon },
78577
+ hProperties: { icon, empty },
78577
78578
  },
78578
78579
  position: node.position,
78579
78580
  };
@@ -78693,6 +78694,24 @@ const compile_image_image = (node) => {
78693
78694
  };
78694
78695
  /* harmony default export */ const compile_image = (compile_image_image);
78695
78696
 
78697
+ ;// CONCATENATED MODULE: ./processor/compile/compatibility.ts
78698
+
78699
+ const compatibility = (node) => {
78700
+ switch (node.type) {
78701
+ case NodeTypes.variable:
78702
+ return `<Variable name="${node.text}" />`;
78703
+ case NodeTypes.glossary:
78704
+ return `<Glossary>${node.data.hProperties.term}</Glossary>`;
78705
+ case NodeTypes.reusableContent:
78706
+ return `<${node.tag} />`;
78707
+ case 'html':
78708
+ return node.value.replaceAll(/<!--(.*)-->/g, '{/*$1*/}');
78709
+ default:
78710
+ throw new Error('Unhandled node type!');
78711
+ }
78712
+ };
78713
+ /* harmony default export */ const compile_compatibility = (compatibility);
78714
+
78696
78715
  ;// CONCATENATED MODULE: ./processor/compile/index.ts
78697
78716
 
78698
78717
 
@@ -78701,6 +78720,7 @@ const compile_image_image = (node) => {
78701
78720
 
78702
78721
 
78703
78722
 
78723
+
78704
78724
  function compilers() {
78705
78725
  const data = this.data();
78706
78726
  const toMarkdownExtensions = data.toMarkdownExtensions || (data.toMarkdownExtensions = []);
@@ -78711,6 +78731,10 @@ function compilers() {
78711
78731
  [NodeTypes.embed]: compile_embed,
78712
78732
  [NodeTypes.htmlBlock]: html_block,
78713
78733
  [NodeTypes.image]: compile_image,
78734
+ [NodeTypes.variable]: compile_compatibility,
78735
+ [NodeTypes.glossary]: compile_compatibility,
78736
+ [NodeTypes.reusableContent]: compile_compatibility,
78737
+ html: compile_compatibility,
78714
78738
  };
78715
78739
  toMarkdownExtensions.push({ extensions: [{ handlers }] });
78716
78740
  }
@@ -78746,7 +78770,7 @@ const compose = (children, ...contexts) => {
78746
78770
  return external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(Context.Provider, { value: value }, content);
78747
78771
  }, children);
78748
78772
  };
78749
- const Contexts = ({ children, terms = [], variables = { user: { keys: [] }, defaults: [] }, baseUrl = '/' }) => {
78773
+ const Contexts = ({ children, terms = [], variables = { user: {}, defaults: [] }, baseUrl = '/' }) => {
78750
78774
  return compose(children, [GlossaryTerms, terms], [variable_.VariablesContext, variables], [BaseUrl, baseUrl]);
78751
78775
  };
78752
78776
  /* harmony default export */ const contexts = (Contexts);
@@ -78790,7 +78814,7 @@ const utils = {
78790
78814
  calloutIcons: {},
78791
78815
  };
78792
78816
  const makeUseMDXComponents = (more) => {
78793
- const components = Object.assign(Object.assign(Object.assign({}, more), components_namespaceObject), { Variable: (variable_default()), code: components_Code, 'code-tabs': components_CodeTabs, 'html-block': components_HTMLBlock, img: components_Image, table: components_Table });
78817
+ const components = Object.assign(Object.assign(Object.assign({}, more), components_namespaceObject), { Variable: (variable_default()), code: components_Code, 'code-tabs': components_CodeTabs, 'html-block': components_HTMLBlock, embed: components_Embed, img: components_Image, table: components_Table });
78794
78818
  return () => components;
78795
78819
  };
78796
78820
  const remarkPlugins = [remarkFrontmatter, remarkGfm, ...transform];
package/dist/main.node.js CHANGED
@@ -12,7 +12,7 @@
12
12
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
13
13
 
14
14
  /*! For license information please see index.js.LICENSE.txt */
15
- (()=>{var u={846:(u,D,e)=>{var t=e(905);u.exports=t.createContext(!1)},100:(u,D,e)=>{var t=e(905);u.exports=t.createContext({selected:"",changeSelected:function(){}})},926:(u,D,e)=>{var t=e(905);u.exports=t.createContext({user:{},defaults:[]})},146:(u,D,e)=>{function t(){return t=Object.assign||function(u){for(var D=1;D<arguments.length;D++){var e=arguments[D];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(u[t]=e[t])}return u},t.apply(this,arguments)}function r(u){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},r(u)}function F(u,D){for(var e=0;e<D.length;e++){var t=D[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(u,t.key,t)}}function n(u,D){return n=Object.setPrototypeOf||function(u,D){return u.__proto__=D,u},n(u,D)}function o(u){var D=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(u){return!1}}();return function(){var e,t=C(u);if(D){var F=C(this).constructor;e=Reflect.construct(t,arguments,F)}else e=t.apply(this,arguments);return function(u,D){if(D&&("object"===r(D)||"function"==typeof D))return D;return A(u)}(this,e)}}function A(u){if(void 0===u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function C(u){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},C(u)}var E=e(814),a=e(526),s=e(905),i=e(846),B=e(100),l=e(926),c=function(u){!function(u,D){if("function"!=typeof D&&null!==D)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(D&&D.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),D&&n(u,D)}(a,u);var D,e,t,C=o(a);function a(u){var D;return function(u,D){if(!(u instanceof D))throw new TypeError("Cannot call a class as a function")}(this,a),(D=C.call(this,u)).state={showDropdown:!1},D.toggleVarDropdown=D.toggleVarDropdown.bind(A(D)),D.toggleAuthDropdown=D.toggleAuthDropdown.bind(A(D)),D.renderVarDropdown=D.renderVarDropdown.bind(A(D)),D.onChange=D.onChange.bind(A(D)),D}return D=a,t=[{key:"renderAuthDropdown",value:function(){return s.createElement("div",{className:E("ns-popover-dropdown-theme","ns-popover-bottom-placement","ns-popover-right-align"),style:{position:"absolute"}},s.createElement("div",{className:"ns-popover-tooltip",id:"loginDropdown"},s.createElement("div",{className:"ns-triangle"}),s.createElement("div",{className:"triangle"}),s.createElement("div",{className:"pad"},s.createElement("div",{className:"text-center"},"Authenticate to personalize this page",s.createElement("a",{className:E("btn","btn-primary"),href:"/oauth",target:"_self"},"Authenticate")))))}}],(e=[{key:"onChange",value:function(u){this.toggleVarDropdown(),this.props.changeSelected(u.target.value)}},{key:"getDefault",value:function(){var u=this,D=this.props.defaults.filter(Boolean).find((function(D){return D.name===u.props.variable}))||{};return D.default?D.default:this.props.variable.toUpperCase()}},{key:"getSelectedValue",value:function(u){var D=this.props.user,e={};return Array.isArray(D.keys)&&D.keys.length&&(e=u?D.keys.find((function(D){return D.name===u})):D.keys[0]),e}},{key:"shouldShowVarDropdown",value:function(u){var D=this.props,e=D.user,t=D.variable;return!!this.getSelectedValue(u)[t]&&Array.isArray(e.keys)&&e.keys.length>1}},{key:"getValue",value:function(u){var D=this.props.variable,e=this.getSelectedValue(u)[D]||this.props.user[D]||this.getDefault();return"object"===r(e)?JSON.stringify(e):e}},{key:"toggleVarDropdown",value:function(){this.shouldShowVarDropdown()&&this.setState((function(u){return{showDropdown:!u.showDropdown}}))}},{key:"toggleAuthDropdown",value:function(){this.setState((function(u){return{showAuthDropdown:!u.showAuthDropdown}}))}},{key:"renderVarDropdown",value:function(){return s.createElement("select",{onChange:this.onChange,value:this.props.selected},this.props.user.keys.map((function(u){return s.createElement("option",{key:u.name,value:u.name},u.name)})))}},{key:"render",value:function(){var u=this.props,D=u.user,e=u.selected;return Array.isArray(D.keys)&&D.keys.length?s.createElement("span",null,!this.state.showDropdown&&s.createElement("span",{className:"variable-underline",onClick:this.toggleVarDropdown},this.getValue(e)),this.state.showDropdown&&this.renderVarDropdown()):this.getValue()===this.getDefault()&&this.props.oauth?s.createElement("span",null,s.createElement("span",{className:"variable-underline",onClick:this.toggleAuthDropdown},this.getValue()),this.state.showAuthDropdown&&a.renderAuthDropdown()):s.createElement("span",null,this.getValue())}}])&&F(D.prototype,e),t&&F(D,t),a}(s.Component);c.propTypes={changeSelected:a.func.isRequired,defaults:a.arrayOf(a.shape({default:a.string,name:a.string})).isRequired,oauth:a.bool,selected:a.string.isRequired,user:a.shape({keys:a.array}).isRequired,variable:a.string.isRequired},c.defaultProps={oauth:!1},u.exports=function(u){return s.createElement(l.Consumer,null,(function(D){var e=D.user,r=D.defaults;return s.createElement(i.Consumer,null,(function(D){return s.createElement(B.Consumer,null,(function(F){var n=F.selected,o=F.changeSelected;return s.createElement(c,t({},u,{changeSelected:o,defaults:r,oauth:D,selected:n,user:e}))}))}))}))},u.exports.Variable=c,u.exports.VARIABLE_REGEXP=/(?:\\)?<<((?:(?![\n\r])(?:[\t-\r \x2D\.0-:A-Z_a-z\xA0\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2000-\u200A\u2028\u2029\u202F\u205F\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3000\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFEFF\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\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\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\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\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]))+)(?:\\)?>>/i.source,u.exports.VariablesContext=l,u.exports.SelectedAppContext=B},814:(u,D,e)=>{var t;function r(u){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},r(u)}!function(){"use strict";var F={}.hasOwnProperty;function n(){for(var u=[],D=0;D<arguments.length;D++){var e=arguments[D];if(e){var t=r(e);if("string"===t||"number"===t)u.push(e);else if(Array.isArray(e)){if(e.length){var o=n.apply(null,e);o&&u.push(o)}}else if("object"===t){if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]")){u.push(e.toString());continue}for(var A in e)F.call(e,A)&&e[A]&&u.push(A)}}}return u.join(" ")}u.exports?(n.default=n,u.exports=n):"object"===r(e.amdO)&&e.amdO?void 0===(t=function(){return n}.apply(D,[]))||(u.exports=t):window.classNames=n}()},428:(u,D,e)=>{"use strict";var t=e(134);function r(){}function F(){}F.resetWarningCache=r,u.exports=function(){function u(u,D,e,r,F,n){if(n!==t){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function D(){return u}u.isRequired=u;var e={array:u,bigint:u,bool:u,func:u,number:u,object:u,string:u,symbol:u,any:u,arrayOf:D,element:u,elementType:u,instanceOf:D,node:u,objectOf:D,oneOf:D,oneOfType:D,shape:D,exact:D,checkPropTypes:F,resetWarningCache:r};return e.PropTypes=e,e}},526:(u,D,e)=>{u.exports=e(428)()},134:u=>{"use strict";u.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},905:u=>{"use strict";u.exports=__webpack_require__(540)}},D={};function e(t){var r=D[t];if(void 0!==r)return r.exports;var F=D[t]={exports:{}};return u[t](F,F.exports,e),F.exports}e.amdO={};var t=e(146);module.exports=t})();
15
+ (()=>{var u={846:(u,D,e)=>{var t=e(905);u.exports=t.createContext(!1)},100:(u,D,e)=>{var t=e(905);u.exports=t.createContext({selected:"",changeSelected:function(){}})},926:(u,D,e)=>{var t=e(905);u.exports=t.createContext({user:{},defaults:[]})},146:(u,D,e)=>{function t(){return t=Object.assign||function(u){for(var D=1;D<arguments.length;D++){var e=arguments[D];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(u[t]=e[t])}return u},t.apply(this,arguments)}function r(u){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},r(u)}function F(u,D){for(var e=0;e<D.length;e++){var t=D[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(u,t.key,t)}}function n(u,D){return n=Object.setPrototypeOf||function(u,D){return u.__proto__=D,u},n(u,D)}function o(u){var D=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(u){return!1}}();return function(){var e,t=C(u);if(D){var F=C(this).constructor;e=Reflect.construct(t,arguments,F)}else e=t.apply(this,arguments);return function(u,D){if(D&&("object"===r(D)||"function"==typeof D))return D;return A(u)}(this,e)}}function A(u){if(void 0===u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function C(u){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},C(u)}var E=e(745),a=e(526),s=e(905),i=e(846),B=e(100),l=e(926),c=function(u){!function(u,D){if("function"!=typeof D&&null!==D)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(D&&D.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),D&&n(u,D)}(a,u);var D,e,t,C=o(a);function a(u){var D;return function(u,D){if(!(u instanceof D))throw new TypeError("Cannot call a class as a function")}(this,a),(D=C.call(this,u)).state={showDropdown:!1},D.getName=D.getName.bind(A(D)),D.toggleVarDropdown=D.toggleVarDropdown.bind(A(D)),D.toggleAuthDropdown=D.toggleAuthDropdown.bind(A(D)),D.renderVarDropdown=D.renderVarDropdown.bind(A(D)),D.onChange=D.onChange.bind(A(D)),D}return D=a,t=[{key:"renderAuthDropdown",value:function(){return s.createElement("div",{className:E("ns-popover-dropdown-theme","ns-popover-bottom-placement","ns-popover-right-align"),style:{position:"absolute"}},s.createElement("div",{className:"ns-popover-tooltip",id:"loginDropdown"},s.createElement("div",{className:"ns-triangle"}),s.createElement("div",{className:"triangle"}),s.createElement("div",{className:"pad"},s.createElement("div",{className:"text-center"},"Authenticate to personalize this page",s.createElement("a",{className:E("btn","btn-primary"),href:"/oauth",target:"_self"},"Authenticate")))))}}],(e=[{key:"onChange",value:function(u){this.toggleVarDropdown(),this.props.changeSelected(u.target.value)}},{key:"getName",value:function(){var u=this.props.name||this.props.variable;if(!u)throw new TypeError("Missing prop 'name' or 'variable' for Variable component!");return u}},{key:"getDefault",value:function(){var u=this,D=this.props.defaults.filter(Boolean).find((function(D){return D.name===u.getName()}))||{};return D.default?D.default:this.getName().toUpperCase()}},{key:"getSelectedValue",value:function(u){var D=this.props.user,e={};return Array.isArray(D.keys)&&D.keys.length&&(e=u?D.keys.find((function(D){return D.name===u})):D.keys[0]),e}},{key:"shouldShowVarDropdown",value:function(u){var D=this.props.user;return!!this.getSelectedValue(u)[this.getName()]&&Array.isArray(D.keys)&&D.keys.length>1}},{key:"getValue",value:function(u){var D=this.getSelectedValue(u)[this.getName()]||this.props.user[this.getName()]||this.getDefault();return"object"===r(D)?JSON.stringify(D):D}},{key:"toggleVarDropdown",value:function(){this.shouldShowVarDropdown()&&this.setState((function(u){return{showDropdown:!u.showDropdown}}))}},{key:"toggleAuthDropdown",value:function(){this.setState((function(u){return{showAuthDropdown:!u.showAuthDropdown}}))}},{key:"renderVarDropdown",value:function(){return s.createElement("select",{onChange:this.onChange,value:this.props.selected},this.props.user.keys.map((function(u){return s.createElement("option",{key:u.name,value:u.name},u.name)})))}},{key:"render",value:function(){var u=this.props,D=u.user,e=u.selected;return Array.isArray(D.keys)&&D.keys.length?s.createElement("span",null,!this.state.showDropdown&&s.createElement("span",{className:"variable-underline",onClick:this.toggleVarDropdown},this.getValue(e)),this.state.showDropdown&&this.renderVarDropdown()):this.getValue()===this.getDefault()&&this.props.oauth?s.createElement("span",null,s.createElement("span",{className:"variable-underline",onClick:this.toggleAuthDropdown},this.getValue()),this.state.showAuthDropdown&&a.renderAuthDropdown()):s.createElement("span",null,this.getValue())}}])&&F(D.prototype,e),t&&F(D,t),a}(s.Component);c.propTypes={changeSelected:a.func.isRequired,defaults:a.arrayOf(a.shape({default:a.string,name:a.string})).isRequired,name:a.string,oauth:a.bool,selected:a.string.isRequired,user:a.shape({keys:a.array}).isRequired,variable:a.string},c.defaultProps={oauth:!1},u.exports=function(u){return s.createElement(l.Consumer,null,(function(D){var e=D.user,r=D.defaults;return s.createElement(i.Consumer,null,(function(D){return s.createElement(B.Consumer,null,(function(F){var n=F.selected,o=F.changeSelected;return s.createElement(c,t({},u,{changeSelected:o,defaults:r,oauth:D,selected:n,user:e}))}))}))}))},u.exports.Variable=c,u.exports.VARIABLE_REGEXP=/(?:\\)?<<((?:(?![\n\r])(?:[\t-\r \x2D\.0-:A-Z_a-z\xA0\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2000-\u200A\u2028\u2029\u202F\u205F\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3000\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\u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uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]))+)(?:\\)?>>/i.source,u.exports.VariablesContext=l,u.exports.SelectedAppContext=B},428:(u,D,e)=>{"use strict";var t=e(134);function r(){}function F(){}F.resetWarningCache=r,u.exports=function(){function u(u,D,e,r,F,n){if(n!==t){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function D(){return u}u.isRequired=u;var e={array:u,bigint:u,bool:u,func:u,number:u,object:u,string:u,symbol:u,any:u,arrayOf:D,element:u,elementType:u,instanceOf:D,node:u,objectOf:D,oneOf:D,oneOfType:D,shape:D,exact:D,checkPropTypes:F,resetWarningCache:r};return e.PropTypes=e,e}},526:(u,D,e)=>{u.exports=e(428)()},134:u=>{"use strict";u.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},905:u=>{"use strict";u.exports=__webpack_require__(540)},745:(u,D,e)=>{var t;function r(u){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},r(u)}!function(){"use strict";var F={}.hasOwnProperty;function n(){for(var u="",D=0;D<arguments.length;D++){var e=arguments[D];e&&(u=A(u,o(e)))}return u}function o(u){if("string"==typeof u||"number"==typeof u)return u;if("object"!==r(u))return"";if(Array.isArray(u))return n.apply(null,u);if(u.toString!==Object.prototype.toString&&!u.toString.toString().includes("[native code]"))return u.toString();var D="";for(var e in u)F.call(u,e)&&u[e]&&(D=A(D,e));return D}function A(u,D){return D?u?u+" "+D:u+D:u}u.exports?(n.default=n,u.exports=n):"object"===r(e.amdO)&&e.amdO?void 0===(t=function(){return n}.apply(D,[]))||(u.exports=t):window.classNames=n}()}},D={};function e(t){var r=D[t];if(void 0!==r)return r.exports;var F=D[t]={exports:{}};return u[t](F,F.exports,e),F.exports}e.amdO={};var t=e(146);module.exports=t})();
16
16
 
17
17
  /***/ }),
18
18
 
@@ -58238,17 +58238,15 @@ const themes = {
58238
58238
  '\u26A0': 'warn',
58239
58239
  };
58240
58240
  const Callout = (props) => {
58241
- const { attributes, children, icon } = props;
58241
+ const { attributes, children, icon, empty } = props;
58242
58242
  let theme = props.theme || themes[icon] || 'default';
58243
- const [heading, ...body] = Array.isArray(children) ? children : [children];
58244
- const empty = !heading.props.children;
58245
58243
  return (
58246
58244
  // @ts-ignore
58247
58245
  react.createElement("blockquote", Object.assign({}, attributes, { className: `callout callout_${theme}`, theme: icon }),
58248
58246
  react.createElement("h3", { className: `callout-heading${empty ? ' empty' : ''}` },
58249
58247
  react.createElement("span", { className: "callout-icon" }, icon),
58250
- !empty && heading),
58251
- body));
58248
+ empty || children[0]),
58249
+ empty ? children : react.Children.toArray(children).slice(1)));
58252
58250
  };
58253
58251
  /* harmony default export */ const components_Callout = (Callout);
58254
58252
 
@@ -63555,7 +63553,10 @@ var NodeTypes;
63555
63553
  NodeTypes["i"] = "i";
63556
63554
  NodeTypes["image"] = "image";
63557
63555
  NodeTypes["htmlBlock"] = "html-block";
63558
- NodeTypes["embed"] = "rdme-embed";
63556
+ NodeTypes["embed"] = "embed";
63557
+ NodeTypes["variable"] = "readme-variable";
63558
+ NodeTypes["glossary"] = "readme-glossary-item";
63559
+ NodeTypes["reusableContent"] = "reusable-content";
63559
63560
  })(NodeTypes || (NodeTypes = {}));
63560
63561
 
63561
63562
  ;// CONCATENATED MODULE: ./processor/transform/callouts.ts
@@ -63573,13 +63574,16 @@ const calloutTransformer = () => {
63573
63574
  if (icon && match) {
63574
63575
  const heading = startText.slice(match.length);
63575
63576
  node.children[0].children[0].value = heading;
63576
- node.type = NodeTypes.callout;
63577
- node.data = {
63578
- hName: 'Callout',
63579
- hProperties: {
63580
- icon,
63577
+ Object.assign(node, {
63578
+ type: NodeTypes.callout,
63579
+ data: {
63580
+ hName: 'Callout',
63581
+ hProperties: {
63582
+ icon,
63583
+ empty: !heading.length,
63584
+ },
63581
63585
  },
63582
- };
63586
+ });
63583
63587
  }
63584
63588
  });
63585
63589
  };
@@ -80645,7 +80649,6 @@ const gemojiTransformer = () => (tree) => {
80645
80649
  ;// CONCATENATED MODULE: ./processor/transform/readme-components.ts
80646
80650
 
80647
80651
 
80648
-
80649
80652
  const readme_components_types = {
80650
80653
  Callout: NodeTypes['callout'],
80651
80654
  Code: 'code',
@@ -80662,7 +80665,6 @@ const attributes = (jsx) => jsx.attributes.reduce((memo, attr) => {
80662
80665
  return memo;
80663
80666
  }, {});
80664
80667
  const coerceJsxToMd = ({ components = {} } = {}) => (node, index, parent) => {
80665
- var _a;
80666
80668
  if (node.name in components)
80667
80669
  return;
80668
80670
  if (node.name === 'Code') {
@@ -80705,15 +80707,14 @@ const coerceJsxToMd = ({ components = {} } = {}) => (node, index, parent) => {
80705
80707
  parent.children[index] = mdNode;
80706
80708
  }
80707
80709
  else if (node.name === 'Callout') {
80708
- const { heading, icon } = attributes(node);
80709
- const child = mdast(heading);
80710
+ const { icon, empty = false } = attributes(node);
80710
80711
  // @ts-ignore
80711
80712
  const mdNode = {
80712
- children: [(_a = child === null || child === void 0 ? void 0 : child.children) === null || _a === void 0 ? void 0 : _a[0], ...node.children].filter(Boolean),
80713
+ children: node.children,
80713
80714
  type: NodeTypes.callout,
80714
80715
  data: {
80715
80716
  hName: node.name,
80716
- hProperties: { icon },
80717
+ hProperties: { icon, empty },
80717
80718
  },
80718
80719
  position: node.position,
80719
80720
  };
@@ -80833,6 +80834,24 @@ const compile_image_image = (node) => {
80833
80834
  };
80834
80835
  /* harmony default export */ const compile_image = (compile_image_image);
80835
80836
 
80837
+ ;// CONCATENATED MODULE: ./processor/compile/compatibility.ts
80838
+
80839
+ const compatibility = (node) => {
80840
+ switch (node.type) {
80841
+ case NodeTypes.variable:
80842
+ return `<Variable name="${node.text}" />`;
80843
+ case NodeTypes.glossary:
80844
+ return `<Glossary>${node.data.hProperties.term}</Glossary>`;
80845
+ case NodeTypes.reusableContent:
80846
+ return `<${node.tag} />`;
80847
+ case 'html':
80848
+ return node.value.replaceAll(/<!--(.*)-->/g, '{/*$1*/}');
80849
+ default:
80850
+ throw new Error('Unhandled node type!');
80851
+ }
80852
+ };
80853
+ /* harmony default export */ const compile_compatibility = (compatibility);
80854
+
80836
80855
  ;// CONCATENATED MODULE: ./processor/compile/index.ts
80837
80856
 
80838
80857
 
@@ -80841,6 +80860,7 @@ const compile_image_image = (node) => {
80841
80860
 
80842
80861
 
80843
80862
 
80863
+
80844
80864
  function compilers() {
80845
80865
  const data = this.data();
80846
80866
  const toMarkdownExtensions = data.toMarkdownExtensions || (data.toMarkdownExtensions = []);
@@ -80851,6 +80871,10 @@ function compilers() {
80851
80871
  [NodeTypes.embed]: compile_embed,
80852
80872
  [NodeTypes.htmlBlock]: html_block,
80853
80873
  [NodeTypes.image]: compile_image,
80874
+ [NodeTypes.variable]: compile_compatibility,
80875
+ [NodeTypes.glossary]: compile_compatibility,
80876
+ [NodeTypes.reusableContent]: compile_compatibility,
80877
+ html: compile_compatibility,
80854
80878
  };
80855
80879
  toMarkdownExtensions.push({ extensions: [{ handlers }] });
80856
80880
  }
@@ -80886,7 +80910,7 @@ const compose = (children, ...contexts) => {
80886
80910
  return react.createElement(Context.Provider, { value: value }, content);
80887
80911
  }, children);
80888
80912
  };
80889
- const Contexts = ({ children, terms = [], variables = { user: { keys: [] }, defaults: [] }, baseUrl = '/' }) => {
80913
+ const Contexts = ({ children, terms = [], variables = { user: {}, defaults: [] }, baseUrl = '/' }) => {
80890
80914
  return compose(children, [GlossaryTerms, terms], [dist.VariablesContext, variables], [BaseUrl, baseUrl]);
80891
80915
  };
80892
80916
  /* harmony default export */ const contexts = (Contexts);
@@ -80930,7 +80954,7 @@ const utils = {
80930
80954
  calloutIcons: {},
80931
80955
  };
80932
80956
  const makeUseMDXComponents = (more) => {
80933
- const components = Object.assign(Object.assign(Object.assign({}, more), components_namespaceObject), { Variable: (dist_default()), code: components_Code, 'code-tabs': components_CodeTabs, 'html-block': components_HTMLBlock, img: components_Image, table: components_Table });
80957
+ const components = Object.assign(Object.assign(Object.assign({}, more), components_namespaceObject), { Variable: (dist_default()), code: components_Code, 'code-tabs': components_CodeTabs, 'html-block': components_HTMLBlock, embed: components_Embed, img: components_Image, table: components_Table });
80934
80958
  return () => components;
80935
80959
  };
80936
80960
  const remarkPlugins = [remarkFrontmatter, remarkGfm, ...transform];
@@ -0,0 +1,18 @@
1
+ import { Html } from 'mdast';
2
+ import { NodeTypes } from '../../enums';
3
+ type CompatNodes = {
4
+ type: NodeTypes.variable;
5
+ text: string;
6
+ } | {
7
+ type: NodeTypes.glossary;
8
+ data: {
9
+ hProperties: {
10
+ term: string;
11
+ };
12
+ };
13
+ } | {
14
+ type: NodeTypes.reusableContent;
15
+ tag: string;
16
+ } | Html;
17
+ declare const compatibility: (node: CompatNodes) => string;
18
+ export default compatibility;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@readme/markdown",
3
3
  "description": "ReadMe's React-based Markdown parser",
4
4
  "author": "Rafe Goldberg <rafe@readme.io>",
5
- "version": "6.75.0-beta.37",
5
+ "version": "6.75.0-beta.39",
6
6
  "main": "dist/main.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "browser": "dist/main.js",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@mdx-js/react": "^3.0.0",
59
- "@readme/variable": "^16.0.0",
59
+ "@readme/variable": "^16.1.0",
60
60
  "@tippyjs/react": "^4.1.0",
61
61
  "react": "16.x || 17.x || 18.x",
62
62
  "react-dom": "16.x || 17.x || 18.x"