agentic-ui-libs 1.0.0-beta.1 → 1.0.0-beta.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"PromptEditor.d.ts","sourceRoot":"","sources":["../../../src/features/prompt-editor/PromptEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAA2D,MAAM,SAAS,CAAC;AAG1G,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,KAAgB,EAChB,aAAa,EACb,IAAe,EACf,YAAY,EACZ,QAAQ,EACR,SAAc,EACd,eAAe,EACf,UAAkB,EAClB,UAAU,EACV,YAAY,EACZ,WAAW,GACZ,EAAE,iBAAiB,GAAG;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,CAAC;CACH,2CA8qBA"}
1
+ {"version":3,"file":"PromptEditor.d.ts","sourceRoot":"","sources":["../../../src/features/prompt-editor/PromptEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAA2D,MAAM,SAAS,CAAC;AAG1G,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,KAAgB,EAChB,aAAa,EACb,IAAe,EACf,YAAY,EACZ,QAAQ,EACR,SAAc,EACd,eAAe,EACf,UAAkB,EAClB,UAAU,EACV,YAAY,EACZ,WAAW,GACZ,EAAE,iBAAiB,GAAG;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,CAAC;CACH,2CAqrBA"}
@@ -1 +1 @@
1
- {"version":3,"file":"EditorUtils.d.ts","sourceRoot":"","sources":["../../../../src/features/prompt-editor/services/EditorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAqBvD;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA0CnD;AAGD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,MAAM,EACxB,cAAc,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAC9C,YAAY,GAAE,MAAY,GACzB;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAgEA;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,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AY,EAAE,EAAE,KAAK,GAAE,MAAU,GAAG,MAAM,CA8BlF;AAGD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CASrD"}
package/dist/index.js CHANGED
@@ -4746,9 +4746,9 @@ var isNullish = function isNullish2(value) {
4746
4746
  var isNumOrStr = function isNumOrStr2(value) {
4747
4747
  return isNumber(value) || isString$1(value);
4748
4748
  };
4749
- var idCounter = 0;
4749
+ var idCounter$1 = 0;
4750
4750
  var uniqueId = function uniqueId2(prefix2) {
4751
- var id = ++idCounter;
4751
+ var id = ++idCounter$1;
4752
4752
  return "".concat(prefix2 || "").concat(id);
4753
4753
  };
4754
4754
  var getPercentValue = function getPercentValue2(percent, totalValue) {
@@ -38850,6 +38850,11 @@ function findOriginalPosition(originalText, normalizedText, normalizedIndex) {
38850
38850
  }
38851
38851
  return originalPos;
38852
38852
  }
38853
+ let idCounter = 0;
38854
+ function generateUniqueId(prefix2 = "content") {
38855
+ idCounter++;
38856
+ return `${prefix2}-${Date.now()}-${idCounter}-${Math.random().toString(36).substr(2, 9)}`;
38857
+ }
38853
38858
  function parseMarkdownToBlocks(markdown, depth = 0) {
38854
38859
  const blocks = [];
38855
38860
  const lines = markdown.split("\n");
@@ -38883,7 +38888,7 @@ function parseMarkdownToBlocks(markdown, depth = 0) {
38883
38888
  }
38884
38889
  if (headingLevel !== null) {
38885
38890
  const subsectionBlock = {
38886
- id: `content-${Date.now()}-${Math.random()}`,
38891
+ id: generateUniqueId("subsection"),
38887
38892
  type: "subsection",
38888
38893
  content: markdownToHtml(subsectionTitle),
38889
38894
  headingLevel,
@@ -38904,7 +38909,7 @@ function parseMarkdownToBlocks(markdown, depth = 0) {
38904
38909
  }
38905
38910
  if (!subsectionBlock.children || subsectionBlock.children.length === 0) {
38906
38911
  subsectionBlock.children = [{
38907
- id: `content-${Date.now()}-child`,
38912
+ id: generateUniqueId("child"),
38908
38913
  type: "text",
38909
38914
  content: ""
38910
38915
  }];
@@ -38926,7 +38931,7 @@ function parseMarkdownToBlocks(markdown, depth = 0) {
38926
38931
  }
38927
38932
  const listHtml = "<ul>" + listItems.map((item) => `<li>${markdownToHtml(item)}</li>`).join("") + "</ul>";
38928
38933
  blocks.push({
38929
- id: `content-${Date.now()}-${Math.random()}`,
38934
+ id: generateUniqueId("list"),
38930
38935
  type: "text",
38931
38936
  content: listHtml,
38932
38937
  listType: "bulleted"
@@ -38952,7 +38957,7 @@ function parseMarkdownToBlocks(markdown, depth = 0) {
38952
38957
  }
38953
38958
  const listHtml = "<ol>" + listItems.map((item) => `<li>${markdownToHtml(item)}</li>`).join("") + "</ol>";
38954
38959
  blocks.push({
38955
- id: `content-${Date.now()}-${Math.random()}`,
38960
+ id: generateUniqueId("list"),
38956
38961
  type: "text",
38957
38962
  content: listHtml,
38958
38963
  listType: "numbered"
@@ -38971,7 +38976,7 @@ function parseMarkdownToBlocks(markdown, depth = 0) {
38971
38976
  }
38972
38977
  if (textLines.length > 0) {
38973
38978
  blocks.push({
38974
- id: `content-${Date.now()}-${Math.random()}`,
38979
+ id: generateUniqueId("text"),
38975
38980
  type: "text",
38976
38981
  content: markdownToHtml(textLines.join("\n"))
38977
38982
  });
@@ -38979,7 +38984,7 @@ function parseMarkdownToBlocks(markdown, depth = 0) {
38979
38984
  }
38980
38985
  if (blocks.length === 0) {
38981
38986
  blocks.push({
38982
- id: `content-${Date.now()}`,
38987
+ id: generateUniqueId("text"),
38983
38988
  type: "text",
38984
38989
  content: ""
38985
38990
  });
@@ -40240,15 +40245,20 @@ function PromptEditor({
40240
40245
  if (type === "subsection" && parentId) {
40241
40246
  headingLevel = findParentAndGetHeadingLevel(internalValue, parentId) ?? 1;
40242
40247
  }
40248
+ const generateUniqueId2 = (prefix2 = "content") => {
40249
+ const counter = Date.now();
40250
+ const random = Math.random().toString(36).substr(2, 9);
40251
+ return `${prefix2}-${counter}-${random}`;
40252
+ };
40243
40253
  const newBlock = {
40244
- id: `content-${Date.now()}`,
40254
+ id: generateUniqueId2("block"),
40245
40255
  type,
40246
40256
  content: initialContent !== void 0 ? initialContent : "",
40247
40257
  listType,
40248
40258
  headingLevel: type === "subsection" ? headingLevel : void 0,
40249
40259
  children: type === "subsection" ? [
40250
40260
  {
40251
- id: `content-${Date.now()}-child`,
40261
+ id: generateUniqueId2("child"),
40252
40262
  type: "text",
40253
40263
  content: ""
40254
40264
  }
@@ -4764,9 +4764,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4764
4764
  var isNumOrStr = function isNumOrStr2(value) {
4765
4765
  return isNumber(value) || isString$1(value);
4766
4766
  };
4767
- var idCounter = 0;
4767
+ var idCounter$1 = 0;
4768
4768
  var uniqueId = function uniqueId2(prefix2) {
4769
- var id = ++idCounter;
4769
+ var id = ++idCounter$1;
4770
4770
  return "".concat(prefix2 || "").concat(id);
4771
4771
  };
4772
4772
  var getPercentValue = function getPercentValue2(percent, totalValue) {
@@ -38868,6 +38868,11 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
38868
38868
  }
38869
38869
  return originalPos;
38870
38870
  }
38871
+ let idCounter = 0;
38872
+ function generateUniqueId(prefix2 = "content") {
38873
+ idCounter++;
38874
+ return `${prefix2}-${Date.now()}-${idCounter}-${Math.random().toString(36).substr(2, 9)}`;
38875
+ }
38871
38876
  function parseMarkdownToBlocks(markdown, depth = 0) {
38872
38877
  const blocks = [];
38873
38878
  const lines = markdown.split("\n");
@@ -38901,7 +38906,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
38901
38906
  }
38902
38907
  if (headingLevel !== null) {
38903
38908
  const subsectionBlock = {
38904
- id: `content-${Date.now()}-${Math.random()}`,
38909
+ id: generateUniqueId("subsection"),
38905
38910
  type: "subsection",
38906
38911
  content: markdownToHtml(subsectionTitle),
38907
38912
  headingLevel,
@@ -38922,7 +38927,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
38922
38927
  }
38923
38928
  if (!subsectionBlock.children || subsectionBlock.children.length === 0) {
38924
38929
  subsectionBlock.children = [{
38925
- id: `content-${Date.now()}-child`,
38930
+ id: generateUniqueId("child"),
38926
38931
  type: "text",
38927
38932
  content: ""
38928
38933
  }];
@@ -38944,7 +38949,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
38944
38949
  }
38945
38950
  const listHtml = "<ul>" + listItems.map((item) => `<li>${markdownToHtml(item)}</li>`).join("") + "</ul>";
38946
38951
  blocks.push({
38947
- id: `content-${Date.now()}-${Math.random()}`,
38952
+ id: generateUniqueId("list"),
38948
38953
  type: "text",
38949
38954
  content: listHtml,
38950
38955
  listType: "bulleted"
@@ -38970,7 +38975,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
38970
38975
  }
38971
38976
  const listHtml = "<ol>" + listItems.map((item) => `<li>${markdownToHtml(item)}</li>`).join("") + "</ol>";
38972
38977
  blocks.push({
38973
- id: `content-${Date.now()}-${Math.random()}`,
38978
+ id: generateUniqueId("list"),
38974
38979
  type: "text",
38975
38980
  content: listHtml,
38976
38981
  listType: "numbered"
@@ -38989,7 +38994,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
38989
38994
  }
38990
38995
  if (textLines.length > 0) {
38991
38996
  blocks.push({
38992
- id: `content-${Date.now()}-${Math.random()}`,
38997
+ id: generateUniqueId("text"),
38993
38998
  type: "text",
38994
38999
  content: markdownToHtml(textLines.join("\n"))
38995
39000
  });
@@ -38997,7 +39002,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
38997
39002
  }
38998
39003
  if (blocks.length === 0) {
38999
39004
  blocks.push({
39000
- id: `content-${Date.now()}`,
39005
+ id: generateUniqueId("text"),
39001
39006
  type: "text",
39002
39007
  content: ""
39003
39008
  });
@@ -40258,15 +40263,20 @@ ${actualTextToRefine}` : instruction,
40258
40263
  if (type === "subsection" && parentId) {
40259
40264
  headingLevel = findParentAndGetHeadingLevel(internalValue, parentId) ?? 1;
40260
40265
  }
40266
+ const generateUniqueId2 = (prefix2 = "content") => {
40267
+ const counter = Date.now();
40268
+ const random = Math.random().toString(36).substr(2, 9);
40269
+ return `${prefix2}-${counter}-${random}`;
40270
+ };
40261
40271
  const newBlock = {
40262
- id: `content-${Date.now()}`,
40272
+ id: generateUniqueId2("block"),
40263
40273
  type,
40264
40274
  content: initialContent !== void 0 ? initialContent : "",
40265
40275
  listType,
40266
40276
  headingLevel: type === "subsection" ? headingLevel : void 0,
40267
40277
  children: type === "subsection" ? [
40268
40278
  {
40269
- id: `content-${Date.now()}-child`,
40279
+ id: generateUniqueId2("child"),
40270
40280
  type: "text",
40271
40281
  content: ""
40272
40282
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-ui-libs",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.2",
4
4
  "type": "module",
5
5
  "description": "A modular, config-driven analytics library for React and Angular applications",
6
6
  "main": "dist/index.js",