@adminide-stack/yantra-mobile 12.0.142 → 12.0.145-alpha.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.
Files changed (118) hide show
  1. package/lib/features/attachments/displayUserMessageText.js +2 -2
  2. package/lib/features/attachments/displayUserMessageText.js.map +1 -1
  3. package/lib/features/devices/readings.js.map +1 -1
  4. package/lib/features/devices/session.js +2 -22
  5. package/lib/features/devices/session.js.map +1 -1
  6. package/lib/features/notion/NotionAgentPanel.js +987 -0
  7. package/lib/features/notion/NotionAgentPanel.js.map +1 -0
  8. package/lib/features/notion/NotionAskAiSheet.js +362 -0
  9. package/lib/features/notion/NotionAskAiSheet.js.map +1 -0
  10. package/lib/features/notion/NotionBlockView.js +4 -3
  11. package/lib/features/notion/NotionBlockView.js.map +1 -1
  12. package/lib/features/notion/NotionConnectionsSheet.js +47 -13
  13. package/lib/features/notion/NotionConnectionsSheet.js.map +1 -1
  14. package/lib/features/notion/NotionPageView.js +68 -8
  15. package/lib/features/notion/NotionPageView.js.map +1 -1
  16. package/lib/features/notion/NotionSidebarSections.js +1 -1
  17. package/lib/features/notion/NotionSidebarSections.js.map +1 -1
  18. package/lib/features/notion/NotionWorkspaceView.js +14 -9
  19. package/lib/features/notion/NotionWorkspaceView.js.map +1 -1
  20. package/lib/features/notion/database/DatabaseCells.js +3 -1
  21. package/lib/features/notion/database/DatabaseCells.js.map +1 -1
  22. package/lib/features/notion/database/DatabaseDateLayouts.js +1 -1
  23. package/lib/features/notion/database/DatabaseDateLayouts.js.map +1 -1
  24. package/lib/features/notion/database/NotionDatabaseView.js +1 -1
  25. package/lib/features/notion/database/NotionDatabaseView.js.map +1 -1
  26. package/lib/features/notion/notionAgentRunStatus.js +2 -2
  27. package/lib/features/notion/notionAgentRunStatus.js.map +1 -1
  28. package/lib/features/notion/notionAgentRuns.js +57 -0
  29. package/lib/features/notion/notionAgentRuns.js.map +1 -0
  30. package/lib/features/notion/notionAiContext.js +91 -0
  31. package/lib/features/notion/notionAiContext.js.map +1 -0
  32. package/lib/features/notion/notionConnections.js +42 -4
  33. package/lib/features/notion/notionConnections.js.map +1 -1
  34. package/lib/features/notion/notionDocuments.js +61 -1
  35. package/lib/features/notion/notionDocuments.js.map +1 -1
  36. package/lib/features/notion/notionNotesAgent.js +173 -3
  37. package/lib/features/notion/notionNotesAgent.js.map +1 -1
  38. package/lib/features/notion/notionPageKinds.js +1 -1
  39. package/lib/features/webbuilder/WebBuilderExperience.js +229 -97
  40. package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
  41. package/lib/features/webbuilder/buildFragments.js +33 -7
  42. package/lib/features/webbuilder/buildFragments.js.map +1 -1
  43. package/lib/features/webbuilder/buildJob.js +2 -2
  44. package/lib/features/webbuilder/buildJob.js.map +1 -1
  45. package/lib/features/webbuilder/codeFiles.js +18 -1
  46. package/lib/features/webbuilder/codeFiles.js.map +1 -1
  47. package/lib/features/webbuilder/components/BottomTabs.js.map +1 -1
  48. package/lib/features/webbuilder/components/CodeView.js +134 -56
  49. package/lib/features/webbuilder/components/CodeView.js.map +1 -1
  50. package/lib/features/webbuilder/components/Composer.js +2 -2
  51. package/lib/features/webbuilder/components/Composer.js.map +1 -1
  52. package/lib/features/webbuilder/components/PreviewFrame.js +19 -3
  53. package/lib/features/webbuilder/components/PreviewFrame.js.map +1 -1
  54. package/lib/features/webbuilder/components/PreviewScreen.js +310 -46
  55. package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
  56. package/lib/features/webbuilder/components/ProjectChat.js +141 -12
  57. package/lib/features/webbuilder/components/ProjectChat.js.map +1 -1
  58. package/lib/features/webbuilder/components/ProjectSheets.js +792 -0
  59. package/lib/features/webbuilder/components/ProjectSheets.js.map +1 -0
  60. package/lib/features/webbuilder/components/ProjectsScreen.js +14 -2
  61. package/lib/features/webbuilder/components/ProjectsScreen.js.map +1 -1
  62. package/lib/features/webbuilder/components/PublishSheet.js +914 -58
  63. package/lib/features/webbuilder/components/PublishSheet.js.map +1 -1
  64. package/lib/features/webbuilder/components/TemplateCard.js +9 -6
  65. package/lib/features/webbuilder/components/TemplateCard.js.map +1 -1
  66. package/lib/features/webbuilder/components/TemplatesSheet.js +5 -17
  67. package/lib/features/webbuilder/components/TemplatesSheet.js.map +1 -1
  68. package/lib/features/webbuilder/connectorTemplates.js +171 -0
  69. package/lib/features/webbuilder/connectorTemplates.js.map +1 -0
  70. package/lib/features/webbuilder/fileTree.js +163 -0
  71. package/lib/features/webbuilder/fileTree.js.map +1 -0
  72. package/lib/features/webbuilder/followUps.js +67 -0
  73. package/lib/features/webbuilder/followUps.js.map +1 -0
  74. package/lib/features/webbuilder/previewProbe.js +49 -0
  75. package/lib/features/webbuilder/previewProbe.js.map +1 -0
  76. package/lib/features/webbuilder/previewRoutes.js +156 -0
  77. package/lib/features/webbuilder/previewRoutes.js.map +1 -0
  78. package/lib/features/webbuilder/projectTools.js +341 -0
  79. package/lib/features/webbuilder/projectTools.js.map +1 -0
  80. package/lib/features/webbuilder/publishTools.js +475 -0
  81. package/lib/features/webbuilder/publishTools.js.map +1 -0
  82. package/lib/features/webbuilder/sleepNotice.js +13 -0
  83. package/lib/features/webbuilder/sleepNotice.js.map +1 -0
  84. package/lib/features/webbuilder/stepLabels.js +37 -7
  85. package/lib/features/webbuilder/stepLabels.js.map +1 -1
  86. package/lib/features/webbuilder/studioCatalog.js +5 -1
  87. package/lib/features/webbuilder/studioCatalog.js.map +1 -1
  88. package/lib/features/webbuilder/templateCatalog.js +140 -0
  89. package/lib/features/webbuilder/templateCatalog.js.map +1 -0
  90. package/lib/features/webbuilder/webbuilderPrompts.js +31 -5
  91. package/lib/features/webbuilder/webbuilderPrompts.js.map +1 -1
  92. package/lib/features/webbuilder/workflow.js +8 -4
  93. package/lib/features/webbuilder/workflow.js.map +1 -1
  94. package/lib/screens/Devices/index.js +3 -205
  95. package/lib/screens/Devices/index.js.map +1 -1
  96. package/lib/screens/WebBuilderNative/codeWorkspaceApi.js +9 -6
  97. package/lib/screens/WebBuilderNative/codeWorkspaceApi.js.map +1 -1
  98. package/lib/screens/WebBuilderNative/index.js +1 -1
  99. package/lib/screens/WebBuilderNative/index.js.map +1 -1
  100. package/lib/screens/WebBuilderNative/keepAlive.js +53 -3
  101. package/lib/screens/WebBuilderNative/keepAlive.js.map +1 -1
  102. package/lib/screens/WebBuilderNative/unreachableRetry.js +23 -0
  103. package/lib/screens/WebBuilderNative/unreachableRetry.js.map +1 -0
  104. package/lib/screens/WebBuilderNative/useConnectorTemplates.js +37 -0
  105. package/lib/screens/WebBuilderNative/useConnectorTemplates.js.map +1 -0
  106. package/lib/screens/WebBuilderNative/useSandboxKeepAlive.js +6 -0
  107. package/lib/screens/WebBuilderNative/useSandboxKeepAlive.js.map +1 -1
  108. package/lib/screens/WebBuilderNative/useWebBuilderHost.js +302 -40
  109. package/lib/screens/WebBuilderNative/useWebBuilderHost.js.map +1 -1
  110. package/lib/screens/WebBuilderNative/useWebBuilderJobs.js +2 -2
  111. package/lib/screens/WebBuilderNative/useWebBuilderJobs.js.map +1 -1
  112. package/lib/screens/WebBuilderNative/versionUndo.js +1 -1
  113. package/lib/screens/WebBuilderNative/versionUndo.js.map +1 -1
  114. package/lib/screens/WebBuilderNative/webbuilderTransport.js +147 -77
  115. package/lib/screens/WebBuilderNative/webbuilderTransport.js.map +1 -1
  116. package/package.json +4 -4
  117. package/lib/features/devices/bodyComposition.js +0 -116
  118. package/lib/features/devices/bodyComposition.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useState,useCallback,useEffect,useMemo,useRef}from'react';import {Platform,StyleSheet,View,Text,TextInput,ActivityIndicator,ScrollView,FlatList,Alert}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap,DIM}from'../../inbox/components/Tap.js';import {preferredFile,matchFileNames,sortTree,normalizeQuery}from'../codeFiles.js';import {CenteredState}from'./ui.js';import {highlightLines,codeLanguage,tokenColors}from'../codeHighlight.js';var __defProp = Object.defineProperty;
1
+ import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useState,useRef,useEffect,useCallback,useMemo}from'react';import {Platform,StyleSheet,View,Text,TextInput,ActivityIndicator,ScrollView,FlatList,Alert}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap,DIM}from'../../inbox/components/Tap.js';import {listErrorText,preferredFile,matchFileNames,codeUnavailableText,normalizeQuery}from'../codeFiles.js';import {CenteredState}from'./ui.js';import {highlightLines,codeLanguage,tokenColors}from'../codeHighlight.js';import {readExpandedFolders,writeExpandedFolders,withRevealed,buildFileTree,filterPaths,visibleRows,rollUp,nameMatch,withFolder}from'../fileTree.js';var __defProp = Object.defineProperty;
2
2
  var __defProps = Object.defineProperties;
3
3
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -46,34 +46,6 @@ function orderedFiles(files) {
46
46
  };
47
47
  return Object.keys(files).filter((path) => !/(^|\/)(package-lock\.json|yarn\.lock|pnpm-lock\.yaml)$/.test(path)).sort((a, b) => rank(a) - rank(b) || a.localeCompare(b));
48
48
  }
49
- function treeRows(files, collapsed) {
50
- const rows = [];
51
- const seenDirs = /* @__PURE__ */ new Set();
52
- for (const path of sortTree(files)) {
53
- const parts = path.split("/");
54
- let hidden = false;
55
- for (let i = 0; i < parts.length - 1 && !hidden; i += 1) {
56
- const dir = parts.slice(0, i + 1).join("/");
57
- if (!seenDirs.has(dir)) {
58
- seenDirs.add(dir);
59
- rows.push({
60
- kind: "dir",
61
- path: dir,
62
- name: parts[i],
63
- depth: i
64
- });
65
- }
66
- if (collapsed.has(dir)) hidden = true;
67
- }
68
- if (!hidden) rows.push({
69
- kind: "file",
70
- path,
71
- name: parts[parts.length - 1],
72
- depth: parts.length - 1
73
- });
74
- }
75
- return rows.filter((row) => !row.path.split("/").slice(0, -1).some((_, i, arr) => collapsed.has(arr.slice(0, i + 1).join("/"))));
76
- }
77
49
  function FileLines({
78
50
  text,
79
51
  path,
@@ -124,7 +96,8 @@ function FileLines({
124
96
  function PostedFiles({
125
97
  files,
126
98
  theme,
127
- onAsk
99
+ onAsk,
100
+ emptyBody
128
101
  }) {
129
102
  var _a;
130
103
  const paths = useMemo(() => files ? orderedFiles(files) : [], [files]);
@@ -134,7 +107,7 @@ function PostedFiles({
134
107
  if (!path || !paths.includes(path)) setPath((_a2 = paths[0]) != null ? _a2 : null);
135
108
  }, [paths, path]);
136
109
  if (!files || !paths.length) {
137
- return /* @__PURE__ */ jsx(CenteredState, { icon: "code-tags", title: "No code yet", body: "The site's files show here once the agent has built it.", theme, primary: {
110
+ return /* @__PURE__ */ jsx(CenteredState, { icon: "code-tags", title: "No code yet", body: emptyBody != null ? emptyBody : "The site's files show here once the agent has built it.", theme, primary: {
138
111
  label: "Ask the agent",
139
112
  onPress: onAsk
140
113
  } });
@@ -163,10 +136,32 @@ function CodeView({
163
136
  const [tab, setTab] = useState("files");
164
137
  const [tree, setTree] = useState(null);
165
138
  const [treeError, setTreeError] = useState(null);
139
+ const hasPosted = !!files && Object.keys(files).length > 0;
166
140
  const [asleep, setAsleep] = useState(false);
167
141
  const [waking, setWaking] = useState(false);
168
142
  const [loadingTree, setLoadingTree] = useState(false);
169
- const [collapsed, setCollapsed] = useState(/* @__PURE__ */ new Set());
143
+ const projectKey = (build == null ? void 0 : build.projectId) || (build == null ? void 0 : build.sandboxId) || (build == null ? void 0 : build.key) || "";
144
+ const [expanded, setExpanded] = useState(/* @__PURE__ */ new Set());
145
+ const expandedLoaded = useRef(null);
146
+ useEffect(() => {
147
+ let live = true;
148
+ expandedLoaded.current = null;
149
+ readExpandedFolders(projectKey).then((kept) => {
150
+ if (!live) return;
151
+ setExpanded((now) => now.size ? /* @__PURE__ */ new Set([...kept, ...now]) : kept);
152
+ expandedLoaded.current = projectKey;
153
+ });
154
+ return () => {
155
+ live = false;
156
+ };
157
+ }, [projectKey]);
158
+ useEffect(() => {
159
+ if (projectKey && expandedLoaded.current === projectKey) writeExpandedFolders(projectKey, expanded);
160
+ }, [projectKey, expanded]);
161
+ const [treeQuery, setTreeQuery] = useState("");
162
+ const filtering = treeQuery.trim().length > 0;
163
+ const [filterExpanded, setFilterExpanded] = useState("all");
164
+ useEffect(() => setFilterExpanded("all"), [treeQuery]);
170
165
  const [open, setOpen] = useState(null);
171
166
  const [opening, setOpening] = useState(false);
172
167
  const [focusLine, setFocusLine] = useState(null);
@@ -188,7 +183,7 @@ function CodeView({
188
183
  });
189
184
  else {
190
185
  setAsleep(Boolean(r.asleep));
191
- setTreeError(r.error || "Could not list the project files.");
186
+ setTreeError(listErrorText(r.error));
192
187
  }
193
188
  }).catch(() => setTreeError("Could not list the project files.")).finally(() => setLoadingTree(false));
194
189
  }, [code, build]);
@@ -210,6 +205,7 @@ function CodeView({
210
205
  setNotice(r.error || "Could not read the file.");
211
206
  return;
212
207
  }
208
+ setExpanded((prev) => withRevealed(prev, path));
213
209
  setOpen({
214
210
  path,
215
211
  base: (_a2 = r.content) != null ? _a2 : "",
@@ -303,8 +299,29 @@ function CodeView({
303
299
  } : {}), drafts);
304
300
  code.search(build, query, !(tree == null ? void 0 : tree.saved), openDocs).then(setResults).catch(() => setResults(null)).finally(() => setSearching(false));
305
301
  };
306
- if (!code || !build) return /* @__PURE__ */ jsx(PostedFiles, { files, theme, onAsk });
307
- const rows = tree ? treeRows(tree.files, collapsed) : [];
302
+ if (!code || !build) {
303
+ const emptyBody = build ? codeUnavailableText({
304
+ agentBuild: build.origin === "agent",
305
+ busy,
306
+ openUrl: build.liveUrl || build.previewUrl
307
+ }) : void 0;
308
+ return /* @__PURE__ */ jsx(PostedFiles, { files, theme, onAsk, emptyBody });
309
+ }
310
+ const fileTree = tree ? buildFileTree(filtering ? filterPaths(tree.files, treeQuery) : tree.files) : null;
311
+ const expansion = filtering ? filterExpanded : expanded;
312
+ const rows = fileTree ? visibleRows(fileTree, expansion) : [];
313
+ const dirtyFolders = rollUp(Object.keys(drafts).map((p) => [p, true]));
314
+ const setFolder = (folder, openIt) => {
315
+ if (filtering) {
316
+ setFilterExpanded((prev) => {
317
+ const base = prev === "all" ? new Set(rows.filter((r) => r.node.kind === "folder" && r.expanded).map((r) => r.node.path)) : prev;
318
+ return withFolder(base, folder, openIt);
319
+ });
320
+ } else {
321
+ setExpanded((prev) => withFolder(prev, folder, openIt));
322
+ }
323
+ };
324
+ const collapseAll = () => filtering ? setFilterExpanded(/* @__PURE__ */ new Set()) : setExpanded(/* @__PURE__ */ new Set());
308
325
  const header = /* @__PURE__ */ jsx(View, { style: [styles.segment, {
309
326
  backgroundColor: theme.chip
310
327
  }], children: ["files", "search"].map((value) => /* @__PURE__ */ jsxs(Tap, { onPress: () => setTab(value), accessibilityRole: "button", accessibilityState: {
@@ -451,7 +468,7 @@ function CodeView({
451
468
  ] }) : null,
452
469
  noticeBar,
453
470
  loadingTree && !tree ? /* @__PURE__ */ jsx(View, { style: styles.center, children: /* @__PURE__ */ jsx(ActivityIndicator, { color: theme.accent }) }) : null,
454
- treeError && !tree && !(asleep && files) ? /* @__PURE__ */ jsx(CenteredState, { icon: asleep ? "power-sleep" : "folder-alert-outline", title: asleep ? "The site is asleep" : "Couldn't load the files", body: treeError, theme, busy: waking, primary: asleep && onWake ? {
471
+ treeError && !tree && !hasPosted ? /* @__PURE__ */ jsx(CenteredState, { icon: asleep ? "power-sleep" : "folder-alert-outline", title: asleep ? "The site is asleep" : "Couldn't load the files", body: treeError, theme, busy: waking, primary: asleep && onWake ? {
455
472
  label: waking ? "Waking the site\u2026" : "Wake the site",
456
473
  onPress: () => {
457
474
  setWaking(true);
@@ -467,8 +484,28 @@ function CodeView({
467
484
  label: "Try again",
468
485
  onPress: loadTree
469
486
  } : void 0 }) : null,
470
- treeError && !tree && asleep && files ? /* @__PURE__ */ jsx(PostedFiles, { files, theme, onAsk }) : null,
471
- tree ? /* @__PURE__ */ jsx(FlatList, { data: rows, keyExtractor: (row) => `${row.kind}:${row.path}`, refreshing: loadingTree, onRefresh: loadTree, ListFooterComponent: tree.partial ? /* @__PURE__ */ jsxs(Text, { style: [styles.searchHint, {
487
+ treeError && !tree && hasPosted ? /* @__PURE__ */ jsx(PostedFiles, { files, theme, onAsk }) : null,
488
+ tree ? /* @__PURE__ */ jsxs(View, { style: [styles.treeBar, {
489
+ borderBottomColor: theme.border
490
+ }], children: [
491
+ /* @__PURE__ */ jsxs(View, { style: [styles.treeFilter, {
492
+ backgroundColor: theme.chip
493
+ }], children: [
494
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "filter-variant", size: 16, color: theme.muted }),
495
+ /* @__PURE__ */ jsx(TextInput, { value: treeQuery, onChangeText: setTreeQuery, placeholder: "Filter files", placeholderTextColor: theme.faint, autoCapitalize: "none", autoCorrect: false, style: [styles.treeFilterInput, {
496
+ color: theme.ink
497
+ }], accessibilityLabel: "Filter files by name", testID: "webbuilder-code-tree-filter" }),
498
+ filtering ? /* @__PURE__ */ jsx(Tap, { onPress: () => setTreeQuery(""), accessibilityRole: "button", accessibilityLabel: "Clear the filter", hitSlop: 8, pressedStyle: DIM, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "close-circle", size: 16, color: theme.faint }) }) : null
499
+ ] }),
500
+ /* @__PURE__ */ jsx(Tap, { onPress: collapseAll, disabled: !rows.some((r) => r.expanded), accessibilityRole: "button", accessibilityLabel: "Collapse all folders", style: [styles.collapseAll, !rows.some((r) => r.expanded) && styles.disabled], pressedStyle: DIM, testID: "webbuilder-code-collapse-all", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "collapse-all-outline", size: 20, color: theme.ink }) })
501
+ ] }) : null,
502
+ tree ? /* @__PURE__ */ jsx(FlatList, { data: rows, keyExtractor: (row) => `${row.node.kind}:${row.node.path}`, refreshing: loadingTree, onRefresh: loadTree, keyboardShouldPersistTaps: "handled", ListEmptyComponent: filtering ? /* @__PURE__ */ jsxs(Text, { style: [styles.searchHint, {
503
+ color: theme.muted
504
+ }], children: [
505
+ "No file name matches \u201C",
506
+ treeQuery.trim(),
507
+ "\u201D."
508
+ ] }) : null, ListFooterComponent: tree.partial ? /* @__PURE__ */ jsxs(Text, { style: [styles.searchHint, {
472
509
  color: theme.muted
473
510
  }], children: [
474
511
  "Showing the first ",
@@ -477,29 +514,40 @@ function CodeView({
477
514
  ] }) : null, renderItem: ({
478
515
  item
479
516
  }) => {
480
- const isDir = item.kind === "dir";
481
- const isCollapsed = collapsed.has(item.path);
517
+ const {
518
+ node
519
+ } = item;
520
+ const isDir = node.kind === "folder";
482
521
  let treeIcon = "file-document-outline";
483
- if (isDir) treeIcon = isCollapsed ? "folder-outline" : "folder-open-outline";
522
+ if (isDir) treeIcon = item.expanded ? "folder-open-outline" : "folder-outline";
523
+ const isOpen = !isDir && (open == null ? void 0 : open.path) === node.path;
524
+ const unsaved = isDir ? !item.expanded && dirtyFolders.has(node.path) : drafts[node.path] !== void 0;
525
+ const hit = !isDir && filtering ? nameMatch(node.name, treeQuery) : null;
484
526
  return /* @__PURE__ */ jsxs(Tap, { onPress: () => {
485
- if (isDir) {
486
- setCollapsed((prev) => {
487
- const next = new Set(prev);
488
- if (next.has(item.path)) next.delete(item.path);
489
- else next.add(item.path);
490
- return next;
491
- });
492
- } else {
493
- openFile(item.path);
494
- }
527
+ if (node.kind === "folder") setFolder(node, !item.expanded);
528
+ else openFile(node.path);
495
529
  }, style: [styles.treeRow, {
496
- paddingLeft: 16 + item.depth * 16
497
- }], pressedStyle: DIM, accessibilityRole: "button", accessibilityLabel: isDir ? `Folder ${item.name}` : `Open ${item.path}`, children: [
530
+ paddingLeft: 12 + (item.level - 1) * 16
531
+ }, isOpen && {
532
+ backgroundColor: theme.chip
533
+ }], pressedStyle: DIM, accessibilityRole: "button", accessibilityState: isDir ? {
534
+ expanded: item.expanded
535
+ } : {
536
+ selected: isOpen
537
+ }, accessibilityLabel: isDir ? `Folder ${node.name}${unsaved ? ", has unsaved changes" : ""}` : `Open ${node.path}${unsaved ? ", unsaved" : ""}`, children: [
538
+ isDir ? /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: item.expanded ? "chevron-down" : "chevron-right", size: 16, color: theme.muted }) : /* @__PURE__ */ jsx(View, { style: styles.chevronSpace }),
498
539
  /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: treeIcon, size: 18, color: isDir ? theme.accent : theme.muted }),
499
540
  /* @__PURE__ */ jsx(Text, { style: [styles.treeName, {
500
541
  color: theme.ink
501
- }, isDir && styles.treeDir], numberOfLines: 1, children: item.name }),
502
- !isDir && drafts[item.path] !== void 0 ? /* @__PURE__ */ jsx(View, { style: [styles.dirtyDot, {
542
+ }, isDir && styles.treeDir], numberOfLines: 1, children: hit ? /* @__PURE__ */ jsxs(Fragment, { children: [
543
+ node.name.slice(0, hit.start),
544
+ /* @__PURE__ */ jsx(Text, { style: {
545
+ backgroundColor: theme.accentSoft,
546
+ color: theme.accent
547
+ }, children: node.name.slice(hit.start, hit.end) }),
548
+ node.name.slice(hit.end)
549
+ ] }) : node.name }),
550
+ unsaved ? /* @__PURE__ */ jsx(View, { style: [styles.dirtyDot, {
503
551
  backgroundColor: theme.accent
504
552
  }] }) : null
505
553
  ] });
@@ -513,6 +561,36 @@ const styles = StyleSheet.create({
513
561
  fill: {
514
562
  flex: 1
515
563
  },
564
+ treeBar: {
565
+ flexDirection: "row",
566
+ alignItems: "center",
567
+ gap: 8,
568
+ paddingHorizontal: 12,
569
+ paddingBottom: 8,
570
+ borderBottomWidth: StyleSheet.hairlineWidth
571
+ },
572
+ treeFilter: {
573
+ flex: 1,
574
+ flexDirection: "row",
575
+ alignItems: "center",
576
+ gap: 6,
577
+ borderRadius: 10,
578
+ paddingHorizontal: 10
579
+ },
580
+ treeFilterInput: {
581
+ flex: 1,
582
+ fontSize: 14,
583
+ paddingVertical: Platform.OS === "ios" ? 8 : 4
584
+ },
585
+ collapseAll: {
586
+ width: 36,
587
+ height: 36,
588
+ alignItems: "center",
589
+ justifyContent: "center"
590
+ },
591
+ chevronSpace: {
592
+ width: 16
593
+ },
516
594
  center: {
517
595
  padding: 32,
518
596
  alignItems: "center"
@@ -726,4 +804,4 @@ const styles = StyleSheet.create({
726
804
  padding: 10,
727
805
  borderRadius: 20
728
806
  }
729
- });export{CodeView,orderedFiles,treeRows};//# sourceMappingURL=CodeView.js.map
807
+ });export{CodeView,orderedFiles};//# sourceMappingURL=CodeView.js.map