@flytedan/flytebot-design-system 0.68.0 → 0.70.0

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.
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/markdown.ts
21
+ var markdown_exports = {};
22
+ __export(markdown_exports, {
23
+ escapeMarkdown: () => escapeMarkdown
24
+ });
25
+ module.exports = __toCommonJS(markdown_exports);
26
+
27
+ // src/components/data/markdownEscape.ts
28
+ function escapeMarkdown(text) {
29
+ return String(text == null ? "" : text).replace(/\r\n?/g, "\n").replace(/[\\`*_[\]()<>!|~^]/g, "\\$&").replace(/\b(https?|mailto|tel):/gi, "$1\\:").split("\n").map(
30
+ (line) => line.replace(/^(\s*)([#>+-])/, "$1\\$2").replace(/^(\s*\d{1,9})([.)])/, "$1\\$2")
31
+ // task item `[ ]` is already covered by escaping `[`
32
+ ).join("\n");
33
+ }
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ escapeMarkdown
37
+ });
38
+ //# sourceMappingURL=markdown.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/markdown.ts","../src/components/data/markdownEscape.ts"],"sourcesContent":["// React-free entry (`@flytedan/flytebot-design-system/markdown`): safe to import on a server.\nexport { escapeMarkdown } from \"./components/data/markdownEscape\";\n","/* DS-7: the one definition of the markdown escape rule, shared by the renderer\n (Markdown.tsx) and by `escapeMarkdown` (a React-free entry, so a server can import it). */\n\n/** CommonMark: a backslash before any ASCII punctuation character makes it literal. */\nexport const ESCAPABLE = /\\\\([!-/:-@[-`{-~])/g;\n\n/* An escaped character is swapped for a private-use stand-in (U+E000 + its code) before any\n syntax pattern runs, so no pattern can see it, then swapped back where text is emitted. */\nconst STAND_IN_BASE = 0xe000;\nconst STAND_IN = /[-]/g;\n\n/** Hide every escaped character from the syntax patterns. Stray stand-ins already in the input are neutralised first. */\nexport const hideEscapes = (s: string): string =>\n s.replace(STAND_IN, \"�\").replace(ESCAPABLE, (_, c: string) => String.fromCharCode(STAND_IN_BASE + c.charCodeAt(0)));\n\n/** Put escaped characters back as the literal character. */\nexport const showEscapes = (s: string): string => s.replace(STAND_IN, (c) => String.fromCharCode(c.charCodeAt(0) - STAND_IN_BASE));\n\n/** Put escaped characters back with their backslash (a code span keeps its source verbatim). */\nexport const showEscapesRaw = (s: string): string => s.replace(STAND_IN, (c) => \"\\\\\" + String.fromCharCode(c.charCodeAt(0) - STAND_IN_BASE));\n\n/**\n * Backslash-escape text so `Markdown` / `MarkdownInline` render it as exactly that text:\n * every character the renderer reads as inline syntax, the `:` that starts a bare-URL or\n * mailto autolink, and any block marker (heading, quote, list, rule, table, fence) at the\n * start of a line.\n */\nexport function escapeMarkdown(text: string): string {\n return String(text == null ? \"\" : text)\n .replace(/\\r\\n?/g, \"\\n\")\n .replace(/[\\\\`*_[\\]()<>!|~^]/g, \"\\\\$&\")\n .replace(/\\b(https?|mailto|tel):/gi, \"$1\\\\:\")\n .split(\"\\n\")\n .map((line) =>\n line\n // heading, quote, bullet, rule, fence-like markers: escape the first marker character\n .replace(/^(\\s*)([#>+-])/, \"$1\\\\$2\")\n // ordered list: escape the dot or paren after the number\n .replace(/^(\\s*\\d{1,9})([.)])/, \"$1\\\\$2\")\n // task item `[ ]` is already covered by escaping `[`\n )\n .join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC2BO,SAAS,eAAe,MAAsB;AACnD,SAAO,OAAO,QAAQ,OAAO,KAAK,IAAI,EACnC,QAAQ,UAAU,IAAI,EACtB,QAAQ,uBAAuB,MAAM,EACrC,QAAQ,4BAA4B,OAAO,EAC3C,MAAM,IAAI,EACV;AAAA,IAAI,CAAC,SACJ,KAEG,QAAQ,kBAAkB,QAAQ,EAElC,QAAQ,uBAAuB,QAAQ;AAAA;AAAA,EAE5C,EACC,KAAK,IAAI;AACd;","names":[]}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Backslash-escape text so `Markdown` / `MarkdownInline` render it as exactly that text:
3
+ * every character the renderer reads as inline syntax, the `:` that starts a bare-URL or
4
+ * mailto autolink, and any block marker (heading, quote, list, rule, table, fence) at the
5
+ * start of a line.
6
+ */
7
+ declare function escapeMarkdown(text: string): string;
8
+
9
+ export { escapeMarkdown };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Backslash-escape text so `Markdown` / `MarkdownInline` render it as exactly that text:
3
+ * every character the renderer reads as inline syntax, the `:` that starts a bare-URL or
4
+ * mailto autolink, and any block marker (heading, quote, list, rule, table, fence) at the
5
+ * start of a line.
6
+ */
7
+ declare function escapeMarkdown(text: string): string;
8
+
9
+ export { escapeMarkdown };
@@ -0,0 +1,7 @@
1
+ import {
2
+ escapeMarkdown
3
+ } from "./chunk-OVTWSE43.js";
4
+ export {
5
+ escapeMarkdown
6
+ };
7
+ //# sourceMappingURL=markdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flytedan/flytebot-design-system",
3
- "version": "0.68.0",
3
+ "version": "0.70.0",
4
4
  "description": "flytedesk Design System — shared component library, tokens, and business-logic kits for flytedesk apps.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -34,6 +34,11 @@
34
34
  "import": "./dist/index.js",
35
35
  "require": "./dist/index.cjs"
36
36
  },
37
+ "./markdown": {
38
+ "types": "./dist/markdown.d.ts",
39
+ "import": "./dist/markdown.js",
40
+ "require": "./dist/markdown.cjs"
41
+ },
37
42
  "./styles/*.css": "./styles/*.css",
38
43
  "./assets/*": "./assets/*"
39
44
  },
@@ -668,6 +668,12 @@
668
668
  box-shadow: 0 0 0 1px var(--blue-500);
669
669
  }
670
670
 
671
+ .fd-choice-badge { margin-left: 8px; }
672
+ .fd-radiogroup { display: flex; flex-direction: column; gap: 8px; }
673
+ .fd-radiogroup-label { font-weight: var(--w-medium); }
674
+ .fd-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
675
+ .fd-fieldset[aria-busy="true"] { opacity: 0.6; }
676
+
671
677
  /* ============ Switch ============ */
672
678
  .fd-switch {
673
679
  position: relative;
@@ -4873,12 +4879,28 @@
4873
4879
  text-wrap: pretty;
4874
4880
  min-width: 0;
4875
4881
  }
4876
- .fd-md > * + * {
4877
- margin-top: 10px;
4882
+ .fd-md--small {
4883
+ font-size: var(--body-sm-size);
4884
+ }
4885
+ .fd-md--muted {
4886
+ color: var(--chat-text-2);
4887
+ }
4888
+ .fd-md-inline--body {
4889
+ font-size: var(--body-size);
4890
+ }
4891
+ .fd-md-inline--small {
4892
+ font-size: var(--body-sm-size);
4893
+ }
4894
+ .fd-md-inline--muted {
4895
+ color: var(--text-2);
4878
4896
  }
4879
4897
  .fd-md-p {
4880
4898
  margin: 0;
4881
4899
  }
4900
+ /* DS-6: after .fd-md-p so sibling spacing wins at equal specificity */
4901
+ .fd-md > * + * {
4902
+ margin-top: 10px;
4903
+ }
4882
4904
  .fd-md-h {
4883
4905
  margin: 16px 0 0;
4884
4906
  font-weight: var(--w-semibold);