@luminati-io/uikit 3.0.7 → 3.0.8-beta.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -22048,45 +22048,47 @@ __webpack_require__.r(__webpack_exports__);
22048
22048
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22049
22049
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
22050
22050
  /* harmony export */ });
22051
- /* harmony import */ var prismjs_components_prism_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prismjs/components/prism-core */ "./node_modules/prismjs/components/prism-core.js");
22052
- /* harmony import */ var prismjs_components_prism_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_core__WEBPACK_IMPORTED_MODULE_0__);
22053
- /* harmony import */ var prismjs_components_prism_clike__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prismjs/components/prism-clike */ "./node_modules/prismjs/components/prism-clike.js");
22054
- /* harmony import */ var prismjs_components_prism_clike__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_clike__WEBPACK_IMPORTED_MODULE_1__);
22055
- /* harmony import */ var prismjs_components_prism_markup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prismjs/components/prism-markup */ "./node_modules/prismjs/components/prism-markup.js");
22056
- /* harmony import */ var prismjs_components_prism_markup__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_markup__WEBPACK_IMPORTED_MODULE_2__);
22057
- /* harmony import */ var prismjs_components_prism_javascript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prismjs/components/prism-javascript */ "./node_modules/prismjs/components/prism-javascript.js");
22058
- /* harmony import */ var prismjs_components_prism_javascript__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_javascript__WEBPACK_IMPORTED_MODULE_3__);
22059
- /* harmony import */ var prismjs_components_prism_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prismjs/components/prism-css */ "./node_modules/prismjs/components/prism-css.js");
22060
- /* harmony import */ var prismjs_components_prism_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_css__WEBPACK_IMPORTED_MODULE_4__);
22061
- /* harmony import */ var prismjs_components_prism_bash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prismjs/components/prism-bash */ "./node_modules/prismjs/components/prism-bash.js");
22062
- /* harmony import */ var prismjs_components_prism_bash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_bash__WEBPACK_IMPORTED_MODULE_5__);
22063
- /* harmony import */ var prismjs_components_prism_java__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prismjs/components/prism-java */ "./node_modules/prismjs/components/prism-java.js");
22064
- /* harmony import */ var prismjs_components_prism_java__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_java__WEBPACK_IMPORTED_MODULE_6__);
22065
- /* harmony import */ var prismjs_components_prism_csharp__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prismjs/components/prism-csharp */ "./node_modules/prismjs/components/prism-csharp.js");
22066
- /* harmony import */ var prismjs_components_prism_csharp__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_csharp__WEBPACK_IMPORTED_MODULE_7__);
22067
- /* harmony import */ var prismjs_components_prism_basic__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prismjs/components/prism-basic */ "./node_modules/prismjs/components/prism-basic.js");
22068
- /* harmony import */ var prismjs_components_prism_basic__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_basic__WEBPACK_IMPORTED_MODULE_8__);
22069
- /* harmony import */ var prismjs_components_prism_vbnet__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! prismjs/components/prism-vbnet */ "./node_modules/prismjs/components/prism-vbnet.js");
22070
- /* harmony import */ var prismjs_components_prism_vbnet__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_vbnet__WEBPACK_IMPORTED_MODULE_9__);
22071
- /* harmony import */ var prismjs_components_prism_markup_templating__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! prismjs/components/prism-markup-templating */ "./node_modules/prismjs/components/prism-markup-templating.js");
22072
- /* harmony import */ var prismjs_components_prism_markup_templating__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_markup_templating__WEBPACK_IMPORTED_MODULE_10__);
22073
- /* harmony import */ var prismjs_components_prism_php__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! prismjs/components/prism-php */ "./node_modules/prismjs/components/prism-php.js");
22074
- /* harmony import */ var prismjs_components_prism_php__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_php__WEBPACK_IMPORTED_MODULE_11__);
22075
- /* harmony import */ var prismjs_components_prism_ruby__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! prismjs/components/prism-ruby */ "./node_modules/prismjs/components/prism-ruby.js");
22076
- /* harmony import */ var prismjs_components_prism_ruby__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_ruby__WEBPACK_IMPORTED_MODULE_12__);
22077
- /* harmony import */ var prismjs_components_prism_perl__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! prismjs/components/prism-perl */ "./node_modules/prismjs/components/prism-perl.js");
22078
- /* harmony import */ var prismjs_components_prism_perl__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_perl__WEBPACK_IMPORTED_MODULE_13__);
22079
- /* harmony import */ var prismjs_components_prism_python__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! prismjs/components/prism-python */ "./node_modules/prismjs/components/prism-python.js");
22080
- /* harmony import */ var prismjs_components_prism_python__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_python__WEBPACK_IMPORTED_MODULE_14__);
22081
- /* harmony import */ var prismjs_components_prism_json__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! prismjs/components/prism-json */ "./node_modules/prismjs/components/prism-json.js");
22082
- /* harmony import */ var prismjs_components_prism_json__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_json__WEBPACK_IMPORTED_MODULE_15__);
22083
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! prop-types */ "prop-types");
22084
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_16__);
22085
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! react */ "react");
22086
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_17__);
22051
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
22052
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
22053
+ /* harmony import */ var prismjs_components_prism_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prismjs/components/prism-core */ "./node_modules/prismjs/components/prism-core.js");
22054
+ /* harmony import */ var prismjs_components_prism_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_core__WEBPACK_IMPORTED_MODULE_1__);
22055
+ /* harmony import */ var prismjs_components_prism_clike__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prismjs/components/prism-clike */ "./node_modules/prismjs/components/prism-clike.js");
22056
+ /* harmony import */ var prismjs_components_prism_clike__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_clike__WEBPACK_IMPORTED_MODULE_2__);
22057
+ /* harmony import */ var prismjs_components_prism_markup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prismjs/components/prism-markup */ "./node_modules/prismjs/components/prism-markup.js");
22058
+ /* harmony import */ var prismjs_components_prism_markup__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_markup__WEBPACK_IMPORTED_MODULE_3__);
22059
+ /* harmony import */ var prismjs_components_prism_javascript__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prismjs/components/prism-javascript */ "./node_modules/prismjs/components/prism-javascript.js");
22060
+ /* harmony import */ var prismjs_components_prism_javascript__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_javascript__WEBPACK_IMPORTED_MODULE_4__);
22061
+ /* harmony import */ var prismjs_components_prism_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prismjs/components/prism-css */ "./node_modules/prismjs/components/prism-css.js");
22062
+ /* harmony import */ var prismjs_components_prism_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_css__WEBPACK_IMPORTED_MODULE_5__);
22063
+ /* harmony import */ var prismjs_components_prism_bash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prismjs/components/prism-bash */ "./node_modules/prismjs/components/prism-bash.js");
22064
+ /* harmony import */ var prismjs_components_prism_bash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_bash__WEBPACK_IMPORTED_MODULE_6__);
22065
+ /* harmony import */ var prismjs_components_prism_java__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prismjs/components/prism-java */ "./node_modules/prismjs/components/prism-java.js");
22066
+ /* harmony import */ var prismjs_components_prism_java__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_java__WEBPACK_IMPORTED_MODULE_7__);
22067
+ /* harmony import */ var prismjs_components_prism_csharp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prismjs/components/prism-csharp */ "./node_modules/prismjs/components/prism-csharp.js");
22068
+ /* harmony import */ var prismjs_components_prism_csharp__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_csharp__WEBPACK_IMPORTED_MODULE_8__);
22069
+ /* harmony import */ var prismjs_components_prism_basic__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! prismjs/components/prism-basic */ "./node_modules/prismjs/components/prism-basic.js");
22070
+ /* harmony import */ var prismjs_components_prism_basic__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_basic__WEBPACK_IMPORTED_MODULE_9__);
22071
+ /* harmony import */ var prismjs_components_prism_vbnet__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! prismjs/components/prism-vbnet */ "./node_modules/prismjs/components/prism-vbnet.js");
22072
+ /* harmony import */ var prismjs_components_prism_vbnet__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_vbnet__WEBPACK_IMPORTED_MODULE_10__);
22073
+ /* harmony import */ var prismjs_components_prism_markup_templating__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! prismjs/components/prism-markup-templating */ "./node_modules/prismjs/components/prism-markup-templating.js");
22074
+ /* harmony import */ var prismjs_components_prism_markup_templating__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_markup_templating__WEBPACK_IMPORTED_MODULE_11__);
22075
+ /* harmony import */ var prismjs_components_prism_php__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! prismjs/components/prism-php */ "./node_modules/prismjs/components/prism-php.js");
22076
+ /* harmony import */ var prismjs_components_prism_php__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_php__WEBPACK_IMPORTED_MODULE_12__);
22077
+ /* harmony import */ var prismjs_components_prism_ruby__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! prismjs/components/prism-ruby */ "./node_modules/prismjs/components/prism-ruby.js");
22078
+ /* harmony import */ var prismjs_components_prism_ruby__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_ruby__WEBPACK_IMPORTED_MODULE_13__);
22079
+ /* harmony import */ var prismjs_components_prism_perl__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! prismjs/components/prism-perl */ "./node_modules/prismjs/components/prism-perl.js");
22080
+ /* harmony import */ var prismjs_components_prism_perl__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_perl__WEBPACK_IMPORTED_MODULE_14__);
22081
+ /* harmony import */ var prismjs_components_prism_python__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! prismjs/components/prism-python */ "./node_modules/prismjs/components/prism-python.js");
22082
+ /* harmony import */ var prismjs_components_prism_python__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_python__WEBPACK_IMPORTED_MODULE_15__);
22083
+ /* harmony import */ var prismjs_components_prism_json__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! prismjs/components/prism-json */ "./node_modules/prismjs/components/prism-json.js");
22084
+ /* harmony import */ var prismjs_components_prism_json__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_json__WEBPACK_IMPORTED_MODULE_16__);
22085
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! prop-types */ "prop-types");
22086
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_17__);
22087
22087
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! styled-components */ "styled-components");
22088
22088
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_18__);
22089
22089
  /* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
22090
+ /* harmony import */ var prismjs_plugins_line_numbers_prism_line_numbers__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! prismjs/plugins/line-numbers/prism-line-numbers */ "./node_modules/prismjs/plugins/line-numbers/prism-line-numbers.js");
22091
+ /* harmony import */ var prismjs_plugins_line_numbers_prism_line_numbers__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(prismjs_plugins_line_numbers_prism_line_numbers__WEBPACK_IMPORTED_MODULE_20__);
22090
22092
  // LICENSE_CODE ZON
22091
22093
 
22092
22094
 
@@ -22111,27 +22113,46 @@ __webpack_require__.r(__webpack_exports__);
22111
22113
 
22112
22114
 
22113
22115
 
22114
- var Code = function Code(props) {
22116
+
22117
+ var Code = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
22115
22118
  var text = props.text,
22116
- lang = props.lang;
22117
- (0,react__WEBPACK_IMPORTED_MODULE_17__.useEffect)(function () {
22118
- prismjs_components_prism_core__WEBPACK_IMPORTED_MODULE_0___default().highlightAll();
22119
- }, [text, lang]);
22120
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(CodeWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement("code", {
22119
+ lang = props.lang,
22120
+ themeProp = props.theme,
22121
+ lineNumbers = props.lineNumbers;
22122
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
22123
+ prismjs_components_prism_core__WEBPACK_IMPORTED_MODULE_1___default().highlightAll();
22124
+ }, [text, lang, lineNumbers]);
22125
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeWrapper, {
22126
+ ref: ref,
22127
+ $theme: themeProp,
22128
+ className: "".concat(lineNumbers ? '' : 'no-', "line-numbers")
22129
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("code", {
22121
22130
  className: "language-".concat(lang, " content")
22122
22131
  }, text));
22123
- };
22132
+ });
22124
22133
  Code.displayName = 'Code';
22134
+ Code.defaultProps = {
22135
+ theme: 'white'
22136
+ };
22125
22137
  Code.propTypes = {
22126
- text: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().string),
22127
- // XXX davidg: config langs
22128
- lang: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().string)
22138
+ text: (prop_types__WEBPACK_IMPORTED_MODULE_17___default().string),
22139
+ lang: prop_types__WEBPACK_IMPORTED_MODULE_17___default().oneOf(['plain', 'plaintext', 'text', 'txt', 'DFS', 'clike', 'markup', 'html', 'mathml', 'svg', 'xml', 'ssml', 'atom', 'rss', 'javascript', 'js', 'css', 'bash', 'sh', 'shell', 'java', 'csharp', 'cs', 'dotnet', 'basic', 'vbnet', 'markup-templating', 'php', 'ruby', 'rb', 'perl', 'python', 'py', 'json', 'webmanifest']),
22140
+ theme: prop_types__WEBPACK_IMPORTED_MODULE_17___default().oneOf(['black', 'white']),
22141
+ lineNumbers: (prop_types__WEBPACK_IMPORTED_MODULE_17___default().bool)
22129
22142
  };
22130
22143
  var CodeWrapper = styled_components__WEBPACK_IMPORTED_MODULE_18___default().pre.withConfig({
22131
22144
  displayName: "CodeWrapper",
22132
22145
  componentId: "sc-1kleg7y-0"
22133
- })(["&&&{padding:0 !important;font-family:", ";margin:0;border:none;background-color:transparent;width:100%;white-space:pre-wrap !important;font-size:", ";line-height:", ";tab-size:4;text-align:left;word-spacing:normal;word-break:break-word;word-wrap:normal;hyphens:none;max-height:none !important;code.content{all:inherit;color:", ";margin:0;padding:0;border:none;background-color:transparent;text-shadow:none;overflow-x:clip;}", " .token.comment,.token.prolog,.token.doctype,.token.cdata{color:slategray;}.token.punctuation{color:#999;}.token.namespace{opacity:.7;}.token.property,.token.tag,.token.boolean,.token.constant,.token.symbol,.token.deleted{color:#f8c555;}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#7ec699;}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string{color:#67cdcc;}.token.atrule,.token.attr-value,.token.keyword{color:#cc99cd;}.token.function,.token.number,.token.class-name{color:#f08d49;}.token.regex,.token.important,.token.variable{color:#e90;}.token.important,.token.bold{font-weight:bold;}.token.italic{font-style:italic;}.token.entity{cursor:help;}}"], _theme__WEBPACK_IMPORTED_MODULE_19__["default"].font_family.mono, _theme__WEBPACK_IMPORTED_MODULE_19__["default"].font_size.sm, _theme__WEBPACK_IMPORTED_MODULE_19__["default"].line_height.loose, _theme__WEBPACK_IMPORTED_MODULE_19__["default"].color.gray_8, '' /* prism selectors below */);
22134
-
22146
+ })(["&&&{font-family:", ";margin:0;border:none;background-color:transparent;width:100%;white-space:pre-wrap !important;font-size:", ";line-height:", ";tab-size:4;text-align:left;word-spacing:normal;word-break:break-word;word-wrap:normal;hyphens:none;max-height:none !important;code.content{all:inherit;margin:0;padding:0;border:none;background-color:transparent;text-shadow:none;}&.line-numbers{position:relative;padding-left:3.8rem;counter-reset:linenumber;& > code{position:relative;white-space:inherit;}.line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8rem;width:3rem;letter-spacing:-1px;border-right:1px solid ", ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;& > span{display:block;counter-increment:linenumber;&:before{content:counter(linenumber);color:", ";display:block;padding-right:0.8rem;text-align:right;}}}}", "}"], _theme__WEBPACK_IMPORTED_MODULE_19__["default"].font_family.mono, _theme__WEBPACK_IMPORTED_MODULE_19__["default"].font_size.sm, _theme__WEBPACK_IMPORTED_MODULE_19__["default"].line_height.loose, function (props) {
22147
+ return props.$theme == 'white' ? '#5F6364' : '#999';
22148
+ }, function (props) {
22149
+ return props.$theme == 'white' ? '#5F6364' : '#999';
22150
+ }, function (props) {
22151
+ if (props.$theme == 'white') {
22152
+ return (0,styled_components__WEBPACK_IMPORTED_MODULE_18__.css)(["code.content{color:#c92c2c;}.token.comment,.token.block-comment,.token.prolog,.token.doctype,.token.cdata{color:#7D8B99;}.token.punctuation{color:#5F6364;}.token.property,.token.tag,.token.boolean,.token.number,.token.function-name,.token.constant,.token.symbol,.token.deleted{color:#c92c2c;}.token.selector,.token.attr-name,.token.string,.token.char,.token.function,.token.builtin,.token.inserted{color:#2f9c0a;}.token.operator,.token.entity,.token.url,.token.variable{color:#a67f59;background:rgba(255,255,255,0.5);}.token.atrule,.token.attr-value,.token.keyword,.token.class-name{color:#1990b8;}.token.regex,.token.important{color:#e90;}.language-css .token.string,.style .token.string{color:#a67f59;background:rgba(255,255,255,0.5);}.token.important{font-weight:normal;}.token.bold{font-weight:bold;}.token.italic{font-style:italic;}.token.entity{cursor:help;}.token.namespace{opacity:.7;}"]);
22153
+ }
22154
+ return (0,styled_components__WEBPACK_IMPORTED_MODULE_18__.css)(["code.content{color:", ";}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:slategray;}.token.punctuation{color:#999;}.token.namespace{opacity:.7;}.token.property,.token.tag,.token.boolean,.token.constant,.token.symbol,.token.deleted{color:#f8c555;}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#7ec699;}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string{color:#67cdcc;}.token.atrule,.token.attr-value,.token.keyword{color:#cc99cd;}.token.function,.token.number,.token.class-name{color:#f08d49;}.token.regex,.token.important,.token.variable{color:#e90;}.token.important,.token.bold{font-weight:bold;}.token.italic{font-style:italic;}.token.entity{cursor:help;}"], _theme__WEBPACK_IMPORTED_MODULE_19__["default"].color.gray_8);
22155
+ });
22135
22156
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Code);
22136
22157
 
22137
22158
  /***/ }),
@@ -22154,8 +22175,8 @@ __webpack_require__.r(__webpack_exports__);
22154
22175
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types");
22155
22176
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
22156
22177
  /* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
22157
- /* harmony import */ var _code_snippet__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./code_snippet */ "./src/code/code_snippet.js");
22158
- /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../layout */ "./src/layout/index.js");
22178
+ /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../layout */ "./src/layout/index.js");
22179
+ /* harmony import */ var _code_snippet__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./code_snippet */ "./src/code/code_snippet.js");
22159
22180
  // LICENSE_CODE ZON
22160
22181
 
22161
22182
 
@@ -22170,37 +22191,54 @@ var CodeBlock = function CodeBlock(props) {
22170
22191
  var header = props.header,
22171
22192
  code = props.code,
22172
22193
  lang = props.lang,
22173
- max_height = props.max_height;
22194
+ max_height = props.max_height,
22195
+ themeProp = props.theme,
22196
+ lineNumbers = props.lineNumbers,
22197
+ copyButton = props.copyButton;
22174
22198
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockWrapper, {
22175
22199
  "data-testid": "code_block"
22176
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockHeader, null, header), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_code_snippet__WEBPACK_IMPORTED_MODULE_4__["default"], {
22200
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockHeader, {
22201
+ $theme: themeProp
22202
+ }, header), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_code_snippet__WEBPACK_IMPORTED_MODULE_5__["default"], {
22177
22203
  max_height: max_height,
22178
22204
  lang: lang,
22179
- code: code
22205
+ code: code,
22206
+ theme: themeProp,
22207
+ lineNumbers: lineNumbers,
22208
+ copyButton: copyButton
22180
22209
  }));
22181
22210
  };
22182
22211
  CodeBlock.displayName = 'CodeBlock';
22183
22212
  CodeBlock.defaultProps = {
22184
- max_height: '500px'
22213
+ max_height: '500px',
22214
+ theme: 'black'
22185
22215
  };
22186
22216
  CodeBlock.propTypes = {
22187
22217
  header: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().node),
22188
22218
  code: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
22189
22219
  lang: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
22190
- max_height: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string)
22220
+ max_height: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
22221
+ theme: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['black', 'white']),
22222
+ lineNumbers: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),
22223
+ copyButton: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool)
22191
22224
  };
22192
22225
  var CodeBlockWrapper = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
22193
22226
  displayName: "CodeBlockWrapper",
22194
22227
  componentId: "sc-dgi5hi-0"
22195
22228
  })(["border-radius:4px;overflow:hidden;font-family:", ";font-size:", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].font_family.sans, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].font_size.md);
22196
- var CodeBlockHeader = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(_layout__WEBPACK_IMPORTED_MODULE_5__.Flex).attrs({
22229
+ var CodeBlockHeader = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(_layout__WEBPACK_IMPORTED_MODULE_4__.Flex).attrs({
22197
22230
  align_items: 'center',
22198
22231
  justify_content: 'space-between',
22199
22232
  padding: '0.9em 1em'
22200
22233
  }).withConfig({
22201
22234
  displayName: "CodeBlockHeader",
22202
22235
  componentId: "sc-dgi5hi-1"
22203
- })(["background-color:", ";color:", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11_50, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_8);
22236
+ })(["", ""], function (props) {
22237
+ if (props.$theme == 'white') {
22238
+ return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["background-color:", ";color:", ";border-bottom:1px solid ", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_2, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_9, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_5);
22239
+ }
22240
+ return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["background-color:", ";color:", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11_50, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_9);
22241
+ });
22204
22242
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CodeBlock);
22205
22243
 
22206
22244
  /***/ }),
@@ -22225,6 +22263,7 @@ __webpack_require__.r(__webpack_exports__);
22225
22263
  /* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
22226
22264
  /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../layout */ "./src/layout/index.js");
22227
22265
  /* harmony import */ var _code__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./code */ "./src/code/code.js");
22266
+ /* harmony import */ var _copy_button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./copy_button */ "./src/code/copy_button.js");
22228
22267
  // LICENSE_CODE ZON
22229
22268
 
22230
22269
 
@@ -22235,25 +22274,44 @@ __webpack_require__.r(__webpack_exports__);
22235
22274
 
22236
22275
 
22237
22276
 
22238
- var CodeSnippet = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
22277
+
22278
+ var CodeSnippet = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
22239
22279
  var code = props.code,
22240
22280
  lang = props.lang,
22241
22281
  max_height = props.max_height,
22242
- className = props.className;
22282
+ className = props.className,
22283
+ themeProp = props.theme,
22284
+ lineNumbers = props.lineNumbers,
22285
+ copyButton = props.copyButton;
22286
+ var codeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
22243
22287
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockBody, {
22244
22288
  ref: ref,
22245
22289
  className: className,
22246
- max_height: max_height
22290
+ max_height: max_height,
22291
+ $theme: themeProp
22247
22292
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_code__WEBPACK_IMPORTED_MODULE_5__["default"], {
22293
+ ref: codeRef,
22248
22294
  lang: lang,
22249
- text: code
22295
+ text: code,
22296
+ theme: themeProp,
22297
+ lineNumbers: lineNumbers
22298
+ }), !!copyButton && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_copy_button__WEBPACK_IMPORTED_MODULE_6__["default"], {
22299
+ code: code,
22300
+ theme: themeProp,
22301
+ codeRef: codeRef
22250
22302
  }));
22251
22303
  });
22252
22304
  CodeSnippet.displayName = 'CodeSnippet';
22305
+ CodeSnippet.defaultProps = {
22306
+ theme: 'black'
22307
+ };
22253
22308
  CodeSnippet.propTypes = {
22254
22309
  code: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
22255
22310
  lang: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
22256
- max_height: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string)
22311
+ max_height: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
22312
+ theme: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['black', 'white']),
22313
+ lineNumbers: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),
22314
+ copyButton: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool)
22257
22315
  };
22258
22316
  var CodeBlockBody = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(_layout__WEBPACK_IMPORTED_MODULE_4__.Flex).attrs({
22259
22317
  align_items: 'flex-start',
@@ -22264,15 +22322,161 @@ var CodeBlockBody = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(_la
22264
22322
  }).withConfig({
22265
22323
  displayName: "CodeBlockBody",
22266
22324
  componentId: "sc-13u859f-0"
22267
- })(["background-color:", ";overflow-y:auto;::-webkit-scrollbar{height:10px;width:10px;}::-webkit-scrollbar-thumb{background-color:", ";border-radius:10px;border:0 solid transparent;background-clip:content-box;}::-webkit-scrollbar-track-piece{background:", ";}position:relative;", ""], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_12, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11_50, '' /* ${CodeBlockCopyBtn} {
22268
- position: sticky;
22269
- top: 0;
22270
- } */);
22325
+ })(["background-color:", ";overflow-y:auto;::-webkit-scrollbar{height:10px;width:10px;}::-webkit-scrollbar-thumb{background-color:", ";border-radius:10px;border:0 solid transparent;background-clip:content-box;}::-webkit-scrollbar-track-piece{background:", ";}position:relative;", ""], function (props) {
22326
+ return _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color[props.$theme == 'white' ? 'gray_2' : 'gray_12'];
22327
+ }, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11, function (props) {
22328
+ return _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color[props.$theme == 'white' ? 'gray_8' : 'gray_11_50'];
22329
+ }, '' /* ${CodeBlockCopyBtn} {
22330
+ position: sticky;
22331
+ top: 0;
22332
+ } */);
22271
22333
 
22272
22334
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CodeSnippet);
22273
22335
 
22274
22336
  /***/ }),
22275
22337
 
22338
+ /***/ "./src/code/copy_button.js":
22339
+ /*!*********************************!*\
22340
+ !*** ./src/code/copy_button.js ***!
22341
+ \*********************************/
22342
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22343
+
22344
+ "use strict";
22345
+ __webpack_require__.r(__webpack_exports__);
22346
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22347
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
22348
+ /* harmony export */ });
22349
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
22350
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
22351
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "styled-components");
22352
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
22353
+ /* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @icons */ "./assets/icons/index.js");
22354
+ /* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
22355
+ /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tooltip */ "./src/tooltip.js");
22356
+ // LICENSE_CODE ZON
22357
+
22358
+
22359
+ /*jslint react:true*/
22360
+ var _tooltips;
22361
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
22362
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
22363
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
22364
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
22365
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
22366
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
22367
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22368
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
22369
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
22370
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
22371
+
22372
+
22373
+
22374
+
22375
+
22376
+ var STATE = {
22377
+ READY: 'READY',
22378
+ SUCCESS: 'SUCCESS',
22379
+ ERROR: 'ERROR'
22380
+ };
22381
+ var tooltips = (_tooltips = {}, _defineProperty(_tooltips, STATE.READY, 'Copy'), _defineProperty(_tooltips, STATE.SUCCESS, 'Copied'), _defineProperty(_tooltips, STATE.ERROR, 'Press Ctrl+C to copy'), _tooltips);
22382
+ var icon = _icons__WEBPACK_IMPORTED_MODULE_2__["default"].Copy;
22383
+ var CopyButton = function CopyButton(props) {
22384
+ var code = props.code,
22385
+ themeProp = props.theme,
22386
+ codeRef = props.codeRef;
22387
+ var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(STATE.READY),
22388
+ _useState2 = _slicedToArray(_useState, 2),
22389
+ state = _useState2[0],
22390
+ setState = _useState2[1];
22391
+ var resetText = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
22392
+ setTimeout(function () {
22393
+ return setState(STATE.READY);
22394
+ }, 1500);
22395
+ }, []);
22396
+ var handleClick = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
22397
+ copyTextToClipboard({
22398
+ getText: function getText() {
22399
+ return code;
22400
+ },
22401
+ success: function success() {
22402
+ setState(STATE.SUCCESS);
22403
+ resetText();
22404
+ },
22405
+ error: function error() {
22406
+ setState(STATE.ERROR);
22407
+ setTimeout(function () {
22408
+ return selectElementText(codeRef.current);
22409
+ }, 1);
22410
+ resetText();
22411
+ }
22412
+ });
22413
+ }, [code]);
22414
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_tooltip__WEBPACK_IMPORTED_MODULE_4__["default"], {
22415
+ tooltip: tooltips[state],
22416
+ placement: "right",
22417
+ noWrap: true
22418
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledButton, {
22419
+ type: "button",
22420
+ onClick: handleClick,
22421
+ $theme: themeProp
22422
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
22423
+ viewBox: icon.viewBox
22424
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("use", {
22425
+ href: "#".concat(icon.id)
22426
+ }))));
22427
+ };
22428
+ var StyledButton = styled_components__WEBPACK_IMPORTED_MODULE_1___default().button.withConfig({
22429
+ displayName: "StyledButton",
22430
+ componentId: "sc-kvxvoe-0"
22431
+ })(["position:absolute;right:16px;display:flex;padding:8px;align-items:flex-start;border:0 none;border-radius:32px;background:", ";svg{width:16px;height:16px;color:", ";}&:hover svg{color:", ";}&:active svg{color:", ";}"], function (props) {
22432
+ return _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color[props.$theme == 'white' ? 'gray_5' : 'gray_11_50'];
22433
+ }, function (props) {
22434
+ return _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color[props.$theme == 'white' ? 'gray_9' : 'gray_8'];
22435
+ }, function (props) {
22436
+ return _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color[props.$theme == 'white' ? 'gray_11_25' : 'gray_1'];
22437
+ }, function (props) {
22438
+ return _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color[props.$theme == 'white' ? 'gray_11_25' : 'gray_1'];
22439
+ });
22440
+ function copyTextToClipboard(copyInfo) {
22441
+ if (navigator.clipboard) {
22442
+ navigator.clipboard.writeText(copyInfo.getText()).then(copyInfo.success, function () {
22443
+ // try the fallback in case `writeText` didn't work
22444
+ fallbackCopyTextToClipboard(copyInfo);
22445
+ });
22446
+ } else fallbackCopyTextToClipboard(copyInfo);
22447
+ }
22448
+ function fallbackCopyTextToClipboard(copyInfo) {
22449
+ // https://stackoverflow.com/a/30810322/7595472
22450
+ var textArea = document.createElement('textarea');
22451
+ textArea.value = copyInfo.getText();
22452
+
22453
+ // Avoid scrolling to bottom
22454
+ textArea.style.top = '0';
22455
+ textArea.style.left = '0';
22456
+ textArea.style.position = 'fixed';
22457
+ document.body.appendChild(textArea);
22458
+ textArea.focus();
22459
+ textArea.select();
22460
+ try {
22461
+ var successful = document.execCommand('copy');
22462
+ setTimeout(function () {
22463
+ if (successful) copyInfo.success();else copyInfo.error();
22464
+ }, 1);
22465
+ } catch (e) {
22466
+ setTimeout(function () {
22467
+ copyInfo.error(e);
22468
+ }, 1);
22469
+ }
22470
+ document.body.removeChild(textArea);
22471
+ }
22472
+ function selectElementText(element) {
22473
+ // https://stackoverflow.com/a/20079910/7595472
22474
+ window.getSelection().selectAllChildren(element);
22475
+ }
22476
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CopyButton);
22477
+
22478
+ /***/ }),
22479
+
22276
22480
  /***/ "./src/code/index.js":
22277
22481
  /*!***************************!*\
22278
22482
  !*** ./src/code/index.js ***!
@@ -25831,45 +26035,107 @@ __webpack_require__.r(__webpack_exports__);
25831
26035
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25832
26036
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
25833
26037
  /* harmony export */ });
25834
- /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "styled-components");
25835
- /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_0__);
25836
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
26038
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
26039
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
26040
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "styled-components");
26041
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
26042
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
25837
26043
  // LICENSE_CODE ZON
25838
26044
 
25839
26045
 
25840
26046
  /*jslint react:true*/
26047
+ var _excluded = ["height", "max_height", "min_height", "width", "max_width", "min_width", "padding", "padding_top", "padding_right", "padding_bottom", "padding_left", "margin", "margin_top", "margin_right", "margin_bottom", "margin_left", "flex", "flex_grow", "flex_shrink", "flex_basis", "justify_self", "align_self", "order", "box_shadow"];
26048
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
26049
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
26050
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
26051
+
25841
26052
 
25842
26053
 
25843
- var Box = styled_components__WEBPACK_IMPORTED_MODULE_0___default().div.withConfig({
25844
- displayName: "Box",
26054
+ var Box = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
26055
+ var height = props.height,
26056
+ max_height = props.max_height,
26057
+ min_height = props.min_height,
26058
+ width = props.width,
26059
+ max_width = props.max_width,
26060
+ min_width = props.min_width,
26061
+ padding = props.padding,
26062
+ padding_top = props.padding_top,
26063
+ padding_right = props.padding_right,
26064
+ padding_bottom = props.padding_bottom,
26065
+ padding_left = props.padding_left,
26066
+ margin = props.margin,
26067
+ margin_top = props.margin_top,
26068
+ margin_right = props.margin_right,
26069
+ margin_bottom = props.margin_bottom,
26070
+ margin_left = props.margin_left,
26071
+ flex = props.flex,
26072
+ flex_grow = props.flex_grow,
26073
+ flex_shrink = props.flex_shrink,
26074
+ flex_basis = props.flex_basis,
26075
+ justify_self = props.justify_self,
26076
+ align_self = props.align_self,
26077
+ order = props.order,
26078
+ box_shadow = props.box_shadow,
26079
+ rest = _objectWithoutProperties(props, _excluded);
26080
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledBox, _extends({
26081
+ ref: ref,
26082
+ $height: height,
26083
+ $maxHeight: max_height,
26084
+ $minHeight: min_height,
26085
+ $width: width,
26086
+ $maxWidth: max_width,
26087
+ $minWidth: min_width,
26088
+ $padding: padding,
26089
+ $padding_top: padding_top,
26090
+ $padding_right: padding_right,
26091
+ $padding_bottom: padding_bottom,
26092
+ $padding_left: padding_left,
26093
+ $margin: margin,
26094
+ $margin_top: margin_top,
26095
+ $margin_right: margin_right,
26096
+ $margin_bottom: margin_bottom,
26097
+ $margin_left: margin_left,
26098
+ $flex: flex,
26099
+ $flexGrow: flex_grow,
26100
+ $flexShrink: flex_shrink,
26101
+ $flexBasis: flex_basis,
26102
+ $justifySelf: justify_self,
26103
+ $alignSelf: align_self,
26104
+ $order: order,
26105
+ $box_shadow: box_shadow
26106
+ }, rest));
26107
+ });
26108
+ Box.displayName = 'Box';
26109
+ var StyledBox = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
26110
+ displayName: "StyledBox",
25845
26111
  componentId: "sc-pxszp5-0"
25846
26112
  })(["height:", ";max-height:", ";min-height:", ";width:", ";max-width:", ";min-width:", ";padding:", ";padding-top:", ";padding-right:", ";padding-bottom:", ";padding-left:", ";margin:", ";margin-top:", ";margin-right:", ";margin-bottom:", ";margin-left:", ";flex:", ";flex-grow:", ";flex-shrink:", ";flex-basis:", ";justify-self:", ";align-self:", ";order:", ";box-shadow:", ";"], function (props) {
25847
- return props.height;
26113
+ return props.$height;
25848
26114
  }, function (props) {
25849
- return props.max_height;
26115
+ return props.$maxHeight;
25850
26116
  }, function (props) {
25851
- return props.min_height;
26117
+ return props.$minHeight;
25852
26118
  }, function (props) {
25853
- return props.width;
26119
+ return props.$width;
25854
26120
  }, function (props) {
25855
- return props.max_width;
26121
+ return props.$maxWidth;
25856
26122
  }, function (props) {
25857
- return props.min_width;
25858
- }, (0,_utils__WEBPACK_IMPORTED_MODULE_1__.fromTheme)('padding'), (0,_utils__WEBPACK_IMPORTED_MODULE_1__.fromTheme)('padding_top'), (0,_utils__WEBPACK_IMPORTED_MODULE_1__.fromTheme)('padding_right'), (0,_utils__WEBPACK_IMPORTED_MODULE_1__.fromTheme)('padding_bottom'), (0,_utils__WEBPACK_IMPORTED_MODULE_1__.fromTheme)('padding_left'), (0,_utils__WEBPACK_IMPORTED_MODULE_1__.fromTheme)('margin'), (0,_utils__WEBPACK_IMPORTED_MODULE_1__.fromTheme)('margin_top'), (0,_utils__WEBPACK_IMPORTED_MODULE_1__.fromTheme)('margin_right'), (0,_utils__WEBPACK_IMPORTED_MODULE_1__.fromTheme)('margin_bottom'), (0,_utils__WEBPACK_IMPORTED_MODULE_1__.fromTheme)('margin_left'), function (props) {
25859
- return props.flex;
26123
+ return props.$minWidth;
26124
+ }, (0,_utils__WEBPACK_IMPORTED_MODULE_2__.fromTheme)('padding'), (0,_utils__WEBPACK_IMPORTED_MODULE_2__.fromTheme)('padding_top'), (0,_utils__WEBPACK_IMPORTED_MODULE_2__.fromTheme)('padding_right'), (0,_utils__WEBPACK_IMPORTED_MODULE_2__.fromTheme)('padding_bottom'), (0,_utils__WEBPACK_IMPORTED_MODULE_2__.fromTheme)('padding_left'), (0,_utils__WEBPACK_IMPORTED_MODULE_2__.fromTheme)('margin'), (0,_utils__WEBPACK_IMPORTED_MODULE_2__.fromTheme)('margin_top'), (0,_utils__WEBPACK_IMPORTED_MODULE_2__.fromTheme)('margin_right'), (0,_utils__WEBPACK_IMPORTED_MODULE_2__.fromTheme)('margin_bottom'), (0,_utils__WEBPACK_IMPORTED_MODULE_2__.fromTheme)('margin_left'), function (props) {
26125
+ return props.$flex;
25860
26126
  }, function (props) {
25861
- return props.flex_grow;
26127
+ return props.$flexGrow;
25862
26128
  }, function (props) {
25863
- return props.flex_shrink;
26129
+ return props.$flexShrink;
25864
26130
  }, function (props) {
25865
- return props.flex_basis;
26131
+ return props.$flexBasis;
25866
26132
  }, function (props) {
25867
- return props.justify_self;
26133
+ return props.$justifySelf;
25868
26134
  }, function (props) {
25869
- return props.align_self;
26135
+ return props.$alignSelf;
25870
26136
  }, function (props) {
25871
- return props.order;
25872
- }, (0,_utils__WEBPACK_IMPORTED_MODULE_1__.fromTheme)('box_shadow'));
26137
+ return props.$order;
26138
+ }, (0,_utils__WEBPACK_IMPORTED_MODULE_2__.fromTheme)('box_shadow'));
25873
26139
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Box);
25874
26140
 
25875
26141
  /***/ }),
@@ -25896,34 +26162,41 @@ __webpack_require__.r(__webpack_exports__);
25896
26162
 
25897
26163
 
25898
26164
  /*jslint react:true*/
26165
+ var _excluded = ["inline", "align_items", "align_content", "justify_items", "justify_content", "flex_wrap", "flex_direction", "gap", "row_gap", "column_gap"];
26166
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
26167
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
26168
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
25899
26169
 
25900
26170
 
25901
26171
 
25902
26172
 
25903
- var Flex = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(_box__WEBPACK_IMPORTED_MODULE_3__["default"]).withConfig({
25904
- displayName: "Flex",
25905
- componentId: "sc-2aqm31-0"
25906
- })(["display:", ";align-items:", ";align-content:", ";justify-items:", ";justify-content:", ";flex-wrap:", ";flex-direction:", ";gap:", ";row-gap:", ";column-gap:", ";"], function (props) {
25907
- return props.inline ? 'inline-flex' : 'flex';
25908
- }, function (props) {
25909
- return props.align_items;
25910
- }, function (props) {
25911
- return props.align_content;
25912
- }, function (props) {
25913
- return props.justify_items;
25914
- }, function (props) {
25915
- return props.justify_content;
25916
- }, function (props) {
25917
- return props.flex_wrap;
25918
- }, function (props) {
25919
- return props.flex_direction;
25920
- }, function (props) {
25921
- return props.gap;
25922
- }, function (props) {
25923
- return props.row_gap;
25924
- }, function (props) {
25925
- return props.column_gap;
26173
+ var Flex = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
26174
+ var inline = props.inline,
26175
+ align_items = props.align_items,
26176
+ align_content = props.align_content,
26177
+ justify_items = props.justify_items,
26178
+ justify_content = props.justify_content,
26179
+ flex_wrap = props.flex_wrap,
26180
+ flex_direction = props.flex_direction,
26181
+ gap = props.gap,
26182
+ row_gap = props.row_gap,
26183
+ column_gap = props.column_gap,
26184
+ rest = _objectWithoutProperties(props, _excluded);
26185
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledFlex, _extends({
26186
+ ref: ref,
26187
+ $inline: inline,
26188
+ $alignItems: align_items,
26189
+ $alignContent: align_content,
26190
+ $justifyItems: justify_items,
26191
+ $justifyContent: justify_content,
26192
+ $flexWrap: flex_wrap,
26193
+ $flexDirection: flex_direction,
26194
+ $gap: gap,
26195
+ $rowGap: row_gap,
26196
+ $columnGap: column_gap
26197
+ }, rest));
25926
26198
  });
26199
+ Flex.displayName = 'Flex';
25927
26200
  Flex.defaultProps = {
25928
26201
  flex_direction: 'row'
25929
26202
  };
@@ -25939,6 +26212,30 @@ Flex.propTypes = {
25939
26212
  row_gap: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
25940
26213
  column_gap: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string)
25941
26214
  };
26215
+ var StyledFlex = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(_box__WEBPACK_IMPORTED_MODULE_3__["default"]).withConfig({
26216
+ displayName: "StyledFlex",
26217
+ componentId: "sc-2aqm31-0"
26218
+ })(["display:", ";align-items:", ";align-content:", ";justify-items:", ";justify-content:", ";flex-wrap:", ";flex-direction:", ";gap:", ";row-gap:", ";column-gap:", ";"], function (props) {
26219
+ return props.$inline ? 'inline-flex' : 'flex';
26220
+ }, function (props) {
26221
+ return props.$alignItems;
26222
+ }, function (props) {
26223
+ return props.$alignContent;
26224
+ }, function (props) {
26225
+ return props.$justifyItems;
26226
+ }, function (props) {
26227
+ return props.$justifyContent;
26228
+ }, function (props) {
26229
+ return props.$flexWrap;
26230
+ }, function (props) {
26231
+ return props.$flexDirection;
26232
+ }, function (props) {
26233
+ return props.$gap;
26234
+ }, function (props) {
26235
+ return props.$rowGap;
26236
+ }, function (props) {
26237
+ return props.$columnGap;
26238
+ });
25942
26239
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Flex);
25943
26240
 
25944
26241
  /***/ }),
@@ -27196,7 +27493,8 @@ __webpack_require__.r(__webpack_exports__);
27196
27493
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
27197
27494
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
27198
27495
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
27199
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
27496
+ /* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
27497
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
27200
27498
  // LICENSE_CODE ZON
27201
27499
 
27202
27500
 
@@ -27209,6 +27507,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
27209
27507
 
27210
27508
 
27211
27509
 
27510
+
27212
27511
  var Group = function Group(props) {
27213
27512
  var children = props.children,
27214
27513
  className = props.className,
@@ -27247,7 +27546,7 @@ var Group = function Group(props) {
27247
27546
  $variant: variant,
27248
27547
  "aria-orientation": variant == 'vertical' ? 'vertical' : 'horizontal',
27249
27548
  onKeyDown: handleKeyDown
27250
- }, (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getCommonProps)(rest)), react__WEBPACK_IMPORTED_MODULE_1__.Children.map(children, function (child) {
27549
+ }, (0,_utils__WEBPACK_IMPORTED_MODULE_4__.getCommonProps)(rest)), react__WEBPACK_IMPORTED_MODULE_1__.Children.map(children, function (child) {
27251
27550
  return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.cloneElement)(child, {
27252
27551
  variant: variant
27253
27552
  });
@@ -27262,15 +27561,18 @@ Group.propTypes = {
27262
27561
  var GroupContainer = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
27263
27562
  displayName: "GroupContainer",
27264
27563
  componentId: "sc-x363t3-0"
27265
- })(["display:flex;justify-content:center;align-items:center;box-sizing:border-box;", ""], function (props) {
27564
+ })(["display:flex;justify-content:flex-start;align-items:center;box-sizing:border-box;width:fit-content;", ""], function (props) {
27565
+ if (props.$variant == 'underline') {
27566
+ return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["flex-direction:row;"]);
27567
+ }
27266
27568
  if (props.$variant == 'contain') {
27267
- return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["flex-direction:row;width:fit-content;padding:2px;gap:2px;"]);
27569
+ return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["flex-direction:row;padding:2px;gap:2px;border-radius:4px;background:", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_3);
27268
27570
  }
27269
27571
  if (props.$variant == 'vertical') {
27270
- return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["flex-direction:column;width:fit-content;"]);
27572
+ return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["flex-direction:column;"]);
27271
27573
  }
27272
27574
  // main
27273
- return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["flex-direction:row;width:fit-content;gap:24px;"]);
27575
+ return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["flex-direction:row;gap:24px;"]);
27274
27576
  });
27275
27577
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Group);
27276
27578
 
@@ -51851,6 +52153,268 @@ Prism.languages.vbnet = Prism.languages.extend('basic', {
51851
52153
  });
51852
52154
 
51853
52155
 
52156
+ /***/ }),
52157
+
52158
+ /***/ "./node_modules/prismjs/plugins/line-numbers/prism-line-numbers.js":
52159
+ /*!*************************************************************************!*\
52160
+ !*** ./node_modules/prismjs/plugins/line-numbers/prism-line-numbers.js ***!
52161
+ \*************************************************************************/
52162
+ /***/ (() => {
52163
+
52164
+ (function () {
52165
+
52166
+ if (typeof Prism === 'undefined' || typeof document === 'undefined') {
52167
+ return;
52168
+ }
52169
+
52170
+ /**
52171
+ * Plugin name which is used as a class name for <pre> which is activating the plugin
52172
+ *
52173
+ * @type {string}
52174
+ */
52175
+ var PLUGIN_NAME = 'line-numbers';
52176
+
52177
+ /**
52178
+ * Regular expression used for determining line breaks
52179
+ *
52180
+ * @type {RegExp}
52181
+ */
52182
+ var NEW_LINE_EXP = /\n(?!$)/g;
52183
+
52184
+
52185
+ /**
52186
+ * Global exports
52187
+ */
52188
+ var config = Prism.plugins.lineNumbers = {
52189
+ /**
52190
+ * Get node for provided line number
52191
+ *
52192
+ * @param {Element} element pre element
52193
+ * @param {number} number line number
52194
+ * @returns {Element|undefined}
52195
+ */
52196
+ getLine: function (element, number) {
52197
+ if (element.tagName !== 'PRE' || !element.classList.contains(PLUGIN_NAME)) {
52198
+ return;
52199
+ }
52200
+
52201
+ var lineNumberRows = element.querySelector('.line-numbers-rows');
52202
+ if (!lineNumberRows) {
52203
+ return;
52204
+ }
52205
+ var lineNumberStart = parseInt(element.getAttribute('data-start'), 10) || 1;
52206
+ var lineNumberEnd = lineNumberStart + (lineNumberRows.children.length - 1);
52207
+
52208
+ if (number < lineNumberStart) {
52209
+ number = lineNumberStart;
52210
+ }
52211
+ if (number > lineNumberEnd) {
52212
+ number = lineNumberEnd;
52213
+ }
52214
+
52215
+ var lineIndex = number - lineNumberStart;
52216
+
52217
+ return lineNumberRows.children[lineIndex];
52218
+ },
52219
+
52220
+ /**
52221
+ * Resizes the line numbers of the given element.
52222
+ *
52223
+ * This function will not add line numbers. It will only resize existing ones.
52224
+ *
52225
+ * @param {HTMLElement} element A `<pre>` element with line numbers.
52226
+ * @returns {void}
52227
+ */
52228
+ resize: function (element) {
52229
+ resizeElements([element]);
52230
+ },
52231
+
52232
+ /**
52233
+ * Whether the plugin can assume that the units font sizes and margins are not depended on the size of
52234
+ * the current viewport.
52235
+ *
52236
+ * Setting this to `true` will allow the plugin to do certain optimizations for better performance.
52237
+ *
52238
+ * Set this to `false` if you use any of the following CSS units: `vh`, `vw`, `vmin`, `vmax`.
52239
+ *
52240
+ * @type {boolean}
52241
+ */
52242
+ assumeViewportIndependence: true
52243
+ };
52244
+
52245
+ /**
52246
+ * Resizes the given elements.
52247
+ *
52248
+ * @param {HTMLElement[]} elements
52249
+ */
52250
+ function resizeElements(elements) {
52251
+ elements = elements.filter(function (e) {
52252
+ var codeStyles = getStyles(e);
52253
+ var whiteSpace = codeStyles['white-space'];
52254
+ return whiteSpace === 'pre-wrap' || whiteSpace === 'pre-line';
52255
+ });
52256
+
52257
+ if (elements.length == 0) {
52258
+ return;
52259
+ }
52260
+
52261
+ var infos = elements.map(function (element) {
52262
+ var codeElement = element.querySelector('code');
52263
+ var lineNumbersWrapper = element.querySelector('.line-numbers-rows');
52264
+ if (!codeElement || !lineNumbersWrapper) {
52265
+ return undefined;
52266
+ }
52267
+
52268
+ /** @type {HTMLElement} */
52269
+ var lineNumberSizer = element.querySelector('.line-numbers-sizer');
52270
+ var codeLines = codeElement.textContent.split(NEW_LINE_EXP);
52271
+
52272
+ if (!lineNumberSizer) {
52273
+ lineNumberSizer = document.createElement('span');
52274
+ lineNumberSizer.className = 'line-numbers-sizer';
52275
+
52276
+ codeElement.appendChild(lineNumberSizer);
52277
+ }
52278
+
52279
+ lineNumberSizer.innerHTML = '0';
52280
+ lineNumberSizer.style.display = 'block';
52281
+
52282
+ var oneLinerHeight = lineNumberSizer.getBoundingClientRect().height;
52283
+ lineNumberSizer.innerHTML = '';
52284
+
52285
+ return {
52286
+ element: element,
52287
+ lines: codeLines,
52288
+ lineHeights: [],
52289
+ oneLinerHeight: oneLinerHeight,
52290
+ sizer: lineNumberSizer,
52291
+ };
52292
+ }).filter(Boolean);
52293
+
52294
+ infos.forEach(function (info) {
52295
+ var lineNumberSizer = info.sizer;
52296
+ var lines = info.lines;
52297
+ var lineHeights = info.lineHeights;
52298
+ var oneLinerHeight = info.oneLinerHeight;
52299
+
52300
+ lineHeights[lines.length - 1] = undefined;
52301
+ lines.forEach(function (line, index) {
52302
+ if (line && line.length > 1) {
52303
+ var e = lineNumberSizer.appendChild(document.createElement('span'));
52304
+ e.style.display = 'block';
52305
+ e.textContent = line;
52306
+ } else {
52307
+ lineHeights[index] = oneLinerHeight;
52308
+ }
52309
+ });
52310
+ });
52311
+
52312
+ infos.forEach(function (info) {
52313
+ var lineNumberSizer = info.sizer;
52314
+ var lineHeights = info.lineHeights;
52315
+
52316
+ var childIndex = 0;
52317
+ for (var i = 0; i < lineHeights.length; i++) {
52318
+ if (lineHeights[i] === undefined) {
52319
+ lineHeights[i] = lineNumberSizer.children[childIndex++].getBoundingClientRect().height;
52320
+ }
52321
+ }
52322
+ });
52323
+
52324
+ infos.forEach(function (info) {
52325
+ var lineNumberSizer = info.sizer;
52326
+ var wrapper = info.element.querySelector('.line-numbers-rows');
52327
+
52328
+ lineNumberSizer.style.display = 'none';
52329
+ lineNumberSizer.innerHTML = '';
52330
+
52331
+ info.lineHeights.forEach(function (height, lineNumber) {
52332
+ wrapper.children[lineNumber].style.height = height + 'px';
52333
+ });
52334
+ });
52335
+ }
52336
+
52337
+ /**
52338
+ * Returns style declarations for the element
52339
+ *
52340
+ * @param {Element} element
52341
+ */
52342
+ function getStyles(element) {
52343
+ if (!element) {
52344
+ return null;
52345
+ }
52346
+
52347
+ return window.getComputedStyle ? getComputedStyle(element) : (element.currentStyle || null);
52348
+ }
52349
+
52350
+ var lastWidth = undefined;
52351
+ window.addEventListener('resize', function () {
52352
+ if (config.assumeViewportIndependence && lastWidth === window.innerWidth) {
52353
+ return;
52354
+ }
52355
+ lastWidth = window.innerWidth;
52356
+
52357
+ resizeElements(Array.prototype.slice.call(document.querySelectorAll('pre.' + PLUGIN_NAME)));
52358
+ });
52359
+
52360
+ Prism.hooks.add('complete', function (env) {
52361
+ if (!env.code) {
52362
+ return;
52363
+ }
52364
+
52365
+ var code = /** @type {Element} */ (env.element);
52366
+ var pre = /** @type {HTMLElement} */ (code.parentNode);
52367
+
52368
+ // works only for <code> wrapped inside <pre> (not inline)
52369
+ if (!pre || !/pre/i.test(pre.nodeName)) {
52370
+ return;
52371
+ }
52372
+
52373
+ // Abort if line numbers already exists
52374
+ if (code.querySelector('.line-numbers-rows')) {
52375
+ return;
52376
+ }
52377
+
52378
+ // only add line numbers if <code> or one of its ancestors has the `line-numbers` class
52379
+ if (!Prism.util.isActive(code, PLUGIN_NAME)) {
52380
+ return;
52381
+ }
52382
+
52383
+ // Remove the class 'line-numbers' from the <code>
52384
+ code.classList.remove(PLUGIN_NAME);
52385
+ // Add the class 'line-numbers' to the <pre>
52386
+ pre.classList.add(PLUGIN_NAME);
52387
+
52388
+ var match = env.code.match(NEW_LINE_EXP);
52389
+ var linesNum = match ? match.length + 1 : 1;
52390
+ var lineNumbersWrapper;
52391
+
52392
+ var lines = new Array(linesNum + 1).join('<span></span>');
52393
+
52394
+ lineNumbersWrapper = document.createElement('span');
52395
+ lineNumbersWrapper.setAttribute('aria-hidden', 'true');
52396
+ lineNumbersWrapper.className = 'line-numbers-rows';
52397
+ lineNumbersWrapper.innerHTML = lines;
52398
+
52399
+ if (pre.hasAttribute('data-start')) {
52400
+ pre.style.counterReset = 'linenumber ' + (parseInt(pre.getAttribute('data-start'), 10) - 1);
52401
+ }
52402
+
52403
+ env.element.appendChild(lineNumbersWrapper);
52404
+
52405
+ resizeElements([pre]);
52406
+
52407
+ Prism.hooks.run('line-numbers', env);
52408
+ });
52409
+
52410
+ Prism.hooks.add('line-numbers', function (env) {
52411
+ env.plugins = env.plugins || {};
52412
+ env.plugins.lineNumbers = true;
52413
+ });
52414
+
52415
+ }());
52416
+
52417
+
51854
52418
  /***/ }),
51855
52419
 
51856
52420
  /***/ "./node_modules/react-day-picker/dist/index.esm.js":