storybook-addon-sdc 0.25.0 → 0.26.0

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 CHANGED
@@ -706,7 +706,7 @@ $schema: https://git.drupalcode.org/project/drupal/-/raw/HEAD/core/assets/schema
706
706
 
707
707
  - **Validation Warnings:** Validation errors or warnings are logged to the console, helping developers identify any issues with component configurations. **Note:** Validation will not break the rendering of the components. Even if a validation error occurs, the component will still appear in Storybook, and the warning will be logged for review.
708
708
 
709
- To enable validation, set `validate: URL of schema`:
709
+ To enable validation, set `validate: true` (Drupal core's schema) or pass the URL of your own default schema:
710
710
 
711
711
  ```js
712
712
  const config = {
@@ -716,8 +716,8 @@ const config = {
716
716
  name: 'storybook-addon-sdc',
717
717
  options: {
718
718
  sdcStorybookOptions: {
719
- validate:
720
- 'https://git.drupalcode.org/project/drupal/-/raw/HEAD/core/assets/schemas/v1/metadata.schema.json',
719
+ // true = https://git.drupalcode.org/project/drupal/-/raw/HEAD/core/assets/schemas/v1/metadata.schema.json
720
+ validate: true,
721
721
  },
722
722
  },
723
723
  },
@@ -725,6 +725,8 @@ const config = {
725
725
  }
726
726
  ```
727
727
 
728
+ A component's own `$schema` always takes precedence over the default. Validation only warns: a failing or unreachable schema never removes a component from Storybook.
729
+
728
730
  ### `useBasicArgsForStories`
729
731
 
730
732
  By default, when generating stories for your SDC components, the addon automatically spreads the `Basic.args` into each generated story. This behavior can be controlled using the `useBasicArgsForStories` option.