@docusaurus/theme-live-codeblock 0.0.0-4624 → 0.0.0-4627
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/lib/custom-buble.d.ts
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
7
|
+
import { type TransformOptions, type TransformOutput } from '@philpl/buble';
|
|
8
|
+
export { features } from '@philpl/buble';
|
|
9
9
|
export declare function transform(source: string, options: TransformOptions): TransformOutput;
|
package/lib/custom-buble.js
CHANGED
|
@@ -7,14 +7,11 @@
|
|
|
7
7
|
// fork of Buble which removes Buble's large dependency and weighs in
|
|
8
8
|
// at a smaller size of ~51kB
|
|
9
9
|
// https://github.com/FormidableLabs/react-live#what-bundle-size-can-i-expect
|
|
10
|
-
import {
|
|
11
|
-
transform as bubleTransform,
|
|
12
|
-
features as bubleFeatures,
|
|
13
|
-
} from '@philpl/buble';
|
|
10
|
+
import {transform as bubleTransform} from '@philpl/buble';
|
|
14
11
|
// This file is designed to mimic what's written in
|
|
15
12
|
// https://github.com/kitten/buble/blob/mini/src/index.js, with custom transforms options,
|
|
16
13
|
// so that webpack can consume it correctly.
|
|
17
|
-
export {
|
|
14
|
+
export {features} from '@philpl/buble';
|
|
18
15
|
export function transform(source, options) {
|
|
19
16
|
return bubleTransform(source, {
|
|
20
17
|
...options,
|
|
@@ -6,12 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { Joi } from '@docusaurus/utils-validation';
|
|
8
8
|
import type { ThemeConfig, Validate, ValidationResult } from '@docusaurus/types';
|
|
9
|
-
declare const DEFAULT_CONFIG: {
|
|
9
|
+
export declare const DEFAULT_CONFIG: {
|
|
10
10
|
playgroundPosition: string;
|
|
11
11
|
};
|
|
12
|
-
declare const Schema: Joi.ObjectSchema<any>;
|
|
13
|
-
declare function validateThemeConfig({ validate, themeConfig, }: {
|
|
12
|
+
export declare const Schema: Joi.ObjectSchema<any>;
|
|
13
|
+
export declare function validateThemeConfig({ validate, themeConfig, }: {
|
|
14
14
|
validate: Validate<ThemeConfig>;
|
|
15
15
|
themeConfig: ThemeConfig;
|
|
16
16
|
}): ValidationResult<ThemeConfig>;
|
|
17
|
-
export { DEFAULT_CONFIG, Schema, validateThemeConfig };
|
|
@@ -8,21 +8,19 @@
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
9
9
|
exports.validateThemeConfig = exports.Schema = exports.DEFAULT_CONFIG = void 0;
|
|
10
10
|
const utils_validation_1 = require('@docusaurus/utils-validation');
|
|
11
|
-
|
|
11
|
+
exports.DEFAULT_CONFIG = {
|
|
12
12
|
playgroundPosition: 'bottom',
|
|
13
13
|
};
|
|
14
|
-
exports.
|
|
15
|
-
const Schema = utils_validation_1.Joi.object({
|
|
14
|
+
exports.Schema = utils_validation_1.Joi.object({
|
|
16
15
|
liveCodeBlock: utils_validation_1.Joi.object({
|
|
17
16
|
playgroundPosition: utils_validation_1.Joi.string()
|
|
18
17
|
.equal('top', 'bottom')
|
|
19
|
-
.default(DEFAULT_CONFIG.playgroundPosition),
|
|
18
|
+
.default(exports.DEFAULT_CONFIG.playgroundPosition),
|
|
20
19
|
})
|
|
21
20
|
.label('themeConfig.liveCodeBlock')
|
|
22
|
-
.default(DEFAULT_CONFIG),
|
|
21
|
+
.default(exports.DEFAULT_CONFIG),
|
|
23
22
|
});
|
|
24
|
-
exports.Schema = Schema;
|
|
25
23
|
function validateThemeConfig({validate, themeConfig}) {
|
|
26
|
-
return validate(Schema, themeConfig);
|
|
24
|
+
return validate(exports.Schema, themeConfig);
|
|
27
25
|
}
|
|
28
26
|
exports.validateThemeConfig = validateThemeConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-live-codeblock",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4627",
|
|
4
4
|
"description": "Docusaurus live code block component.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-live-codeblock.d.ts",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
},
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@docusaurus/core": "0.0.0-
|
|
25
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
26
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
27
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
24
|
+
"@docusaurus/core": "0.0.0-4627",
|
|
25
|
+
"@docusaurus/theme-common": "0.0.0-4627",
|
|
26
|
+
"@docusaurus/theme-translations": "0.0.0-4627",
|
|
27
|
+
"@docusaurus/utils-validation": "0.0.0-4627",
|
|
28
28
|
"@philpl/buble": "^0.19.7",
|
|
29
29
|
"clsx": "^1.1.1",
|
|
30
30
|
"fs-extra": "^10.0.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"tslib": "^2.3.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@docusaurus/types": "0.0.0-
|
|
35
|
+
"@docusaurus/types": "0.0.0-4627",
|
|
36
36
|
"@types/buble": "^0.20.1"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=14"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "89fcd5ec57a0c156894bc5f93750b4fb295e97d2"
|
|
46
46
|
}
|
package/src/custom-buble.ts
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
// https://github.com/FormidableLabs/react-live#what-bundle-size-can-i-expect
|
|
11
11
|
import {
|
|
12
12
|
transform as bubleTransform,
|
|
13
|
-
features as bubleFeatures,
|
|
14
13
|
type TransformOptions,
|
|
15
14
|
type TransformOutput,
|
|
16
15
|
} from '@philpl/buble';
|
|
@@ -18,7 +17,7 @@ import {
|
|
|
18
17
|
// This file is designed to mimic what's written in
|
|
19
18
|
// https://github.com/kitten/buble/blob/mini/src/index.js, with custom transforms options,
|
|
20
19
|
// so that webpack can consume it correctly.
|
|
21
|
-
export {
|
|
20
|
+
export {features} from '@philpl/buble';
|
|
22
21
|
|
|
23
22
|
export function transform(
|
|
24
23
|
source: string,
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
import {Joi} from '@docusaurus/utils-validation';
|
|
9
9
|
import type {ThemeConfig, Validate, ValidationResult} from '@docusaurus/types';
|
|
10
10
|
|
|
11
|
-
const DEFAULT_CONFIG = {
|
|
11
|
+
export const DEFAULT_CONFIG = {
|
|
12
12
|
playgroundPosition: 'bottom',
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
const Schema = Joi.object({
|
|
15
|
+
export const Schema = Joi.object({
|
|
16
16
|
liveCodeBlock: Joi.object({
|
|
17
17
|
playgroundPosition: Joi.string()
|
|
18
18
|
.equal('top', 'bottom')
|
|
@@ -22,7 +22,7 @@ const Schema = Joi.object({
|
|
|
22
22
|
.default(DEFAULT_CONFIG),
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
function validateThemeConfig({
|
|
25
|
+
export function validateThemeConfig({
|
|
26
26
|
validate,
|
|
27
27
|
themeConfig,
|
|
28
28
|
}: {
|
|
@@ -31,5 +31,3 @@ function validateThemeConfig({
|
|
|
31
31
|
}): ValidationResult<ThemeConfig> {
|
|
32
32
|
return validate(Schema, themeConfig);
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
export {DEFAULT_CONFIG, Schema, validateThemeConfig};
|