@opentui/core 0.1.87 → 0.1.89

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 (107) hide show
  1. package/3d/ThreeRenderable.d.ts +4 -4
  2. package/3d/WGPURenderer.d.ts +4 -4
  3. package/3d/animation/ExplodingSpriteEffect.d.ts +2 -2
  4. package/3d/animation/PhysicsExplodingSpriteEffect.d.ts +3 -3
  5. package/3d/animation/SpriteAnimator.d.ts +1 -1
  6. package/3d/animation/SpriteParticleGenerator.d.ts +1 -1
  7. package/3d/canvas.d.ts +2 -2
  8. package/3d/index.d.ts +12 -12
  9. package/3d/physics/PlanckPhysicsAdapter.d.ts +1 -1
  10. package/3d/physics/RapierPhysicsAdapter.d.ts +1 -1
  11. package/3d.d.ts +1 -1
  12. package/3d.js +1 -1
  13. package/3d.js.map +12 -12
  14. package/Renderable.d.ts +7 -7
  15. package/animation/Timeline.d.ts +1 -1
  16. package/buffer.d.ts +6 -4
  17. package/console.d.ts +7 -4
  18. package/edit-buffer.d.ts +4 -4
  19. package/editor-view.d.ts +3 -3
  20. package/{index-0wbvecnk.js → index-e89anq5x.js} +864 -175
  21. package/index-e89anq5x.js.map +64 -0
  22. package/index-rs5zwr4j.js +12373 -0
  23. package/index-rs5zwr4j.js.map +43 -0
  24. package/index-tae5jwnc.js +188 -0
  25. package/index-tae5jwnc.js.map +10 -0
  26. package/index.d.ts +20 -17
  27. package/index.js +86 -11596
  28. package/index.js.map +3 -35
  29. package/lib/KeyHandler.d.ts +7 -4
  30. package/lib/ascii.font.d.ts +2 -2
  31. package/lib/border.d.ts +1 -1
  32. package/lib/clipboard.d.ts +1 -1
  33. package/lib/clock.d.ts +4 -0
  34. package/lib/extmarks-history.d.ts +1 -1
  35. package/lib/extmarks.d.ts +2 -2
  36. package/lib/hast-styled-text.d.ts +3 -3
  37. package/lib/index.d.ts +21 -20
  38. package/lib/objects-in-viewport.d.ts +1 -1
  39. package/lib/parse.keypress-kitty.d.ts +1 -1
  40. package/lib/paste.d.ts +7 -0
  41. package/lib/renderable.validations.d.ts +2 -2
  42. package/lib/selection.d.ts +2 -2
  43. package/lib/stdin-parser.d.ts +14 -2
  44. package/lib/styled-text.d.ts +2 -2
  45. package/lib/terminal-palette.d.ts +4 -2
  46. package/lib/tree-sitter/client.d.ts +1 -1
  47. package/lib/tree-sitter/index.d.ts +7 -7
  48. package/lib/tree-sitter/parsers-config.d.ts +15 -0
  49. package/lib/tree-sitter/resolve-ft.d.ts +3 -0
  50. package/lib/tree-sitter/types.d.ts +1 -0
  51. package/lib/tree-sitter-styled-text.d.ts +5 -5
  52. package/package.json +17 -7
  53. package/parser.worker.js +52 -18
  54. package/parser.worker.js.map +3 -3
  55. package/plugins/core-slot.d.ts +72 -0
  56. package/plugins/registry.d.ts +38 -0
  57. package/plugins/types.d.ts +34 -0
  58. package/post/effects.d.ts +147 -0
  59. package/post/filters.d.ts +28 -68
  60. package/post/matrices.d.ts +20 -0
  61. package/renderables/ASCIIFont.d.ts +6 -6
  62. package/renderables/Box.d.ts +5 -5
  63. package/renderables/Code.d.ts +10 -8
  64. package/renderables/Diff.d.ts +7 -7
  65. package/renderables/EditBufferRenderable.d.ts +8 -8
  66. package/renderables/FrameBuffer.d.ts +3 -3
  67. package/renderables/Input.d.ts +3 -3
  68. package/renderables/LineNumberRenderable.d.ts +4 -4
  69. package/renderables/Markdown.d.ts +17 -9
  70. package/renderables/ScrollBar.d.ts +6 -6
  71. package/renderables/ScrollBox.d.ts +9 -8
  72. package/renderables/Select.d.ts +7 -7
  73. package/renderables/Slider.d.ts +1 -1
  74. package/renderables/TabSelect.d.ts +6 -6
  75. package/renderables/Text.d.ts +7 -7
  76. package/renderables/TextBufferRenderable.d.ts +9 -9
  77. package/renderables/TextNode.d.ts +6 -6
  78. package/renderables/Textarea.d.ts +7 -7
  79. package/renderables/__tests__/renderable-test-utils.d.ts +8 -3
  80. package/renderables/composition/VRenderable.d.ts +3 -3
  81. package/renderables/composition/constructs.d.ts +14 -14
  82. package/renderables/composition/vnode.d.ts +2 -2
  83. package/renderables/index.d.ts +22 -22
  84. package/renderer.d.ts +28 -16
  85. package/runtime-plugin-support.d.ts +3 -0
  86. package/runtime-plugin-support.js +29 -0
  87. package/runtime-plugin-support.js.map +10 -0
  88. package/runtime-plugin.d.ts +11 -0
  89. package/runtime-plugin.js +16 -0
  90. package/runtime-plugin.js.map +9 -0
  91. package/syntax-style.d.ts +2 -2
  92. package/testing/manual-clock.d.ts +1 -0
  93. package/testing/mock-keys.d.ts +2 -1
  94. package/testing/mock-mouse.d.ts +1 -1
  95. package/testing/mock-tree-sitter-client.d.ts +2 -2
  96. package/testing/test-recorder.d.ts +1 -1
  97. package/testing/test-renderer.d.ts +4 -4
  98. package/testing.d.ts +6 -6
  99. package/testing.js +12 -7
  100. package/testing.js.map +7 -7
  101. package/text-buffer-view.d.ts +3 -3
  102. package/text-buffer.d.ts +5 -5
  103. package/types.d.ts +9 -4
  104. package/utils.d.ts +1 -1
  105. package/zig-structs.d.ts +1 -1
  106. package/zig.d.ts +7 -5
  107. package/index-0wbvecnk.js.map +0 -63
@@ -0,0 +1,188 @@
1
+ // @bun
2
+ import {
3
+ exports_src
4
+ } from "./index-rs5zwr4j.js";
5
+ import {
6
+ __require
7
+ } from "./index-e89anq5x.js";
8
+
9
+ // src/runtime-plugin.ts
10
+ var CORE_RUNTIME_SPECIFIER = "@opentui/core";
11
+ var CORE_TESTING_RUNTIME_SPECIFIER = "@opentui/core/testing";
12
+ var RUNTIME_MODULE_PREFIX = "opentui:runtime-module:";
13
+ var MAX_RUNTIME_RESOLVE_PARENTS = 64;
14
+ var DEFAULT_CORE_RUNTIME_MODULE_SPECIFIERS = [CORE_RUNTIME_SPECIFIER, CORE_TESTING_RUNTIME_SPECIFIER];
15
+ var DEFAULT_CORE_RUNTIME_MODULE_SPECIFIER_SET = new Set(DEFAULT_CORE_RUNTIME_MODULE_SPECIFIERS);
16
+ var isCoreRuntimeModuleSpecifier = (specifier) => {
17
+ return DEFAULT_CORE_RUNTIME_MODULE_SPECIFIER_SET.has(specifier);
18
+ };
19
+ var loadCoreTestingRuntimeModule = async () => {
20
+ return await import("./testing.js");
21
+ };
22
+ var escapeRegExp = (value) => {
23
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
24
+ };
25
+ var exactSpecifierFilter = (specifier) => {
26
+ return new RegExp(`^${escapeRegExp(specifier)}$`);
27
+ };
28
+ var runtimeModuleIdForSpecifier = (specifier) => {
29
+ return `${RUNTIME_MODULE_PREFIX}${encodeURIComponent(specifier)}`;
30
+ };
31
+ var resolveRuntimeModuleExports = async (moduleEntry) => {
32
+ if (typeof moduleEntry === "function") {
33
+ return await moduleEntry();
34
+ }
35
+ return moduleEntry;
36
+ };
37
+ var sourcePath = (path) => {
38
+ const searchIndex = path.indexOf("?");
39
+ const hashIndex = path.indexOf("#");
40
+ const end = [searchIndex, hashIndex].filter((index) => index >= 0).sort((a, b) => a - b)[0];
41
+ return end === undefined ? path : path.slice(0, end);
42
+ };
43
+ var runtimeLoaderForPath = (path) => {
44
+ const cleanPath = sourcePath(path);
45
+ if (cleanPath.endsWith(".tsx")) {
46
+ return "tsx";
47
+ }
48
+ if (cleanPath.endsWith(".jsx")) {
49
+ return "jsx";
50
+ }
51
+ if (cleanPath.endsWith(".ts") || cleanPath.endsWith(".mts") || cleanPath.endsWith(".cts")) {
52
+ return "ts";
53
+ }
54
+ if (cleanPath.endsWith(".js") || cleanPath.endsWith(".mjs") || cleanPath.endsWith(".cjs")) {
55
+ return "js";
56
+ }
57
+ return null;
58
+ };
59
+ var runtimeSourceFilter = /^(?!.*(?:\/|\\)node_modules(?:\/|\\)).*\.(?:[cm]?js|[cm]?ts|jsx|tsx)(?:[?#].*)?$/;
60
+ var resolveImportSpecifierPatterns = [
61
+ /(from\s+["'])([^"']+)(["'])/g,
62
+ /(import\s+["'])([^"']+)(["'])/g,
63
+ /(import\s*\(\s*["'])([^"']+)(["']\s*\))/g,
64
+ /(require\s*\(\s*["'])([^"']+)(["']\s*\))/g
65
+ ];
66
+ var isBareSpecifier = (specifier) => {
67
+ if (specifier.startsWith(".") || specifier.startsWith("/") || specifier.startsWith("\\")) {
68
+ return false;
69
+ }
70
+ if (specifier.startsWith("node:") || specifier.startsWith("bun:") || specifier.startsWith("http:") || specifier.startsWith("https:") || specifier.startsWith("file:") || specifier.startsWith("data:")) {
71
+ return false;
72
+ }
73
+ if (specifier.startsWith(RUNTIME_MODULE_PREFIX)) {
74
+ return false;
75
+ }
76
+ return true;
77
+ };
78
+ var registerResolveParent = (resolveParentsByRecency, resolveParent) => {
79
+ const existingIndex = resolveParentsByRecency.indexOf(resolveParent);
80
+ if (existingIndex >= 0) {
81
+ resolveParentsByRecency.splice(existingIndex, 1);
82
+ }
83
+ resolveParentsByRecency.push(resolveParent);
84
+ if (resolveParentsByRecency.length > MAX_RUNTIME_RESOLVE_PARENTS) {
85
+ resolveParentsByRecency.shift();
86
+ }
87
+ };
88
+ var rewriteImportSpecifiers = (code, resolveReplacement) => {
89
+ let transformedCode = code;
90
+ for (const pattern of resolveImportSpecifierPatterns) {
91
+ transformedCode = transformedCode.replace(pattern, (fullMatch, prefix, specifier, suffix) => {
92
+ const replacement = resolveReplacement(specifier);
93
+ if (!replacement || replacement === specifier) {
94
+ return fullMatch;
95
+ }
96
+ return `${prefix}${replacement}${suffix}`;
97
+ });
98
+ }
99
+ return transformedCode;
100
+ };
101
+ var resolveFromParent = (specifier, parent) => {
102
+ try {
103
+ const resolvedSpecifier = import.meta.resolve(specifier, parent);
104
+ if (resolvedSpecifier === specifier || resolvedSpecifier.startsWith("node:") || resolvedSpecifier.startsWith("bun:")) {
105
+ return null;
106
+ }
107
+ return resolvedSpecifier;
108
+ } catch {
109
+ return null;
110
+ }
111
+ };
112
+ var rewriteImportsFromResolveParents = (code, resolveParentsByRecency) => {
113
+ if (resolveParentsByRecency.length === 0) {
114
+ return code;
115
+ }
116
+ const resolveFromParents = (specifier) => {
117
+ if (!isBareSpecifier(specifier)) {
118
+ return null;
119
+ }
120
+ for (let index = resolveParentsByRecency.length - 1;index >= 0; index -= 1) {
121
+ const resolveParent = resolveParentsByRecency[index];
122
+ const resolvedSpecifier = resolveFromParent(specifier, resolveParent);
123
+ if (resolvedSpecifier) {
124
+ return resolvedSpecifier;
125
+ }
126
+ }
127
+ return null;
128
+ };
129
+ return rewriteImportSpecifiers(code, resolveFromParents);
130
+ };
131
+ var rewriteRuntimeSpecifiers = (code, runtimeModuleIdsBySpecifier) => {
132
+ return rewriteImportSpecifiers(code, (specifier) => {
133
+ const runtimeModuleId = runtimeModuleIdsBySpecifier.get(specifier);
134
+ return runtimeModuleId ?? null;
135
+ });
136
+ };
137
+ function createRuntimePlugin(input = {}) {
138
+ const runtimeModules = new Map;
139
+ runtimeModules.set(CORE_RUNTIME_SPECIFIER, input.core ?? exports_src);
140
+ runtimeModules.set(CORE_TESTING_RUNTIME_SPECIFIER, loadCoreTestingRuntimeModule);
141
+ for (const [specifier, moduleEntry] of Object.entries(input.additional ?? {})) {
142
+ runtimeModules.set(specifier, moduleEntry);
143
+ }
144
+ const runtimeModuleIdsBySpecifier = new Map;
145
+ for (const specifier of runtimeModules.keys()) {
146
+ runtimeModuleIdsBySpecifier.set(specifier, runtimeModuleIdForSpecifier(specifier));
147
+ }
148
+ return {
149
+ name: "bun-plugin-opentui-runtime-modules",
150
+ setup: (build) => {
151
+ const resolveParentsByRecency = [];
152
+ for (const [specifier, moduleEntry] of runtimeModules.entries()) {
153
+ const moduleId = runtimeModuleIdsBySpecifier.get(specifier);
154
+ if (!moduleId) {
155
+ continue;
156
+ }
157
+ build.module(moduleId, async () => ({
158
+ exports: await resolveRuntimeModuleExports(moduleEntry),
159
+ loader: "object"
160
+ }));
161
+ build.onResolve({ filter: exactSpecifierFilter(specifier) }, () => ({ path: moduleId }));
162
+ }
163
+ build.onLoad({ filter: runtimeSourceFilter }, async (args) => {
164
+ const path = sourcePath(args.path);
165
+ const loader = runtimeLoaderForPath(args.path);
166
+ if (!loader) {
167
+ throw new Error(`Unable to determine runtime loader for path: ${args.path}`);
168
+ }
169
+ const file = Bun.file(path);
170
+ const contents = await file.text();
171
+ const runtimeRewrittenContents = rewriteRuntimeSpecifiers(contents, runtimeModuleIdsBySpecifier);
172
+ if (runtimeRewrittenContents !== contents) {
173
+ registerResolveParent(resolveParentsByRecency, path);
174
+ }
175
+ const transformedContents = rewriteImportsFromResolveParents(runtimeRewrittenContents, resolveParentsByRecency);
176
+ return {
177
+ contents: transformedContents,
178
+ loader
179
+ };
180
+ });
181
+ }
182
+ };
183
+ }
184
+
185
+ export { isCoreRuntimeModuleSpecifier, runtimeModuleIdForSpecifier, createRuntimePlugin };
186
+
187
+ //# debugId=320B34A5E2C7118F64756E2164756E21
188
+ //# sourceMappingURL=index-tae5jwnc.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/runtime-plugin.ts"],
4
+ "sourcesContent": [
5
+ "import { type BunPlugin } from \"bun\"\nimport * as coreRuntime from \"./index\"\n\nexport type RuntimeModuleExports = Record<string, unknown>\nexport type RuntimeModuleLoader = () => RuntimeModuleExports | Promise<RuntimeModuleExports>\nexport type RuntimeModuleEntry = RuntimeModuleExports | RuntimeModuleLoader\n\nexport interface CreateRuntimePluginOptions {\n core?: RuntimeModuleEntry\n additional?: Record<string, RuntimeModuleEntry>\n}\n\nconst CORE_RUNTIME_SPECIFIER = \"@opentui/core\"\nconst CORE_TESTING_RUNTIME_SPECIFIER = \"@opentui/core/testing\"\nconst RUNTIME_MODULE_PREFIX = \"opentui:runtime-module:\"\nconst MAX_RUNTIME_RESOLVE_PARENTS = 64\n\nconst DEFAULT_CORE_RUNTIME_MODULE_SPECIFIERS = [CORE_RUNTIME_SPECIFIER, CORE_TESTING_RUNTIME_SPECIFIER] as const\n\nconst DEFAULT_CORE_RUNTIME_MODULE_SPECIFIER_SET = new Set<string>(DEFAULT_CORE_RUNTIME_MODULE_SPECIFIERS)\n\nexport const isCoreRuntimeModuleSpecifier = (specifier: string): boolean => {\n return DEFAULT_CORE_RUNTIME_MODULE_SPECIFIER_SET.has(specifier)\n}\n\nconst loadCoreTestingRuntimeModule = async (): Promise<RuntimeModuleExports> => {\n return (await import(\"./testing\")) as RuntimeModuleExports\n}\n\nconst escapeRegExp = (value: string): string => {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")\n}\n\nconst exactSpecifierFilter = (specifier: string): RegExp => {\n return new RegExp(`^${escapeRegExp(specifier)}$`)\n}\n\nexport const runtimeModuleIdForSpecifier = (specifier: string): string => {\n return `${RUNTIME_MODULE_PREFIX}${encodeURIComponent(specifier)}`\n}\n\nconst resolveRuntimeModuleExports = async (moduleEntry: RuntimeModuleEntry): Promise<RuntimeModuleExports> => {\n if (typeof moduleEntry === \"function\") {\n return await moduleEntry()\n }\n\n return moduleEntry\n}\n\nconst sourcePath = (path: string): string => {\n const searchIndex = path.indexOf(\"?\")\n const hashIndex = path.indexOf(\"#\")\n const end = [searchIndex, hashIndex].filter((index) => index >= 0).sort((a, b) => a - b)[0]\n return end === undefined ? path : path.slice(0, end)\n}\n\nconst runtimeLoaderForPath = (path: string): \"js\" | \"ts\" | \"jsx\" | \"tsx\" | null => {\n const cleanPath = sourcePath(path)\n\n if (cleanPath.endsWith(\".tsx\")) {\n return \"tsx\"\n }\n\n if (cleanPath.endsWith(\".jsx\")) {\n return \"jsx\"\n }\n\n if (cleanPath.endsWith(\".ts\") || cleanPath.endsWith(\".mts\") || cleanPath.endsWith(\".cts\")) {\n return \"ts\"\n }\n\n if (cleanPath.endsWith(\".js\") || cleanPath.endsWith(\".mjs\") || cleanPath.endsWith(\".cjs\")) {\n return \"js\"\n }\n\n return null\n}\n\nconst runtimeSourceFilter = /^(?!.*(?:\\/|\\\\)node_modules(?:\\/|\\\\)).*\\.(?:[cm]?js|[cm]?ts|jsx|tsx)(?:[?#].*)?$/\n\nconst resolveImportSpecifierPatterns = [\n /(from\\s+[\"'])([^\"']+)([\"'])/g,\n /(import\\s+[\"'])([^\"']+)([\"'])/g,\n /(import\\s*\\(\\s*[\"'])([^\"']+)([\"']\\s*\\))/g,\n /(require\\s*\\(\\s*[\"'])([^\"']+)([\"']\\s*\\))/g,\n] as const\n\nconst isBareSpecifier = (specifier: string): boolean => {\n if (specifier.startsWith(\".\") || specifier.startsWith(\"/\") || specifier.startsWith(\"\\\\\")) {\n return false\n }\n\n if (\n specifier.startsWith(\"node:\") ||\n specifier.startsWith(\"bun:\") ||\n specifier.startsWith(\"http:\") ||\n specifier.startsWith(\"https:\") ||\n specifier.startsWith(\"file:\") ||\n specifier.startsWith(\"data:\")\n ) {\n return false\n }\n\n if (specifier.startsWith(RUNTIME_MODULE_PREFIX)) {\n return false\n }\n\n return true\n}\n\nconst registerResolveParent = (resolveParentsByRecency: string[], resolveParent: string): void => {\n const existingIndex = resolveParentsByRecency.indexOf(resolveParent)\n if (existingIndex >= 0) {\n resolveParentsByRecency.splice(existingIndex, 1)\n }\n\n resolveParentsByRecency.push(resolveParent)\n\n if (resolveParentsByRecency.length > MAX_RUNTIME_RESOLVE_PARENTS) {\n resolveParentsByRecency.shift()\n }\n}\n\nconst rewriteImportSpecifiers = (code: string, resolveReplacement: (specifier: string) => string | null): string => {\n let transformedCode = code\n\n for (const pattern of resolveImportSpecifierPatterns) {\n transformedCode = transformedCode.replace(pattern, (fullMatch, prefix, specifier, suffix) => {\n const replacement = resolveReplacement(specifier)\n if (!replacement || replacement === specifier) {\n return fullMatch\n }\n\n return `${prefix}${replacement}${suffix}`\n })\n }\n\n return transformedCode\n}\n\nconst resolveFromParent = (specifier: string, parent: string): string | null => {\n try {\n const resolvedSpecifier = import.meta.resolve(specifier, parent)\n if (\n resolvedSpecifier === specifier ||\n resolvedSpecifier.startsWith(\"node:\") ||\n resolvedSpecifier.startsWith(\"bun:\")\n ) {\n return null\n }\n\n return resolvedSpecifier\n } catch {\n return null\n }\n}\n\nconst rewriteImportsFromResolveParents = (code: string, resolveParentsByRecency: string[]): string => {\n if (resolveParentsByRecency.length === 0) {\n return code\n }\n\n const resolveFromParents = (specifier: string): string | null => {\n if (!isBareSpecifier(specifier)) {\n return null\n }\n\n for (let index = resolveParentsByRecency.length - 1; index >= 0; index -= 1) {\n const resolveParent = resolveParentsByRecency[index]\n const resolvedSpecifier = resolveFromParent(specifier, resolveParent)\n if (resolvedSpecifier) {\n return resolvedSpecifier\n }\n }\n\n return null\n }\n\n return rewriteImportSpecifiers(code, resolveFromParents)\n}\n\nconst rewriteRuntimeSpecifiers = (code: string, runtimeModuleIdsBySpecifier: Map<string, string>): string => {\n return rewriteImportSpecifiers(code, (specifier) => {\n const runtimeModuleId = runtimeModuleIdsBySpecifier.get(specifier)\n return runtimeModuleId ?? null\n })\n}\n\nexport function createRuntimePlugin(input: CreateRuntimePluginOptions = {}): BunPlugin {\n const runtimeModules = new Map<string, RuntimeModuleEntry>()\n runtimeModules.set(CORE_RUNTIME_SPECIFIER, input.core ?? (coreRuntime as RuntimeModuleExports))\n runtimeModules.set(CORE_TESTING_RUNTIME_SPECIFIER, loadCoreTestingRuntimeModule)\n\n for (const [specifier, moduleEntry] of Object.entries(input.additional ?? {})) {\n runtimeModules.set(specifier, moduleEntry)\n }\n\n const runtimeModuleIdsBySpecifier = new Map<string, string>()\n for (const specifier of runtimeModules.keys()) {\n runtimeModuleIdsBySpecifier.set(specifier, runtimeModuleIdForSpecifier(specifier))\n }\n\n return {\n name: \"bun-plugin-opentui-runtime-modules\",\n setup: (build) => {\n const resolveParentsByRecency: string[] = []\n\n for (const [specifier, moduleEntry] of runtimeModules.entries()) {\n const moduleId = runtimeModuleIdsBySpecifier.get(specifier)\n\n if (!moduleId) {\n continue\n }\n\n build.module(moduleId, async () => ({\n exports: await resolveRuntimeModuleExports(moduleEntry),\n loader: \"object\",\n }))\n\n build.onResolve({ filter: exactSpecifierFilter(specifier) }, () => ({ path: moduleId }))\n }\n\n build.onLoad({ filter: runtimeSourceFilter }, async (args) => {\n const path = sourcePath(args.path)\n const loader = runtimeLoaderForPath(args.path)\n if (!loader) {\n throw new Error(`Unable to determine runtime loader for path: ${args.path}`)\n }\n\n const file = Bun.file(path)\n const contents = await file.text()\n const runtimeRewrittenContents = rewriteRuntimeSpecifiers(contents, runtimeModuleIdsBySpecifier)\n\n if (runtimeRewrittenContents !== contents) {\n registerResolveParent(resolveParentsByRecency, path)\n }\n\n const transformedContents = rewriteImportsFromResolveParents(runtimeRewrittenContents, resolveParentsByRecency)\n\n return {\n contents: transformedContents,\n loader,\n }\n })\n },\n }\n}\n"
6
+ ],
7
+ "mappings": ";;;;;;;;;AAYA,IAAM,yBAAyB;AAC/B,IAAM,iCAAiC;AACvC,IAAM,wBAAwB;AAC9B,IAAM,8BAA8B;AAEpC,IAAM,yCAAyC,CAAC,wBAAwB,8BAA8B;AAEtG,IAAM,4CAA4C,IAAI,IAAY,sCAAsC;AAEjG,IAAM,+BAA+B,CAAC,cAA+B;AAAA,EAC1E,OAAO,0CAA0C,IAAI,SAAS;AAAA;AAGhE,IAAM,+BAA+B,YAA2C;AAAA,EAC9E,OAAQ,MAAa;AAAA;AAGvB,IAAM,eAAe,CAAC,UAA0B;AAAA,EAC9C,OAAO,MAAM,QAAQ,uBAAuB,MAAM;AAAA;AAGpD,IAAM,uBAAuB,CAAC,cAA8B;AAAA,EAC1D,OAAO,IAAI,OAAO,IAAI,aAAa,SAAS,IAAI;AAAA;AAG3C,IAAM,8BAA8B,CAAC,cAA8B;AAAA,EACxE,OAAO,GAAG,wBAAwB,mBAAmB,SAAS;AAAA;AAGhE,IAAM,8BAA8B,OAAO,gBAAmE;AAAA,EAC5G,IAAI,OAAO,gBAAgB,YAAY;AAAA,IACrC,OAAO,MAAM,YAAY;AAAA,EAC3B;AAAA,EAEA,OAAO;AAAA;AAGT,IAAM,aAAa,CAAC,SAAyB;AAAA,EAC3C,MAAM,cAAc,KAAK,QAAQ,GAAG;AAAA,EACpC,MAAM,YAAY,KAAK,QAAQ,GAAG;AAAA,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AqB,SAAS,EAAE,GAAG,OAAO,EAAE,MAAM,SAAS,EAAE;AAAA,MACzF;AAAA,MAEA,MAAM,OAAO,EAAE,QAAQ,oBAAoB,GAAG,OAAO,SAAS;AAAA,QAC5D,MAAM,OAAO,WAAW,KAAK,IAAI;AAAA,QACjC,MAAM,SAAS,qBAAqB,KAAK,IAAI;AAAA,QAC7C,IAAI,CAAC,QAAQ;AAAA,UACX,MAAM,IAAI,MAAM,gDAAgD,KAAK,MAAM;AAAA,QAC7E;AAAA,QAEA,MAAM,OAAO,IAAI,KAAK,IAAI;AAAA,QAC1B,MAAM,WAAW,MAAM,KAAK,KAAK;AAAA,QACjC,MAAM,2BAA2B,yBAAyB,UAAU,2BAA2B;AAAA,QAE/F,IAAI,6BAA6B,UAAU;AAAA,UACzC,sBAAsB,yBAAyB,IAAI;AAAA,QACrD;AAAA,QAEA,MAAM,sBAAsB,iCAAiC,0BAA0B,uBAAuB;AAAA,QAE9G,OAAO;AAAA,UACL,UAAU;AAAA,UACV;AAAA,QACF;AAAA,OACD;AAAA;AAAA,EAEL;AAAA;",
8
+ "debugId": "320B34A5E2C7118F64756E2164756E21",
9
+ "names": []
10
+ }
package/index.d.ts CHANGED
@@ -1,18 +1,21 @@
1
- export * from "./Renderable";
2
- export * from "./types";
3
- export * from "./utils";
4
- export * from "./buffer";
5
- export * from "./text-buffer";
6
- export * from "./text-buffer-view";
7
- export * from "./edit-buffer";
8
- export * from "./editor-view";
9
- export * from "./syntax-style";
10
- export * from "./post/filters";
11
- export * from "./animation/Timeline";
12
- export * from "./lib";
13
- export * from "./renderer";
14
- export * from "./NativeSpanFeed";
15
- export * from "./renderables";
16
- export * from "./zig";
17
- export * from "./console";
1
+ export * from "./Renderable.js";
2
+ export * from "./types.js";
3
+ export * from "./utils.js";
4
+ export * from "./buffer.js";
5
+ export * from "./text-buffer.js";
6
+ export * from "./text-buffer-view.js";
7
+ export * from "./edit-buffer.js";
8
+ export * from "./editor-view.js";
9
+ export * from "./syntax-style.js";
10
+ export * from "./post/filters.js";
11
+ export * from "./animation/Timeline.js";
12
+ export * from "./lib/index.js";
13
+ export * from "./renderer.js";
14
+ export * from "./plugins/types.js";
15
+ export * from "./plugins/registry.js";
16
+ export * from "./plugins/core-slot.js";
17
+ export * from "./NativeSpanFeed.js";
18
+ export * from "./renderables/index.js";
19
+ export * from "./zig.js";
20
+ export * from "./console.js";
18
21
  export * as Yoga from "yoga-layout";