@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260831063450 → 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 });
@@ -776,8 +810,18 @@ var CommentNodeRenderer = ({ node, assetBaseUrl }) => {
776
810
  const element = asElementNode(node);
777
811
  const key = element.id ?? element.type;
778
812
  switch (element.type) {
779
- case "paragraph":
780
- return /* @__PURE__ */ jsx6("p", { className: "comment-node-paragraph", children: renderChildren(element.children, key, assetBaseUrl) ?? /* @__PURE__ */ jsx6("br", {}) });
813
+ case "paragraph": {
814
+ const paragraphChildren = element.children ?? [];
815
+ const isEmptyParagraph = paragraphChildren.length === 0 || paragraphChildren.every((child) => isTextNode(child) && (child.text ?? "").length === 0);
816
+ return /* @__PURE__ */ jsx6(
817
+ "p",
818
+ {
819
+ className: "comment-node-paragraph",
820
+ style: { margin: 0, whiteSpace: "pre-wrap", wordBreak: "break-word" },
821
+ children: isEmptyParagraph ? /* @__PURE__ */ jsx6("br", {}) : renderChildren(element.children, key, assetBaseUrl)
822
+ }
823
+ );
824
+ }
781
825
  case "heading": {
782
826
  const level = headingLevelFromTag(element.tag ?? element.level);
783
827
  const HeadingTag = `h${level}`;
@@ -803,7 +847,17 @@ var CommentNodeRenderer = ({ node, assetBaseUrl }) => {
803
847
  return /* @__PURE__ */ jsx6(CommentFileNode_default, { node: element, assetBaseUrl });
804
848
  case "link": {
805
849
  const url = typeof element.url === "string" ? element.url : "#";
806
- 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
+ );
807
861
  }
808
862
  case "mention": {
809
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 });
@@ -778,8 +812,18 @@ var CommentNodeRenderer = ({ node, assetBaseUrl }) => {
778
812
  const element = asElementNode(node);
779
813
  const key = element.id ?? element.type;
780
814
  switch (element.type) {
781
- case "paragraph":
782
- return /* @__PURE__ */ jsx6("p", { className: "comment-node-paragraph", children: renderChildren(element.children, key, assetBaseUrl) ?? /* @__PURE__ */ jsx6("br", {}) });
815
+ case "paragraph": {
816
+ const paragraphChildren = element.children ?? [];
817
+ const isEmptyParagraph = paragraphChildren.length === 0 || paragraphChildren.every((child) => isTextNode(child) && (child.text ?? "").length === 0);
818
+ return /* @__PURE__ */ jsx6(
819
+ "p",
820
+ {
821
+ className: "comment-node-paragraph",
822
+ style: { margin: 0, whiteSpace: "pre-wrap", wordBreak: "break-word" },
823
+ children: isEmptyParagraph ? /* @__PURE__ */ jsx6("br", {}) : renderChildren(element.children, key, assetBaseUrl)
824
+ }
825
+ );
826
+ }
783
827
  case "heading": {
784
828
  const level = headingLevelFromTag(element.tag ?? element.level);
785
829
  const HeadingTag = `h${level}`;
@@ -805,7 +849,17 @@ var CommentNodeRenderer = ({ node, assetBaseUrl }) => {
805
849
  return /* @__PURE__ */ jsx6(CommentFileNode_default, { node: element, assetBaseUrl });
806
850
  case "link": {
807
851
  const url = typeof element.url === "string" ? element.url : "#";
808
- 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
+ );
809
863
  }
810
864
  case "mention": {
811
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";