@blocklet/meta 1.16.34-beta-20241212-152152-0b8d4bb3 → 1.16.34-beta-20241213-135509-c2832f80

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.
@@ -330,6 +330,10 @@ function compactNavigation(navigation, depth = 2) {
330
330
  }
331
331
  item.section = item.section || parent.section || [DEFAULT_SECTION];
332
332
  item.visible = item.visible ?? parent.visible;
333
+ if (parent.role) {
334
+ // 继承父级 role
335
+ item.role = item.role || parent.role;
336
+ }
333
337
  }
334
338
  item.component = [parent.component, item.component].filter(Boolean).join('.');
335
339
  return item;
package/lib/schema.js CHANGED
@@ -679,6 +679,13 @@ const blockletMetaProps = {
679
679
  engine: Joi.alternatives().try(engineSchema, Joi.array().items(engineSchema)).optional(),
680
680
  // NOTE: following fields are appended by registry or bundling process
681
681
  screenshots: Joi.array().items(Joi.string().min(1)).optional().default([]),
682
+ videos: Joi.array()
683
+ .items(Joi.string()
684
+ // eslint-disable-next-line no-useless-escape
685
+ .pattern(/^https:\/\/(www\.)?(youtube\.com|youtu\.be|vimeo\.com)\/[\w\-/?&=]+/)
686
+ .message('Each video URL must be a valid YouTube or Vimeo link'))
687
+ .max(3)
688
+ .optional(),
682
689
  logoUrl: Joi.string().optional().allow(''),
683
690
  dist: distSchema.optional(),
684
691
  stats: statsSchema.optional(),
@@ -119,6 +119,7 @@ export interface TBlockletMeta {
119
119
  };
120
120
  title?: TTitle | '';
121
121
  version: string;
122
+ videos?: string[];
122
123
  }
123
124
  export type TBlockletName = string;
124
125
  export interface TComponent {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.34-beta-20241212-152152-0b8d4bb3",
6
+ "version": "1.16.34-beta-20241213-135509-c2832f80",
7
7
  "description": "Library to parse/validate/fix blocklet meta",
8
8
  "main": "./lib/index.js",
9
9
  "typings": "./lib/index.d.ts",
@@ -25,12 +25,12 @@
25
25
  "author": "wangshijun <wangshijun2020@gmail.com> (http://github.com/wangshijun)",
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@abtnode/constant": "1.16.34-beta-20241212-152152-0b8d4bb3",
28
+ "@abtnode/constant": "1.16.34-beta-20241213-135509-c2832f80",
29
29
  "@arcblock/did": "1.18.161",
30
30
  "@arcblock/did-ext": "1.18.161",
31
31
  "@arcblock/did-util": "1.18.161",
32
32
  "@arcblock/jwt": "1.18.161",
33
- "@blocklet/constant": "1.16.34-beta-20241212-152152-0b8d4bb3",
33
+ "@blocklet/constant": "1.16.34-beta-20241213-135509-c2832f80",
34
34
  "@ocap/asset": "1.18.161",
35
35
  "@ocap/mcrypto": "1.18.161",
36
36
  "@ocap/types": "1.18.161",
@@ -79,5 +79,5 @@
79
79
  "ts-node": "^10.9.1",
80
80
  "typescript": "^5.6.3"
81
81
  },
82
- "gitHead": "999b6d7c9e4458844d001671bb9d538255307fc5"
82
+ "gitHead": "9e8b37f36d17a288a66ccc05e92c8f87825eeb57"
83
83
  }