@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260831113446 → 0.8.1-dev.20260901043813

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.
@@ -736,8 +736,42 @@ var CommentFileNode_default = CommentFileNode;
736
736
 
737
737
  // src/components/controls/view/CommentNodeRenderer.tsx
738
738
  import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
739
+ var LINK_STYLE = { textDecoration: "underline", wordBreak: "break-word" };
740
+ var URL_PATTERN = /(https?:\/\/[^\s<>"']+|www\.[^\s<>"']+)/gi;
741
+ var linkifyText = (text, keyPrefix) => {
742
+ const parts = text.split(URL_PATTERN);
743
+ if (parts.length === 1) {
744
+ return text;
745
+ }
746
+ return parts.map((part, index) => {
747
+ if (!part) {
748
+ return null;
749
+ }
750
+ const isUrl = index % 2 === 1;
751
+ if (!isUrl) {
752
+ return /* @__PURE__ */ jsx6(React3.Fragment, { children: part }, `${keyPrefix}-${index}`);
753
+ }
754
+ const trimmed = part.replace(/[.,;:!?)\]]+$/, "");
755
+ const trailing = part.slice(trimmed.length);
756
+ const href = trimmed.startsWith("www.") ? `https://${trimmed}` : trimmed;
757
+ return /* @__PURE__ */ jsxs5(React3.Fragment, { children: [
758
+ /* @__PURE__ */ jsx6(
759
+ "a",
760
+ {
761
+ href,
762
+ target: "_blank",
763
+ rel: "noopener noreferrer nofollow ugc",
764
+ className: "comment-node-link bg-info-weak",
765
+ style: LINK_STYLE,
766
+ children: trimmed
767
+ }
768
+ ),
769
+ trailing
770
+ ] }, `${keyPrefix}-${index}`);
771
+ });
772
+ };
739
773
  var TextLeafNode = ({ node }) => {
740
- let content = node.text;
774
+ let content = node.code ? node.text : linkifyText(node.text ?? "", node.id ?? "comment-text");
741
775
  if (node.code) content = /* @__PURE__ */ jsx6("code", { className: "comment-node-code", children: content });
742
776
  if (node.bold) content = /* @__PURE__ */ jsx6("strong", { children: content });
743
777
  if (node.italic) content = /* @__PURE__ */ jsx6("em", { children: content });
@@ -813,7 +847,17 @@ var CommentNodeRenderer = ({ node, assetBaseUrl }) => {
813
847
  return /* @__PURE__ */ jsx6(CommentFileNode_default, { node: element, assetBaseUrl });
814
848
  case "link": {
815
849
  const url = typeof element.url === "string" ? element.url : "#";
816
- return /* @__PURE__ */ jsx6("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: "comment-node-link", children: renderChildren(element.children, key, assetBaseUrl) });
850
+ return /* @__PURE__ */ jsx6(
851
+ "a",
852
+ {
853
+ href: url,
854
+ target: "_blank",
855
+ rel: "noopener noreferrer",
856
+ className: "comment-node-link bg-info-weak",
857
+ style: LINK_STYLE,
858
+ children: renderChildren(element.children, key, assetBaseUrl)
859
+ }
860
+ );
817
861
  }
818
862
  case "mention": {
819
863
  const label = element.label ?? element.mentionName ?? element.text ?? "";
@@ -738,8 +738,42 @@ var CommentFileNode_default = CommentFileNode;
738
738
 
739
739
  // src/components/controls/view/CommentNodeRenderer.tsx
740
740
  import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
741
+ var LINK_STYLE = { textDecoration: "underline", wordBreak: "break-word" };
742
+ var URL_PATTERN = /(https?:\/\/[^\s<>"']+|www\.[^\s<>"']+)/gi;
743
+ var linkifyText = (text, keyPrefix) => {
744
+ const parts = text.split(URL_PATTERN);
745
+ if (parts.length === 1) {
746
+ return text;
747
+ }
748
+ return parts.map((part, index) => {
749
+ if (!part) {
750
+ return null;
751
+ }
752
+ const isUrl = index % 2 === 1;
753
+ if (!isUrl) {
754
+ return /* @__PURE__ */ jsx6(React3.Fragment, { children: part }, `${keyPrefix}-${index}`);
755
+ }
756
+ const trimmed = part.replace(/[.,;:!?)\]]+$/, "");
757
+ const trailing = part.slice(trimmed.length);
758
+ const href = trimmed.startsWith("www.") ? `https://${trimmed}` : trimmed;
759
+ return /* @__PURE__ */ jsxs5(React3.Fragment, { children: [
760
+ /* @__PURE__ */ jsx6(
761
+ "a",
762
+ {
763
+ href,
764
+ target: "_blank",
765
+ rel: "noopener noreferrer nofollow ugc",
766
+ className: "comment-node-link bg-info-weak",
767
+ style: LINK_STYLE,
768
+ children: trimmed
769
+ }
770
+ ),
771
+ trailing
772
+ ] }, `${keyPrefix}-${index}`);
773
+ });
774
+ };
741
775
  var TextLeafNode = ({ node }) => {
742
- let content = node.text;
776
+ let content = node.code ? node.text : linkifyText(node.text ?? "", node.id ?? "comment-text");
743
777
  if (node.code) content = /* @__PURE__ */ jsx6("code", { className: "comment-node-code", children: content });
744
778
  if (node.bold) content = /* @__PURE__ */ jsx6("strong", { children: content });
745
779
  if (node.italic) content = /* @__PURE__ */ jsx6("em", { children: content });
@@ -815,7 +849,17 @@ var CommentNodeRenderer = ({ node, assetBaseUrl }) => {
815
849
  return /* @__PURE__ */ jsx6(CommentFileNode_default, { node: element, assetBaseUrl });
816
850
  case "link": {
817
851
  const url = typeof element.url === "string" ? element.url : "#";
818
- return /* @__PURE__ */ jsx6("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: "comment-node-link", children: renderChildren(element.children, key, assetBaseUrl) });
852
+ return /* @__PURE__ */ jsx6(
853
+ "a",
854
+ {
855
+ href: url,
856
+ target: "_blank",
857
+ rel: "noopener noreferrer",
858
+ className: "comment-node-link bg-info-weak",
859
+ style: LINK_STYLE,
860
+ children: renderChildren(element.children, key, assetBaseUrl)
861
+ }
862
+ );
819
863
  }
820
864
  case "mention": {
821
865
  const label = element.label ?? element.mentionName ?? element.text ?? "";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  InputControlType_default
4
- } from "./chunk-4R7F7LBL.mjs";
4
+ } from "./chunk-IEY342PD.mjs";
5
5
 
6
6
  // src/components/pageRenderingEngine/nodes/DataBindingControls.tsx
7
7
  import { useCallback, useEffect, useRef, useState } from "react";
@@ -9,7 +9,7 @@ import { useRouter } from "next/navigation";
9
9
 
10
10
  // src/components/controls/edit/InputControl.tsx
11
11
  import dynamic from "next/dynamic";
12
- var InputControl = dynamic(() => import("./InputControlClient-XC24HYZX.mjs"), {
12
+ var InputControl = dynamic(() => import("./InputControlClient-HDT3N6ZI.mjs"), {
13
13
  ssr: false
14
14
  });
15
15
  var InputControl_default = InputControl;
@@ -3,10 +3,10 @@
3
3
  "use client";
4
4
  import {
5
5
  InputControl_default
6
- } from "./chunk-GGG5MJLN.mjs";
6
+ } from "./chunk-37F2HMKK.mjs";
7
7
  import {
8
8
  InputControlType_default
9
- } from "./chunk-E4VOFO5Q.mjs";
9
+ } from "./chunk-DTWPZPSX.mjs";
10
10
 
11
11
  // src/components/pageRenderingEngine/nodes/DataBindingControls.tsx
12
12
  import { useCallback, useEffect, useRef, useState } from "react";