@mui/internal-docs-infra 0.1.1-alpha.9 → 0.1.1-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/esm/package.json +1 -0
- package/esm/useCopier/index.d.ts +15 -0
- package/esm/useCopier/index.d.ts.map +1 -0
- package/esm/useCopier/index.js +62 -0
- package/esm/useDemo/index.d.ts +51 -0
- package/esm/useDemo/index.d.ts.map +1 -0
- package/esm/useDemo/index.js +104 -0
- package/package.json +31 -32
- package/useCopier/index.d.ts +1 -1
- package/useCopier/index.js +23 -15
- package/useDemo/index.d.ts +51 -6
- package/useDemo/index.js +112 -6
- package/CodeControllerContext/CodeControllerContext.d.ts +0 -22
- package/CodeControllerContext/CodeControllerContext.d.ts.map +0 -1
- package/CodeControllerContext/CodeControllerContext.js +0 -14
- package/CodeControllerContext/index.d.ts +0 -1
- package/CodeControllerContext/index.d.ts.map +0 -1
- package/CodeControllerContext/index.js +0 -1
- package/CodeExternalsContext/CodeExternalsContext.d.ts +0 -8
- package/CodeExternalsContext/CodeExternalsContext.d.ts.map +0 -1
- package/CodeExternalsContext/CodeExternalsContext.js +0 -7
- package/CodeExternalsContext/index.d.ts +0 -1
- package/CodeExternalsContext/index.d.ts.map +0 -1
- package/CodeExternalsContext/index.js +0 -1
- package/CodeHighlighter/CodeHighlighter.d.ts +0 -2
- package/CodeHighlighter/CodeHighlighter.d.ts.map +0 -1
- package/CodeHighlighter/CodeHighlighter.js +0 -470
- package/CodeHighlighter/CodeHighlighterClient.d.ts +0 -2
- package/CodeHighlighter/CodeHighlighterClient.d.ts.map +0 -1
- package/CodeHighlighter/CodeHighlighterClient.js +0 -837
- package/CodeHighlighter/CodeHighlighterContext.d.ts +0 -16
- package/CodeHighlighter/CodeHighlighterContext.d.ts.map +0 -1
- package/CodeHighlighter/CodeHighlighterContext.js +0 -14
- package/CodeHighlighter/CodeHighlighterFallbackContext.d.ts +0 -7
- package/CodeHighlighter/CodeHighlighterFallbackContext.d.ts.map +0 -1
- package/CodeHighlighter/CodeHighlighterFallbackContext.js +0 -13
- package/CodeHighlighter/applyTransform.d.ts +0 -19
- package/CodeHighlighter/applyTransform.d.ts.map +0 -1
- package/CodeHighlighter/applyTransform.js +0 -75
- package/CodeHighlighter/codeToFallbackProps.d.ts +0 -2
- package/CodeHighlighter/codeToFallbackProps.d.ts.map +0 -1
- package/CodeHighlighter/codeToFallbackProps.js +0 -73
- package/CodeHighlighter/errors.d.ts +0 -0
- package/CodeHighlighter/errors.d.ts.map +0 -1
- package/CodeHighlighter/errors.js +0 -1
- package/CodeHighlighter/hasAllVariants.d.ts +0 -2
- package/CodeHighlighter/hasAllVariants.d.ts.map +0 -1
- package/CodeHighlighter/hasAllVariants.js +0 -31
- package/CodeHighlighter/index.d.ts +0 -4
- package/CodeHighlighter/index.d.ts.map +0 -1
- package/CodeHighlighter/index.js +0 -4
- package/CodeHighlighter/loadFallbackCode.d.ts +0 -10
- package/CodeHighlighter/loadFallbackCode.d.ts.map +0 -1
- package/CodeHighlighter/loadFallbackCode.js +0 -632
- package/CodeHighlighter/loadVariant.d.ts +0 -12
- package/CodeHighlighter/loadVariant.d.ts.map +0 -1
- package/CodeHighlighter/loadVariant.js +0 -1083
- package/CodeHighlighter/maybeInitialData.d.ts +0 -10
- package/CodeHighlighter/maybeInitialData.d.ts.map +0 -1
- package/CodeHighlighter/maybeInitialData.js +0 -94
- package/CodeHighlighter/parseCode.d.ts +0 -6
- package/CodeHighlighter/parseCode.d.ts.map +0 -1
- package/CodeHighlighter/parseCode.js +0 -134
- package/CodeHighlighter/parseControlledCode.d.ts +0 -6
- package/CodeHighlighter/parseControlledCode.d.ts.map +0 -1
- package/CodeHighlighter/parseControlledCode.js +0 -87
- package/CodeHighlighter/transformCode.d.ts +0 -21
- package/CodeHighlighter/transformCode.d.ts.map +0 -1
- package/CodeHighlighter/transformCode.js +0 -263
- package/CodeHighlighter/transformParsedSource.d.ts +0 -3
- package/CodeHighlighter/transformParsedSource.d.ts.map +0 -1
- package/CodeHighlighter/transformParsedSource.js +0 -66
- package/CodeHighlighter/transformSource.d.ts +0 -2
- package/CodeHighlighter/transformSource.d.ts.map +0 -1
- package/CodeHighlighter/transformSource.js +0 -107
- package/CodeHighlighter/types.d.ts +0 -160
- package/CodeHighlighter/types.d.ts.map +0 -1
- package/CodeHighlighter/types.js +0 -1
- package/CodeProvider/CodeContext.d.ts +0 -12
- package/CodeProvider/CodeContext.d.ts.map +0 -1
- package/CodeProvider/CodeContext.js +0 -8
- package/CodeProvider/CodeProvider.d.ts +0 -13
- package/CodeProvider/CodeProvider.d.ts.map +0 -1
- package/CodeProvider/CodeProvider.js +0 -65
- package/CodeProvider/index.d.ts +0 -1
- package/CodeProvider/index.d.ts.map +0 -1
- package/CodeProvider/index.js +0 -1
- package/abstractCreateDemo/abstractCreateDemo.d.ts +0 -35
- package/abstractCreateDemo/abstractCreateDemo.d.ts.map +0 -1
- package/abstractCreateDemo/abstractCreateDemo.js +0 -91
- package/abstractCreateDemo/index.d.ts +0 -1
- package/abstractCreateDemo/index.d.ts.map +0 -1
- package/abstractCreateDemo/index.js +0 -1
- package/createDemoData/createDemoData.d.ts +0 -44
- package/createDemoData/createDemoData.d.ts.map +0 -1
- package/createDemoData/createDemoData.js +0 -75
- package/createDemoData/index.d.ts +0 -1
- package/createDemoData/index.d.ts.map +0 -1
- package/createDemoData/index.js +0 -1
- package/createDemoData/types.d.ts +0 -28
- package/createDemoData/types.d.ts.map +0 -1
- package/createDemoData/types.js +0 -1
- package/pipeline/hastUtils/hastUtils.d.ts +0 -11
- package/pipeline/hastUtils/hastUtils.d.ts.map +0 -1
- package/pipeline/hastUtils/hastUtils.js +0 -67
- package/pipeline/hastUtils/index.d.ts +0 -1
- package/pipeline/hastUtils/index.d.ts.map +0 -1
- package/pipeline/hastUtils/index.js +0 -1
- package/pipeline/loadPrecomputedCodeHighlighter/emitExternalsProvider.d.ts +0 -54
- package/pipeline/loadPrecomputedCodeHighlighter/emitExternalsProvider.d.ts.map +0 -1
- package/pipeline/loadPrecomputedCodeHighlighter/emitExternalsProvider.js +0 -465
- package/pipeline/loadPrecomputedCodeHighlighter/generateExternalsProvider.d.ts +0 -15
- package/pipeline/loadPrecomputedCodeHighlighter/generateExternalsProvider.d.ts.map +0 -1
- package/pipeline/loadPrecomputedCodeHighlighter/generateExternalsProvider.js +0 -253
- package/pipeline/loadPrecomputedCodeHighlighter/index.d.ts +0 -2
- package/pipeline/loadPrecomputedCodeHighlighter/index.d.ts.map +0 -1
- package/pipeline/loadPrecomputedCodeHighlighter/index.js +0 -4
- package/pipeline/loadPrecomputedCodeHighlighter/loadPrecomputedCodeHighlighter.d.ts +0 -20
- package/pipeline/loadPrecomputedCodeHighlighter/loadPrecomputedCodeHighlighter.d.ts.map +0 -1
- package/pipeline/loadPrecomputedCodeHighlighter/loadPrecomputedCodeHighlighter.js +0 -224
- package/pipeline/loadPrecomputedCodeHighlighter/parseCreateFactoryCall.d.ts +0 -31
- package/pipeline/loadPrecomputedCodeHighlighter/parseCreateFactoryCall.d.ts.map +0 -1
- package/pipeline/loadPrecomputedCodeHighlighter/parseCreateFactoryCall.js +0 -433
- package/pipeline/loadPrecomputedCodeHighlighter/parseFunctionParameters.d.ts +0 -19
- package/pipeline/loadPrecomputedCodeHighlighter/parseFunctionParameters.d.ts.map +0 -1
- package/pipeline/loadPrecomputedCodeHighlighter/parseFunctionParameters.js +0 -168
- package/pipeline/loadPrecomputedCodeHighlighter/replacePrecomputeValue.d.ts +0 -25
- package/pipeline/loadPrecomputedCodeHighlighter/replacePrecomputeValue.d.ts.map +0 -1
- package/pipeline/loadPrecomputedCodeHighlighter/replacePrecomputeValue.js +0 -73
- package/pipeline/loadServerCodeMeta/index.d.ts +0 -1
- package/pipeline/loadServerCodeMeta/index.d.ts.map +0 -1
- package/pipeline/loadServerCodeMeta/index.js +0 -1
- package/pipeline/loadServerCodeMeta/loadServerCodeMeta.d.ts +0 -24
- package/pipeline/loadServerCodeMeta/loadServerCodeMeta.d.ts.map +0 -1
- package/pipeline/loadServerCodeMeta/loadServerCodeMeta.js +0 -92
- package/pipeline/loadServerSource/index.d.ts +0 -1
- package/pipeline/loadServerSource/index.d.ts.map +0 -1
- package/pipeline/loadServerSource/index.js +0 -1
- package/pipeline/loadServerSource/loadServerSource.d.ts +0 -25
- package/pipeline/loadServerSource/loadServerSource.d.ts.map +0 -1
- package/pipeline/loadServerSource/loadServerSource.js +0 -135
- package/pipeline/loaderUtils/externalsToPackages.d.ts +0 -1
- package/pipeline/loaderUtils/externalsToPackages.d.ts.map +0 -1
- package/pipeline/loaderUtils/externalsToPackages.js +0 -46
- package/pipeline/loaderUtils/extractNameAndSlugFromUrl.d.ts +0 -34
- package/pipeline/loaderUtils/extractNameAndSlugFromUrl.d.ts.map +0 -1
- package/pipeline/loaderUtils/extractNameAndSlugFromUrl.js +0 -161
- package/pipeline/loaderUtils/getFileNameFromUrl.d.ts +0 -11
- package/pipeline/loaderUtils/getFileNameFromUrl.d.ts.map +0 -1
- package/pipeline/loaderUtils/getFileNameFromUrl.js +0 -32
- package/pipeline/loaderUtils/index.d.ts +0 -7
- package/pipeline/loaderUtils/index.d.ts.map +0 -1
- package/pipeline/loaderUtils/index.js +0 -7
- package/pipeline/loaderUtils/mergeExternals.d.ts +0 -32
- package/pipeline/loaderUtils/mergeExternals.d.ts.map +0 -1
- package/pipeline/loaderUtils/mergeExternals.js +0 -72
- package/pipeline/loaderUtils/parseImports.d.ts +0 -20
- package/pipeline/loaderUtils/parseImports.d.ts.map +0 -1
- package/pipeline/loaderUtils/parseImports.js +0 -307
- package/pipeline/loaderUtils/processRelativeImports.d.ts +0 -19
- package/pipeline/loaderUtils/processRelativeImports.d.ts.map +0 -1
- package/pipeline/loaderUtils/processRelativeImports.js +0 -329
- package/pipeline/loaderUtils/resolveModulePath.d.ts +0 -87
- package/pipeline/loaderUtils/resolveModulePath.d.ts.map +0 -1
- package/pipeline/loaderUtils/resolveModulePath.js +0 -1449
- package/pipeline/loaderUtils/resolveModulePathWithFs.d.ts +0 -47
- package/pipeline/loaderUtils/resolveModulePathWithFs.d.ts.map +0 -1
- package/pipeline/loaderUtils/resolveModulePathWithFs.js +0 -163
- package/pipeline/loaderUtils/rewriteImports.d.ts +0 -9
- package/pipeline/loaderUtils/rewriteImports.d.ts.map +0 -1
- package/pipeline/loaderUtils/rewriteImports.js +0 -35
- package/pipeline/parseSource/grammars.d.ts +0 -2
- package/pipeline/parseSource/grammars.d.ts.map +0 -1
- package/pipeline/parseSource/grammars.js +0 -27
- package/pipeline/parseSource/index.d.ts +0 -1
- package/pipeline/parseSource/index.d.ts.map +0 -1
- package/pipeline/parseSource/index.js +0 -1
- package/pipeline/parseSource/parseSource.d.ts +0 -3
- package/pipeline/parseSource/parseSource.d.ts.map +0 -1
- package/pipeline/parseSource/parseSource.js +0 -47
- package/pipeline/transformHtmlCode/index.d.ts +0 -2
- package/pipeline/transformHtmlCode/index.d.ts.map +0 -1
- package/pipeline/transformHtmlCode/index.js +0 -4
- package/pipeline/transformHtmlCode/transformHtmlCode.d.ts +0 -13
- package/pipeline/transformHtmlCode/transformHtmlCode.d.ts.map +0 -1
- package/pipeline/transformHtmlCode/transformHtmlCode.js +0 -303
- package/pipeline/transformMarkdownCode/index.d.ts +0 -2
- package/pipeline/transformMarkdownCode/index.d.ts.map +0 -1
- package/pipeline/transformMarkdownCode/index.js +0 -4
- package/pipeline/transformMarkdownCode/transformMarkdownCode.d.ts +0 -2
- package/pipeline/transformMarkdownCode/transformMarkdownCode.d.ts.map +0 -1
- package/pipeline/transformMarkdownCode/transformMarkdownCode.js +0 -514
- package/pipeline/transformTypescriptToJavascript/index.d.ts +0 -1
- package/pipeline/transformTypescriptToJavascript/index.d.ts.map +0 -1
- package/pipeline/transformTypescriptToJavascript/index.js +0 -1
- package/pipeline/transformTypescriptToJavascript/removeTypes.d.ts +0 -13
- package/pipeline/transformTypescriptToJavascript/removeTypes.d.ts.map +0 -1
- package/pipeline/transformTypescriptToJavascript/removeTypes.js +0 -134
- package/pipeline/transformTypescriptToJavascript/transformTypescriptToJavascript.d.ts +0 -3
- package/pipeline/transformTypescriptToJavascript/transformTypescriptToJavascript.d.ts.map +0 -1
- package/pipeline/transformTypescriptToJavascript/transformTypescriptToJavascript.js +0 -34
- package/useCode/index.d.ts +0 -1
- package/useCode/index.d.ts.map +0 -1
- package/useCode/index.js +0 -1
- package/useCode/useCode.d.ts +0 -39
- package/useCode/useCode.d.ts.map +0 -1
- package/useCode/useCode.js +0 -122
- package/useCode/useCodeUtils.d.ts +0 -45
- package/useCode/useCodeUtils.d.ts.map +0 -1
- package/useCode/useCodeUtils.js +0 -240
- package/useCode/useCopyFunctionality.d.ts +0 -17
- package/useCode/useCopyFunctionality.d.ts.map +0 -1
- package/useCode/useCopyFunctionality.js +0 -28
- package/useCode/useFileNavigation.d.ts +0 -48
- package/useCode/useFileNavigation.d.ts.map +0 -1
- package/useCode/useFileNavigation.js +0 -370
- package/useCode/useSourceEditing.d.ts +0 -19
- package/useCode/useSourceEditing.d.ts.map +0 -1
- package/useCode/useSourceEditing.js +0 -32
- package/useCode/useTransformManagement.d.ts +0 -28
- package/useCode/useTransformManagement.d.ts.map +0 -1
- package/useCode/useTransformManagement.js +0 -82
- package/useCode/useUIState.d.ts +0 -16
- package/useCode/useUIState.d.ts.map +0 -1
- package/useCode/useUIState.js +0 -21
- package/useCode/useVariantSelection.d.ts +0 -21
- package/useCode/useVariantSelection.d.ts.map +0 -1
- package/useCode/useVariantSelection.js +0 -84
- package/useCopier/index.d.ts.map +0 -1
- package/useDemo/createCodeSandbox.d.ts +0 -18
- package/useDemo/createCodeSandbox.d.ts.map +0 -1
- package/useDemo/createCodeSandbox.js +0 -48
- package/useDemo/createStackBlitz.d.ts +0 -22
- package/useDemo/createStackBlitz.d.ts.map +0 -1
- package/useDemo/createStackBlitz.js +0 -38
- package/useDemo/examineVariant.d.ts +0 -25
- package/useDemo/examineVariant.d.ts.map +0 -1
- package/useDemo/examineVariant.js +0 -134
- package/useDemo/exportVariant.d.ts +0 -110
- package/useDemo/exportVariant.d.ts.map +0 -1
- package/useDemo/exportVariant.js +0 -320
- package/useDemo/exportVariantAsCra.d.ts +0 -15
- package/useDemo/exportVariantAsCra.d.ts.map +0 -1
- package/useDemo/exportVariantAsCra.js +0 -56
- package/useDemo/flattenVariant.d.ts +0 -17
- package/useDemo/flattenVariant.d.ts.map +0 -1
- package/useDemo/flattenVariant.js +0 -206
- package/useDemo/index.d.ts.map +0 -1
- package/useDemo/useDemo.d.ts +0 -78
- package/useDemo/useDemo.d.ts.map +0 -1
- package/useDemo/useDemo.js +0 -174
- package/useLocalStorageState/index.d.ts +0 -2
- package/useLocalStorageState/index.d.ts.map +0 -1
- package/useLocalStorageState/index.js +0 -2
- package/useLocalStorageState/useLocalStorageState.d.ts +0 -14
- package/useLocalStorageState/useLocalStorageState.d.ts.map +0 -1
- package/useLocalStorageState/useLocalStorageState.js +0 -128
- package/useOnHydrate/index.d.ts +0 -1
- package/useOnHydrate/index.d.ts.map +0 -1
- package/useOnHydrate/index.js +0 -1
- package/useOnHydrate/useOnHydrate.d.ts +0 -1
- package/useOnHydrate/useOnHydrate.d.ts.map +0 -1
- package/useOnHydrate/useOnHydrate.js +0 -18
- package/useOnIdle/index.d.ts +0 -1
- package/useOnIdle/index.d.ts.map +0 -1
- package/useOnIdle/index.js +0 -1
- package/useOnIdle/useOnIdle.d.ts +0 -1
- package/useOnIdle/useOnIdle.d.ts.map +0 -1
- package/useOnIdle/useOnIdle.js +0 -39
- package/useUrlHashState/index.d.ts +0 -1
- package/useUrlHashState/index.d.ts.map +0 -1
- package/useUrlHashState/index.js +0 -1
- package/useUrlHashState/useUrlHashState.d.ts +0 -50
- package/useUrlHashState/useUrlHashState.d.ts.map +0 -1
- package/useUrlHashState/useUrlHashState.js +0 -113
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
|
-
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
7
|
-
import { create, patch } from 'jsondiffpatch';
|
|
8
|
-
var differ = create({
|
|
9
|
-
omitRemovedValues: true,
|
|
10
|
-
cloneDiffValues: true
|
|
11
|
-
});
|
|
12
|
-
export function transformParsedSource(_x, _x2, _x3, _x4, _x5) {
|
|
13
|
-
return _transformParsedSource.apply(this, arguments);
|
|
14
|
-
}
|
|
15
|
-
function _transformParsedSource() {
|
|
16
|
-
_transformParsedSource = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(source, parsedSource, filename, transforms, parseSource) {
|
|
17
|
-
var transformed;
|
|
18
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
19
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
20
|
-
case 0:
|
|
21
|
-
_context2.next = 2;
|
|
22
|
-
return Promise.all(Object.entries(transforms).map(/*#__PURE__*/function () {
|
|
23
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
24
|
-
var _ref3, key, transform, patched, transformedSource, parsedTransform, delta;
|
|
25
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
26
|
-
while (1) switch (_context.prev = _context.next) {
|
|
27
|
-
case 0:
|
|
28
|
-
_ref3 = _slicedToArray(_ref, 2), key = _ref3[0], transform = _ref3[1];
|
|
29
|
-
patched = patch(source.split('\n'), transform.delta);
|
|
30
|
-
if (Array.isArray(patched)) {
|
|
31
|
-
_context.next = 4;
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
throw new Error("Patch for ".concat(key, " did not return an array"));
|
|
35
|
-
case 4:
|
|
36
|
-
transformedSource = patched.join('\n');
|
|
37
|
-
_context.next = 7;
|
|
38
|
-
return parseSource(transformedSource, transform.fileName || filename);
|
|
39
|
-
case 7:
|
|
40
|
-
parsedTransform = _context.sent;
|
|
41
|
-
// TODO: further optimize this delta, it looks a little noisy
|
|
42
|
-
delta = differ.diff(parsedSource, parsedTransform);
|
|
43
|
-
return _context.abrupt("return", _defineProperty({}, key, _objectSpread(_objectSpread({}, transform), {}, {
|
|
44
|
-
delta: delta
|
|
45
|
-
})));
|
|
46
|
-
case 10:
|
|
47
|
-
case "end":
|
|
48
|
-
return _context.stop();
|
|
49
|
-
}
|
|
50
|
-
}, _callee);
|
|
51
|
-
}));
|
|
52
|
-
return function (_x6) {
|
|
53
|
-
return _ref2.apply(this, arguments);
|
|
54
|
-
};
|
|
55
|
-
}()));
|
|
56
|
-
case 2:
|
|
57
|
-
transformed = _context2.sent;
|
|
58
|
-
return _context2.abrupt("return", Object.assign.apply(Object, [{}].concat(_toConsumableArray(transformed))));
|
|
59
|
-
case 4:
|
|
60
|
-
case "end":
|
|
61
|
-
return _context2.stop();
|
|
62
|
-
}
|
|
63
|
-
}, _callee2);
|
|
64
|
-
}));
|
|
65
|
-
return _transformParsedSource.apply(this, arguments);
|
|
66
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformSource.d.ts","sourceRoot":"","sources":["../../src/CodeHighlighter/transformSource.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI7E,wBAAsB,eAAe,CACnC,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,MAAM,EAChB,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAuDjC"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
3
|
-
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
|
-
import { create } from 'jsondiffpatch';
|
|
5
|
-
import { toText } from 'hast-util-to-text';
|
|
6
|
-
var differ = create({
|
|
7
|
-
omitRemovedValues: true,
|
|
8
|
-
cloneDiffValues: true
|
|
9
|
-
});
|
|
10
|
-
export function transformSource(_x, _x2, _x3) {
|
|
11
|
-
return _transformSource.apply(this, arguments);
|
|
12
|
-
}
|
|
13
|
-
function _transformSource() {
|
|
14
|
-
_transformSource = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(source, fileName, sourceTransformers) {
|
|
15
|
-
var transforms;
|
|
16
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
17
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
18
|
-
case 0:
|
|
19
|
-
_context2.next = 2;
|
|
20
|
-
return Promise.all(sourceTransformers.map(/*#__PURE__*/function () {
|
|
21
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
22
|
-
var extensions, transformer, sourceString, transformed, splitSource;
|
|
23
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
24
|
-
while (1) switch (_context.prev = _context.next) {
|
|
25
|
-
case 0:
|
|
26
|
-
extensions = _ref.extensions, transformer = _ref.transformer;
|
|
27
|
-
if (extensions.some(function (ext) {
|
|
28
|
-
return fileName.endsWith(".".concat(ext));
|
|
29
|
-
})) {
|
|
30
|
-
_context.next = 3;
|
|
31
|
-
break;
|
|
32
|
-
}
|
|
33
|
-
return _context.abrupt("return", undefined);
|
|
34
|
-
case 3:
|
|
35
|
-
_context.prev = 3;
|
|
36
|
-
if (typeof source === 'string') {
|
|
37
|
-
sourceString = source;
|
|
38
|
-
} else if ('hastJson' in source) {
|
|
39
|
-
sourceString = toText(JSON.parse(source.hastJson));
|
|
40
|
-
} else {
|
|
41
|
-
sourceString = toText(source);
|
|
42
|
-
}
|
|
43
|
-
_context.next = 7;
|
|
44
|
-
return transformer(sourceString, fileName);
|
|
45
|
-
case 7:
|
|
46
|
-
transformed = _context.sent;
|
|
47
|
-
if (!transformed) {
|
|
48
|
-
_context.next = 11;
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
splitSource = sourceString.split('\n');
|
|
52
|
-
return _context.abrupt("return", Object.keys(transformed).reduce(function (acc, key) {
|
|
53
|
-
var delta = differ.diff(splitSource, transformed[key].source.split('\n'));
|
|
54
|
-
acc[key] = {
|
|
55
|
-
delta: delta,
|
|
56
|
-
fileName: transformed[key].fileName
|
|
57
|
-
};
|
|
58
|
-
return acc;
|
|
59
|
-
}, {}));
|
|
60
|
-
case 11:
|
|
61
|
-
return _context.abrupt("return", undefined);
|
|
62
|
-
case 14:
|
|
63
|
-
_context.prev = 14;
|
|
64
|
-
_context.t0 = _context["catch"](3);
|
|
65
|
-
throw new Error("Failed to transform source code (file: ".concat(fileName, "): ").concat(_context.t0 instanceof Error && _context.t0.message));
|
|
66
|
-
case 17:
|
|
67
|
-
case "end":
|
|
68
|
-
return _context.stop();
|
|
69
|
-
}
|
|
70
|
-
}, _callee, null, [[3, 14]]);
|
|
71
|
-
}));
|
|
72
|
-
return function (_x4) {
|
|
73
|
-
return _ref2.apply(this, arguments);
|
|
74
|
-
};
|
|
75
|
-
}()));
|
|
76
|
-
case 2:
|
|
77
|
-
transforms = _context2.sent;
|
|
78
|
-
if (!(transforms.length === 0 || transforms.every(function (t) {
|
|
79
|
-
return t === undefined;
|
|
80
|
-
}))) {
|
|
81
|
-
_context2.next = 5;
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
return _context2.abrupt("return", undefined);
|
|
85
|
-
case 5:
|
|
86
|
-
return _context2.abrupt("return", transforms.reduce(function (acc, transform) {
|
|
87
|
-
if (transform) {
|
|
88
|
-
Object.entries(transform).forEach(function (_ref3) {
|
|
89
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
90
|
-
key = _ref4[0],
|
|
91
|
-
value = _ref4[1];
|
|
92
|
-
if (acc[key]) {
|
|
93
|
-
throw new Error("Duplicate key found in source transformations: ".concat(key));
|
|
94
|
-
}
|
|
95
|
-
acc[key] = value;
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
return acc;
|
|
99
|
-
}, {}));
|
|
100
|
-
case 6:
|
|
101
|
-
case "end":
|
|
102
|
-
return _context2.stop();
|
|
103
|
-
}
|
|
104
|
-
}, _callee2);
|
|
105
|
-
}));
|
|
106
|
-
return _transformSource.apply(this, arguments);
|
|
107
|
-
}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import type { Nodes as HastNodes } from 'hast';
|
|
2
|
-
import type { Delta } from 'jsondiffpatch';
|
|
3
|
-
export type Components = {
|
|
4
|
-
[key: string]: React.ReactNode;
|
|
5
|
-
};
|
|
6
|
-
type CodeMeta = {
|
|
7
|
-
fileName?: string;
|
|
8
|
-
};
|
|
9
|
-
export type Transforms = Record<string, {
|
|
10
|
-
delta: Delta;
|
|
11
|
-
fileName?: string;
|
|
12
|
-
}>;
|
|
13
|
-
export interface ExternalImportItem {
|
|
14
|
-
name: string;
|
|
15
|
-
type: 'named' | 'default' | 'namespace';
|
|
16
|
-
isType?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export type Externals = Record<string, ExternalImportItem[]>;
|
|
19
|
-
export type VariantSource = string | HastNodes | {
|
|
20
|
-
hastJson: string;
|
|
21
|
-
};
|
|
22
|
-
export type VariantExtraFiles = {
|
|
23
|
-
[fileName: string]: string | {
|
|
24
|
-
source?: VariantSource;
|
|
25
|
-
transforms?: Transforms;
|
|
26
|
-
skipTransforms?: boolean;
|
|
27
|
-
metadata?: boolean;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export type VariantCode = CodeMeta & {
|
|
31
|
-
url?: string;
|
|
32
|
-
source?: VariantSource;
|
|
33
|
-
extraFiles?: VariantExtraFiles;
|
|
34
|
-
externals?: string[];
|
|
35
|
-
namedExport?: string;
|
|
36
|
-
filesOrder?: string[];
|
|
37
|
-
transforms?: Transforms;
|
|
38
|
-
allFilesListed?: boolean;
|
|
39
|
-
skipTransforms?: boolean;
|
|
40
|
-
};
|
|
41
|
-
export type Code = {
|
|
42
|
-
[key: string]: undefined | string | VariantCode;
|
|
43
|
-
};
|
|
44
|
-
export type ControlledVariantExtraFiles = {
|
|
45
|
-
[fileName: string]: {
|
|
46
|
-
source: string | null;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
export type ControlledVariantCode = CodeMeta & {
|
|
50
|
-
url?: string;
|
|
51
|
-
source?: string | null;
|
|
52
|
-
extraFiles?: ControlledVariantExtraFiles;
|
|
53
|
-
filesOrder?: string[];
|
|
54
|
-
};
|
|
55
|
-
export type ControlledCode = {
|
|
56
|
-
[key: string]: undefined | null | ControlledVariantCode;
|
|
57
|
-
};
|
|
58
|
-
type BaseContentProps = {
|
|
59
|
-
name?: string;
|
|
60
|
-
slug?: string;
|
|
61
|
-
code?: Code;
|
|
62
|
-
components?: Components;
|
|
63
|
-
url?: string;
|
|
64
|
-
};
|
|
65
|
-
export type ContentProps<T extends {}> = BaseContentProps & T;
|
|
66
|
-
export type ContentLoadingVariant = {
|
|
67
|
-
fileNames?: string[];
|
|
68
|
-
source?: React.ReactNode;
|
|
69
|
-
extraSource?: {
|
|
70
|
-
[fileName: string]: React.ReactNode;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
export type BaseContentLoadingProps = ContentLoadingVariant & {
|
|
74
|
-
extraVariants?: Record<string, ContentLoadingVariant>;
|
|
75
|
-
name?: string;
|
|
76
|
-
slug?: string;
|
|
77
|
-
url?: string;
|
|
78
|
-
};
|
|
79
|
-
export type ContentLoadingProps<T extends {}> = BaseContentLoadingProps & T;
|
|
80
|
-
type ErrorHandler = React.ComponentType<{
|
|
81
|
-
error: Error;
|
|
82
|
-
}>;
|
|
83
|
-
interface CodeHighlighterBaseProps {
|
|
84
|
-
name?: string;
|
|
85
|
-
slug?: string;
|
|
86
|
-
code?: Code;
|
|
87
|
-
globalsCode?: Array<Code | string>;
|
|
88
|
-
components?: Components;
|
|
89
|
-
variants?: string[];
|
|
90
|
-
variant?: string;
|
|
91
|
-
fileName?: string;
|
|
92
|
-
initialVariant?: string;
|
|
93
|
-
defaultVariant?: string;
|
|
94
|
-
precompute?: Code;
|
|
95
|
-
fallbackUsesExtraFiles?: boolean;
|
|
96
|
-
fallbackUsesAllVariants?: boolean;
|
|
97
|
-
url?: string;
|
|
98
|
-
controlled?: boolean;
|
|
99
|
-
children?: string;
|
|
100
|
-
}
|
|
101
|
-
export interface CodeHighlighterClientProps extends Omit<CodeHighlighterBaseProps, 'children'> {
|
|
102
|
-
children: React.ReactNode;
|
|
103
|
-
errorHandler?: React.ReactNode;
|
|
104
|
-
fallback?: React.ReactNode;
|
|
105
|
-
skipFallback?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* @default 'hydration'
|
|
108
|
-
*/
|
|
109
|
-
highlightAt?: 'init' | 'hydration' | 'idle';
|
|
110
|
-
}
|
|
111
|
-
export type LoadCodeMeta = (url: string) => Promise<Code>;
|
|
112
|
-
export type LoadVariantMeta = (variantName: string, url: string) => Promise<VariantCode>;
|
|
113
|
-
export type LoadSource = (url: string) => Promise<{
|
|
114
|
-
source: string;
|
|
115
|
-
extraFiles?: VariantExtraFiles;
|
|
116
|
-
extraDependencies?: string[];
|
|
117
|
-
externals?: Externals;
|
|
118
|
-
}>;
|
|
119
|
-
export type TransformSource = (source: string, fileName: string) => Promise<Record<string, {
|
|
120
|
-
source: string;
|
|
121
|
-
fileName?: string;
|
|
122
|
-
}> | undefined>;
|
|
123
|
-
export type ParseSource = (source: string, fileName: string) => HastNodes;
|
|
124
|
-
export type SourceTransformer = {
|
|
125
|
-
extensions: string[];
|
|
126
|
-
transformer: TransformSource;
|
|
127
|
-
};
|
|
128
|
-
export type SourceTransformers = Array<SourceTransformer>;
|
|
129
|
-
/**
|
|
130
|
-
* Options for controlling file loading behavior
|
|
131
|
-
*/
|
|
132
|
-
export interface LoadFileOptions {
|
|
133
|
-
/** Disable applying source transformers */
|
|
134
|
-
disableTransforms?: boolean;
|
|
135
|
-
/** Disable parsing source strings to AST */
|
|
136
|
-
disableParsing?: boolean;
|
|
137
|
-
/** Maximum recursion depth for loading nested extra files */
|
|
138
|
-
maxDepth?: number;
|
|
139
|
-
/** Set of already loaded file URLs to prevent circular dependencies */
|
|
140
|
-
loadedFiles?: Set<string>;
|
|
141
|
-
/** Side effects code to inject into extraFiles */
|
|
142
|
-
globalsCode?: Array<VariantCode | string>;
|
|
143
|
-
}
|
|
144
|
-
export interface CodeHighlighterProps<T extends {}> extends CodeHighlighterBaseProps {
|
|
145
|
-
Content: React.ComponentType<ContentProps<T>>;
|
|
146
|
-
contentProps?: T;
|
|
147
|
-
ErrorHandler?: ErrorHandler;
|
|
148
|
-
ContentLoading?: React.ComponentType<ContentLoadingProps<T>>;
|
|
149
|
-
/**
|
|
150
|
-
* @default 'stream'
|
|
151
|
-
*/
|
|
152
|
-
highlightAt?: 'init' | 'stream' | 'hydration' | 'idle';
|
|
153
|
-
forceClient?: boolean;
|
|
154
|
-
loadCodeMeta?: LoadCodeMeta;
|
|
155
|
-
loadVariantMeta?: LoadVariantMeta;
|
|
156
|
-
loadSource?: LoadSource;
|
|
157
|
-
sourceTransformers?: SourceTransformers;
|
|
158
|
-
sourceParser?: Promise<ParseSource>;
|
|
159
|
-
}
|
|
160
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/CodeHighlighter/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;A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MAAM,CAAC;IAClB,uEAAuE;IACvE,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,kDAAkD;IAClD,WAAW,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,EAAE,CAAE,SAAQ,wBAAwB;IAClF,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAC;IACvD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CACrC"}
|
package/CodeHighlighter/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { LoadCodeMeta, LoadSource, LoadVariantMeta, ParseSource, SourceTransformers } from "../CodeHighlighter/index.js";
|
|
3
|
-
export interface CodeContext {
|
|
4
|
-
sourceParser?: Promise<ParseSource>;
|
|
5
|
-
parseSource?: ParseSource;
|
|
6
|
-
sourceTransformers?: SourceTransformers;
|
|
7
|
-
loadSource?: LoadSource;
|
|
8
|
-
loadVariantMeta?: LoadVariantMeta;
|
|
9
|
-
loadCodeMeta?: LoadCodeMeta;
|
|
10
|
-
}
|
|
11
|
-
export declare const CodeContext: React.Context<CodeContext>;
|
|
12
|
-
export declare const useCodeContext: () => CodeContext;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CodeContext.d.ts","sourceRoot":"","sources":["../../src/CodeProvider/CodeContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,eAAe,EACf,WAAW,EACX,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,WAAW;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED,eAAO,MAAM,WAAW,4BAAuC,CAAC;AAEhE,eAAO,MAAM,cAAc,mBAI1B,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { LoadCodeMeta, LoadSource, LoadVariantMeta } from "../CodeHighlighter/index.js";
|
|
3
|
-
export declare function CodeProvider({
|
|
4
|
-
children,
|
|
5
|
-
loadCodeMeta,
|
|
6
|
-
loadVariantMeta,
|
|
7
|
-
loadSource
|
|
8
|
-
}: {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
loadCodeMeta?: LoadCodeMeta;
|
|
11
|
-
loadVariantMeta?: LoadVariantMeta;
|
|
12
|
-
loadSource?: LoadSource;
|
|
13
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CodeProvider.d.ts","sourceRoot":"","sources":["../../src/CodeProvider/CodeProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAe,MAAM,oBAAoB,CAAC;AAG5F,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,UAAU,GACX,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,2CAmDA"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { createStarryNight } from '@wooorm/starry-night';
|
|
6
|
-
import { CodeContext } from "./CodeContext.js";
|
|
7
|
-
import { extensionMap, grammars } from "../pipeline/parseSource/grammars.js";
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
export function CodeProvider(_ref) {
|
|
10
|
-
var children = _ref.children,
|
|
11
|
-
loadCodeMeta = _ref.loadCodeMeta,
|
|
12
|
-
loadVariantMeta = _ref.loadVariantMeta,
|
|
13
|
-
loadSource = _ref.loadSource;
|
|
14
|
-
var _React$useState = React.useState(undefined),
|
|
15
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
16
|
-
parseSource = _React$useState2[0],
|
|
17
|
-
setParseSource = _React$useState2[1];
|
|
18
|
-
var sourceParser = React.useMemo(function () {
|
|
19
|
-
// Only initialize Starry Night in the browser, not during SSR
|
|
20
|
-
if (typeof window === 'undefined') {
|
|
21
|
-
return Promise.resolve(function () {
|
|
22
|
-
throw new Error('parseSource not available during SSR');
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return createStarryNight(grammars).then(function (starryNight) {
|
|
26
|
-
var parseSourceFn = function parseSourceFn(source, fileName) {
|
|
27
|
-
var fileType = fileName.slice(fileName.lastIndexOf('.'));
|
|
28
|
-
if (!extensionMap[fileType]) {
|
|
29
|
-
// Return a basic HAST root node with the source text for unsupported file types
|
|
30
|
-
return {
|
|
31
|
-
type: 'root',
|
|
32
|
-
children: [{
|
|
33
|
-
type: 'text',
|
|
34
|
-
value: source
|
|
35
|
-
}]
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
return starryNight.highlight(source, extensionMap[fileType]);
|
|
39
|
-
};
|
|
40
|
-
return parseSourceFn;
|
|
41
|
-
});
|
|
42
|
-
}, []);
|
|
43
|
-
React.useEffect(function () {
|
|
44
|
-
// Update the sync version when available
|
|
45
|
-
sourceParser.then(function (parseSourceFn) {
|
|
46
|
-
return setParseSource(function () {
|
|
47
|
-
return parseSourceFn;
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
}, [sourceParser]);
|
|
51
|
-
var context = React.useMemo(function () {
|
|
52
|
-
return {
|
|
53
|
-
sourceParser: sourceParser,
|
|
54
|
-
parseSource: parseSource,
|
|
55
|
-
// Sync version when available
|
|
56
|
-
loadSource: loadSource,
|
|
57
|
-
loadVariantMeta: loadVariantMeta,
|
|
58
|
-
loadCodeMeta: loadCodeMeta
|
|
59
|
-
};
|
|
60
|
-
}, [sourceParser, parseSource, loadSource, loadVariantMeta, loadCodeMeta]);
|
|
61
|
-
return /*#__PURE__*/_jsx(CodeContext.Provider, {
|
|
62
|
-
value: context,
|
|
63
|
-
children: children
|
|
64
|
-
});
|
|
65
|
-
}
|
package/CodeProvider/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./CodeProvider.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CodeProvider/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
package/CodeProvider/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./CodeProvider.js";
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { Code, ContentLoadingProps, ContentProps } from "../CodeHighlighter/types.js";
|
|
3
|
-
import { DemoGlobalData } from "../createDemoData/types.js";
|
|
4
|
-
type CreateDemoMeta = {
|
|
5
|
-
name?: string;
|
|
6
|
-
slug?: string;
|
|
7
|
-
displayName?: string;
|
|
8
|
-
skipPrecompute?: boolean;
|
|
9
|
-
precompute?: Code;
|
|
10
|
-
CodeExternalsProvider?: React.ComponentType<{
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
}>;
|
|
13
|
-
};
|
|
14
|
-
type AbstractCreateDemoOptions<T extends {}> = {
|
|
15
|
-
DemoContent: React.ComponentType<ContentProps<T>>;
|
|
16
|
-
DemoContentLoading?: React.ComponentType<ContentLoadingProps<T>>;
|
|
17
|
-
DemoTitle?: React.ComponentType<{
|
|
18
|
-
slug?: string;
|
|
19
|
-
children?: string;
|
|
20
|
-
}>;
|
|
21
|
-
controlled?: boolean;
|
|
22
|
-
demoGlobalData?: DemoGlobalData[];
|
|
23
|
-
};
|
|
24
|
-
export declare function abstractCreateDemo<T extends {}>(options: AbstractCreateDemoOptions<T>, url: string, variants: {
|
|
25
|
-
[key: string]: React.ComponentType;
|
|
26
|
-
}, meta: CreateDemoMeta | undefined): React.ComponentType<T> & {
|
|
27
|
-
Title: React.ComponentType;
|
|
28
|
-
};
|
|
29
|
-
export declare function createDemoFactory<T extends {}>(options: AbstractCreateDemoOptions<T>): (url: string, component: React.ComponentType, meta?: CreateDemoMeta) => React.ComponentType<T> & {
|
|
30
|
-
Title: React.ComponentType;
|
|
31
|
-
};
|
|
32
|
-
export declare function createDemoWithVariantsFactory<T extends {}>(options: AbstractCreateDemoOptions<T>): (url: string, variants: Record<string, React.ComponentType>, meta?: CreateDemoMeta) => React.ComponentType<T> & {
|
|
33
|
-
Title: React.ComponentType;
|
|
34
|
-
};
|
|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;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,aAAa,CAAA;CAAE,EAChD,IAAI,EAAE,cAAc,GAAG,SAAS,GAC/B,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC,aAAa,CAAA;CAAE,CAwDzD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,yBAAyB,CAAC,CAAC,CAAC,SAO1D,MAAM,aAAa,KAAK,CAAC,aAAa,SAAS,cAAc;WAjEnD,KAAK,CAAC,aAAa;EA2EvD;AAED,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,yBAAyB,CAAC,CAAC,CAAC,SASxF,MAAM,YACD,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,SACtC,cAAc;WAxFY,KAAK,CAAC,aAAa;EA8FvD"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { CodeHighlighter } from "../CodeHighlighter/index.js";
|
|
4
|
-
import { createDemoDataWithVariants } from "../createDemoData/index.js";
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
// TODO: allow passing any CodeHighlighter prop
|
|
7
|
-
|
|
8
|
-
export function abstractCreateDemo(options, url, variants, meta) {
|
|
9
|
-
var demoData = createDemoDataWithVariants(url, variants, meta);
|
|
10
|
-
var globalCode = [];
|
|
11
|
-
if (options.demoGlobalData) {
|
|
12
|
-
options.demoGlobalData.forEach(function (data) {
|
|
13
|
-
globalCode.push(data.precompute || data.url);
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
function DemoComponent(props) {
|
|
17
|
-
var renderedComponents = Object.entries(demoData.components).reduce(function (acc, _ref) {
|
|
18
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
19
|
-
key = _ref2[0],
|
|
20
|
-
Component = _ref2[1];
|
|
21
|
-
acc[key] = /*#__PURE__*/React.createElement(Component);
|
|
22
|
-
return acc;
|
|
23
|
-
}, {});
|
|
24
|
-
var highlighter = /*#__PURE__*/_jsx(CodeHighlighter, {
|
|
25
|
-
url: demoData.url,
|
|
26
|
-
name: demoData.name,
|
|
27
|
-
slug: demoData.slug,
|
|
28
|
-
precompute: demoData.precompute,
|
|
29
|
-
globalsCode: globalCode,
|
|
30
|
-
components: renderedComponents,
|
|
31
|
-
contentProps: props,
|
|
32
|
-
Content: options.DemoContent,
|
|
33
|
-
ContentLoading: options.DemoContentLoading,
|
|
34
|
-
controlled: options.controlled
|
|
35
|
-
});
|
|
36
|
-
var CodeExternalsProvider = meta == null ? void 0 : meta.CodeExternalsProvider;
|
|
37
|
-
if (CodeExternalsProvider) {
|
|
38
|
-
return /*#__PURE__*/_jsx(CodeExternalsProvider, {
|
|
39
|
-
children: highlighter
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
return highlighter;
|
|
43
|
-
}
|
|
44
|
-
function Title() {
|
|
45
|
-
if (options.DemoTitle) {
|
|
46
|
-
return /*#__PURE__*/_jsx(options.DemoTitle, {
|
|
47
|
-
slug: demoData.slug,
|
|
48
|
-
children: demoData.name
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return /*#__PURE__*/_jsx("h3", {
|
|
52
|
-
id: demoData.slug,
|
|
53
|
-
children: demoData.name
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
DemoComponent.Title = Title;
|
|
57
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
58
|
-
DemoComponent.displayName = demoData.displayName;
|
|
59
|
-
DemoComponent.Title.displayName = "".concat(demoData.displayName, "Title");
|
|
60
|
-
}
|
|
61
|
-
return DemoComponent;
|
|
62
|
-
}
|
|
63
|
-
export function createDemoFactory(options) {
|
|
64
|
-
/**
|
|
65
|
-
* Creates a demo component for displaying code examples with syntax highlighting.
|
|
66
|
-
* @param url Depends on `import.meta.url` to determine the source file location.
|
|
67
|
-
* @param component The component to be rendered in the demo.
|
|
68
|
-
* @param meta Additional meta for the demo.
|
|
69
|
-
*/
|
|
70
|
-
var createDemo = function createDemo(url, component, meta) {
|
|
71
|
-
return abstractCreateDemo(options, url, {
|
|
72
|
-
Default: component
|
|
73
|
-
},
|
|
74
|
-
// precomputed code will use the 'Default' key
|
|
75
|
-
meta);
|
|
76
|
-
};
|
|
77
|
-
return createDemo;
|
|
78
|
-
}
|
|
79
|
-
export function createDemoWithVariantsFactory(options) {
|
|
80
|
-
/**
|
|
81
|
-
* Creates a demo component for displaying code examples with syntax highlighting.
|
|
82
|
-
* A variant is a different implementation style of the same component.
|
|
83
|
-
* @param url Depends on `import.meta.url` to determine the source file location.
|
|
84
|
-
* @param variants The variants of the component to be rendered in the demo.
|
|
85
|
-
* @param meta Additional meta for the demo.
|
|
86
|
-
*/
|
|
87
|
-
var createDemoWithVariants = function createDemoWithVariants(url, variants, meta) {
|
|
88
|
-
return abstractCreateDemo(options, url, variants, meta);
|
|
89
|
-
};
|
|
90
|
-
return createDemoWithVariants;
|
|
91
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./abstractCreateDemo.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/abstractCreateDemo/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./abstractCreateDemo.js";
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { CreateDemoDataMeta, DemoData, DemoGlobalData, DemoGlobalProvider } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates demo data for displaying code examples with syntax highlighting.
|
|
4
|
-
* A variant is a different implementation style of the same component.
|
|
5
|
-
* Returns a data object containing demo metadata and components instead of a complete demo component.
|
|
6
|
-
* Note: It is recommended to use abstractCreateDemo to create a complete demo component rather than just demo data.
|
|
7
|
-
* @param url Depends on `import.meta.url` to determine the source file location.
|
|
8
|
-
* @param variants The variants of the component to be rendered in the demo.
|
|
9
|
-
* @param meta Additional meta for the demo.
|
|
10
|
-
*/
|
|
11
|
-
export declare function createDemoDataWithVariants<T extends React.ComponentType<any> = React.ComponentType>(url: string, variants: {
|
|
12
|
-
Default: T;
|
|
13
|
-
} | {
|
|
14
|
-
[key: string]: T;
|
|
15
|
-
}, meta?: CreateDemoDataMeta): DemoData<T>;
|
|
16
|
-
/**
|
|
17
|
-
* Creates demo data for displaying code examples with syntax highlighting.
|
|
18
|
-
* Returns a data object containing demo metadata and components instead of a complete demo component.
|
|
19
|
-
* Note: It is recommended to use abstractCreateDemo to create a complete demo component rather than just demo data.
|
|
20
|
-
* @param url Depends on `import.meta.url` to determine the source file location.
|
|
21
|
-
* @param component The component to be rendered in the demo.
|
|
22
|
-
* @param meta Additional meta for the demo.
|
|
23
|
-
*/
|
|
24
|
-
export declare function createDemoData<T extends React.ComponentType<any> = React.ComponentType>(url: string, component: T, meta?: CreateDemoDataMeta): DemoData<T>;
|
|
25
|
-
/**
|
|
26
|
-
* Creates a demo data object for a global provider component with different variants.
|
|
27
|
-
*
|
|
28
|
-
* @param url The URL of the demo file.
|
|
29
|
-
* @param globalProviders The variants of the global provider to be rendered in the demo.
|
|
30
|
-
* @param meta Additional metadata for the demo data.
|
|
31
|
-
* @returns Demo data object.
|
|
32
|
-
*/
|
|
33
|
-
export declare function createDemoGlobalWithVariants(url: string, globalProviders: {
|
|
34
|
-
[variant: string]: DemoGlobalProvider;
|
|
35
|
-
}, meta?: CreateDemoDataMeta): DemoGlobalData;
|
|
36
|
-
/**
|
|
37
|
-
* Creates a demo data object for a global provider component.
|
|
38
|
-
*
|
|
39
|
-
* @param url The URL of the demo file.
|
|
40
|
-
* @param globalProvider The global provider to be rendered in the demo.
|
|
41
|
-
* @param meta Additional metadata for the demo data.
|
|
42
|
-
* @returns Demo data object.
|
|
43
|
-
*/
|
|
44
|
-
export declare function createDemoGlobal(url: string, globalProvider: DemoGlobalProvider, meta?: CreateDemoDataMeta): DemoGlobalData;
|