@get-bb/plugin-sdk 0.4.15 → 0.4.17

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.
@@ -48,6 +48,15 @@ function requireProviderId(kind, value) {
48
48
  }
49
49
  return value;
50
50
  }
51
+ var PLUGIN_TIMELINE_RENDERER_KIND_PATTERN = /^(tool|[a-z0-9-]+\/[a-z0-9-]+)$/u;
52
+ function requireTimelineRendererKind(kind, value) {
53
+ if (typeof value !== "string" || !PLUGIN_TIMELINE_RENDERER_KIND_PATTERN.test(value)) {
54
+ throw new Error(
55
+ `${kind}: "kind" must be "tool" or "<pluginId>/<name>" (lowercase letters, digits, "-"), got ${JSON.stringify(value)}`
56
+ );
57
+ }
58
+ return value;
59
+ }
51
60
  function requireMessageDirectiveId(kind, value) {
52
61
  if (typeof value !== "string" || !PLUGIN_MESSAGE_DIRECTIVE_ID_PATTERN.test(value)) {
53
62
  throw new Error(
@@ -235,6 +244,7 @@ function collectComposerCustomization(registration, seenIds, onRejected) {
235
244
  }
236
245
  export {
237
246
  PLUGIN_SLOT_ID_PATTERN,
247
+ PLUGIN_TIMELINE_RENDERER_KIND_PATTERN,
238
248
  collectComposerCustomization,
239
249
  normalizePluginThreadRowStatus,
240
250
  requireComponent,
@@ -243,5 +253,6 @@ export {
243
253
  requireOptionalString,
244
254
  requireProviderId,
245
255
  requireSlotId,
256
+ requireTimelineRendererKind,
246
257
  requireUniqueId
247
258
  };