@sendbird/actionbook-core 0.9.9 → 0.10.1

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/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/ast/types.ts
2
2
  var RESOURCE_TAG_TYPES = ["tool", "manual", "agent_message_template", "handoff", "time_diff", "time_difference"];
3
- var JUMP_POINT_ID_PATTERN = /^[A-Za-z_]+$/;
3
+ var JUMP_POINT_ID_PATTERN = /^[\p{L}\p{N}_-]+$/u;
4
4
 
5
5
  // src/ast/builders.ts
6
6
  var bold = () => ({ type: "bold" });
@@ -18,7 +18,7 @@ var resourceTag = (tagType, resourceId, displayText) => ({
18
18
  });
19
19
  var jumpPoint = (id) => {
20
20
  if (!JUMP_POINT_ID_PATTERN.test(id)) {
21
- throw new Error(`Invalid jump point ID: "${id}". Must match /^[A-Za-z_]+$/.`);
21
+ throw new Error(`Invalid jump point ID: "${id}". Letters, numbers, underscore, and hyphen only.`);
22
22
  }
23
23
  return { type: "jumpPoint", id };
24
24
  };
@@ -2134,7 +2134,7 @@ function resourceTagToMarkdown() {
2134
2134
  }
2135
2135
 
2136
2136
  // src/markdown/plugins/jumpPoint.ts
2137
- var JUMP_POINT_RE = /\^([A-Za-z_]+)\^/g;
2137
+ var JUMP_POINT_RE = /\^([\p{L}\p{N}_-]+)\^/gu;
2138
2138
  function splitTextWithJumpPoints(text2) {
2139
2139
  const results = [];
2140
2140
  let lastIndex = 0;
@@ -4325,7 +4325,7 @@ var duplicateJumpPoints = {
4325
4325
  };
4326
4326
 
4327
4327
  // src/lint/rules/jumpPointRefValidity.ts
4328
- var JUMP_REF_PATTERN = /#([A-Za-z_]+)/g;
4328
+ var JUMP_REF_PATTERN = /#([\p{L}\p{N}_-]+)/gu;
4329
4329
  var jumpPointRefValidity = {
4330
4330
  id: "jump-point-ref-validity",
4331
4331
  description: "Detects references to non-existent jump point IDs",
@@ -4349,7 +4349,7 @@ var jumpPointRefValidity = {
4349
4349
  const t = node;
4350
4350
  const linkMark = t.marks?.find((m2) => m2.type === "link");
4351
4351
  if (linkMark && linkMark.type === "link") {
4352
- const match = /^#([A-Za-z_]+)$/.exec(linkMark.href);
4352
+ const match = /^#([\p{L}\p{N}_-]+)$/u.exec(linkMark.href);
4353
4353
  if (match) {
4354
4354
  refs.push({ id: match[1] });
4355
4355
  }
@@ -4848,7 +4848,7 @@ function classifyNode(node) {
4848
4848
  }
4849
4849
  function hasSpeechContent(node) {
4850
4850
  for (const line of node.lines) {
4851
- const stripped = line.content.replace(/\{\{[^}]+\}\}/g, "").replace(/\^[A-Za-z_]+\^/g, "").replace(/\[[^\]]*\]\(#[^)]+\)/g, "").trim();
4851
+ const stripped = line.content.replace(/\{\{[^}]+\}\}/g, "").replace(/\^[\p{L}\p{N}_-]+\^/gu, "").replace(/\[[^\]]*\]\(#[^)]+\)/g, "").trim();
4852
4852
  if (stripped.length > 0) return true;
4853
4853
  }
4854
4854
  return false;