storybook-addon-sdc 0.1.9 → 0.1.11
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/dist/preset.js +5 -3
- package/package.json +2 -1
package/dist/preset.js
CHANGED
|
@@ -5491,7 +5491,11 @@ import { dirname, extname, relative, resolve as resolve2, join } from "path";
|
|
|
5491
5491
|
init_esm_shims();
|
|
5492
5492
|
import { JSONSchemaFaker } from "json-schema-faker";
|
|
5493
5493
|
var generateArgs = (schema) => {
|
|
5494
|
-
const generated =
|
|
5494
|
+
const generated = {};
|
|
5495
|
+
for (const key in schema) {
|
|
5496
|
+
const property = schema[key];
|
|
5497
|
+
generated[key] = JSONSchemaFaker.generate(property);
|
|
5498
|
+
}
|
|
5495
5499
|
return generated;
|
|
5496
5500
|
};
|
|
5497
5501
|
var slotsToMarkup = (slots) => Object.entries(slots).reduce((acc, [key, value]) => {
|
|
@@ -5500,8 +5504,6 @@ var slotsToMarkup = (slots) => Object.entries(slots).reduce((acc, [key, value])
|
|
|
5500
5504
|
}, {});
|
|
5501
5505
|
var argsGenerator_default = (content, jsonSchemaFakerOptions) => {
|
|
5502
5506
|
JSONSchemaFaker.option({
|
|
5503
|
-
ignoreProperties: ["attributes"],
|
|
5504
|
-
pruneProperties: ["attributes"],
|
|
5505
5507
|
failOnInvalidTypes: false,
|
|
5506
5508
|
useExamplesValue: true,
|
|
5507
5509
|
useDefaultValue: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storybook-addon-sdc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Drupal Single Directory Components as stories",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"SDC",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@storybook/html-vite": "^8.4.1",
|
|
46
46
|
"@storybook/test": "^8.4.1",
|
|
47
47
|
"@storybook/types": "^8.4.1",
|
|
48
|
+
"@types/json-schema": "^7.0.15",
|
|
48
49
|
"@types/node": "^22.8.7",
|
|
49
50
|
"auto": "^11.3.0",
|
|
50
51
|
"boxen": "^8.0.1",
|