@ruckc/truss-code 0.0.0-stage → 1.11.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.
- package/LICENSE +24 -0
- package/dist/CodeBlock.svelte +75 -0
- package/dist/CodeBlock.svelte.d.ts +17 -0
- package/dist/CodeEditor.svelte +227 -0
- package/dist/CodeEditor.svelte.d.ts +41 -0
- package/dist/DiffEditor.svelte +142 -0
- package/dist/DiffEditor.svelte.d.ts +32 -0
- package/dist/DiffFiles.svelte +196 -0
- package/dist/DiffFiles.svelte.d.ts +30 -0
- package/dist/DiffView.svelte +357 -0
- package/dist/DiffView.svelte.d.ts +56 -0
- package/dist/diff.d.ts +135 -0
- package/dist/diff.js +346 -0
- package/dist/editor-util.d.ts +46 -0
- package/dist/editor-util.js +52 -0
- package/dist/files.d.ts +44 -0
- package/dist/files.js +57 -0
- package/dist/highlight.d.ts +27 -0
- package/dist/highlight.js +84 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +12 -0
- package/dist/lang.d.ts +4 -0
- package/dist/lang.js +36 -0
- package/dist/monaco.d.ts +15 -0
- package/dist/monaco.js +40 -0
- package/dist/patch.d.ts +24 -0
- package/dist/patch.js +185 -0
- package/dist/theme.d.ts +80 -0
- package/dist/theme.js +217 -0
- package/dist/types.d.ts +47 -0
- package/dist/types.js +1 -0
- package/dist/worker.d.ts +5 -0
- package/package.json +46 -5
- package/README.md +0 -3
package/dist/theme.js
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
export const MIN_CONTRAST = 4.5;
|
|
2
|
+
const clamp = (n) => Math.max(0, Math.min(255, Math.round(n)));
|
|
3
|
+
/** Parses `#rgb`, `#rgba`, `#rrggbb`, `#rrggbbaa`, `rgb()` and `rgba()` (comma or space syntax). Anything else is `null`. */
|
|
4
|
+
export function parseColor(input) {
|
|
5
|
+
const s = (input ?? '').trim().toLowerCase();
|
|
6
|
+
let m = /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.exec(s);
|
|
7
|
+
if (m) {
|
|
8
|
+
let h = m[1];
|
|
9
|
+
if (h.length <= 4)
|
|
10
|
+
h = [...h].map((c) => c + c).join('');
|
|
11
|
+
const n = (i) => parseInt(h.slice(i, i + 2), 16);
|
|
12
|
+
return [n(0), n(2), n(4), h.length === 8 ? n(6) / 255 : 1];
|
|
13
|
+
}
|
|
14
|
+
m = /^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)(?:\s*[,/]\s*([\d.]+)(%?))?\s*\)$/.exec(s);
|
|
15
|
+
if (m)
|
|
16
|
+
return [clamp(+m[1]), clamp(+m[2]), clamp(+m[3]), m[4] == null ? 1 : Math.min(1, m[5] ? +m[4] / 100 : +m[4])];
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const h2 = (n) => clamp(n).toString(16).padStart(2, '0');
|
|
20
|
+
/** `#rrggbb`, or `#rrggbbaa` when the colour is translucent. */
|
|
21
|
+
export const toHex = ([r, g, b, a]) => `#${h2(r)}${h2(g)}${h2(b)}${a < 1 ? h2(a * 255) : ''}`;
|
|
22
|
+
/** Blends `a` toward `b` by `t` (0 = a, 1 = b); the result is opaque. */
|
|
23
|
+
export const mix = (a, b, t) => [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t, 1];
|
|
24
|
+
/** Paints a translucent colour over an opaque one. */
|
|
25
|
+
export const over = (fg, bg) => mix(bg, fg, fg[3]);
|
|
26
|
+
export function luminance([r, g, b]) {
|
|
27
|
+
const f = (c) => ((c /= 255) <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
|
|
28
|
+
return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);
|
|
29
|
+
}
|
|
30
|
+
export function contrast(a, b) {
|
|
31
|
+
const [hi, lo] = [luminance(a), luminance(b)].sort((x, y) => y - x);
|
|
32
|
+
return (hi + 0.05) / (lo + 0.05);
|
|
33
|
+
}
|
|
34
|
+
const BLACK = [0, 0, 0, 1];
|
|
35
|
+
const WHITE = [255, 255, 255, 1];
|
|
36
|
+
/** The colour closest to `fg` (blended toward black or white) that reaches `min`:1 on every background. */
|
|
37
|
+
export function ensureContrast(fg, bgs, min = MIN_CONTRAST) {
|
|
38
|
+
const worst = (c) => Math.min(...bgs.map((b) => contrast(c, b)));
|
|
39
|
+
if (worst(fg) >= min)
|
|
40
|
+
return [clamp(fg[0]), clamp(fg[1]), clamp(fg[2]), 1];
|
|
41
|
+
// push away from the backgrounds: toward white on dark ones, toward black on light ones
|
|
42
|
+
const target = bgs.reduce((s, b) => s + luminance(b), 0) / bgs.length < 0.18 ? WHITE : BLACK;
|
|
43
|
+
for (let t = 0.04; t < 1; t += 0.04) {
|
|
44
|
+
const c = mix(fg, target, t).map(clamp);
|
|
45
|
+
if (worst(c) >= min)
|
|
46
|
+
return c;
|
|
47
|
+
}
|
|
48
|
+
return target;
|
|
49
|
+
}
|
|
50
|
+
// ───── tokens
|
|
51
|
+
export const TOKEN_VARS = [
|
|
52
|
+
'--tr-surface', '--tr-surface-container-low', '--tr-surface-container', '--tr-surface-container-high', '--tr-on-surface', '--tr-on-surface-variant',
|
|
53
|
+
'--tr-outline', '--tr-outline-variant', '--tr-primary', '--tr-danger', '--tr-warning', '--tr-success',
|
|
54
|
+
'--trc-s1', '--trc-s2', '--trc-s3', '--trc-s4', '--trc-s5', '--trc-s6', '--trc-s7', '--trc-s8',
|
|
55
|
+
'--tr-syntax-keyword', '--tr-syntax-string', '--tr-syntax-number', '--tr-syntax-comment', '--tr-syntax-function', '--tr-syntax-type', '--tr-syntax-variable',
|
|
56
|
+
'--tr-syntax-constant', '--tr-syntax-operator', '--tr-syntax-punctuation', '--tr-syntax-tag', '--tr-syntax-attr', '--tr-syntax-regexp'
|
|
57
|
+
];
|
|
58
|
+
/** Built-in values, used for any token that is not defined (the charts stylesheet is optional). They match tokens.css and charts.css. */
|
|
59
|
+
export const FALLBACK = {
|
|
60
|
+
light: {
|
|
61
|
+
'--tr-surface': '#fbfbfe', '--tr-surface-container-low': '#f4f5fa', '--tr-surface-container': '#eef0f6', '--tr-surface-container-high': '#e7e9f1',
|
|
62
|
+
'--tr-on-surface': '#1a1c22', '--tr-on-surface-variant': '#454955', '--tr-outline': '#7a7f8e', '--tr-outline-variant': '#c3c7d3',
|
|
63
|
+
'--tr-primary': '#1f5fbf', '--tr-danger': '#b3261e', '--tr-warning': '#8a5300', '--tr-success': '#1b7a4b',
|
|
64
|
+
'--trc-s1': '#2a78d6', '--trc-s2': '#eb6834', '--trc-s3': '#1baf7a', '--trc-s4': '#eda100', '--trc-s5': '#e87ba4', '--trc-s6': '#008300', '--trc-s7': '#6250d6', '--trc-s8': '#e34948'
|
|
65
|
+
},
|
|
66
|
+
dark: {
|
|
67
|
+
'--tr-surface': '#111318', '--tr-surface-container-low': '#181a20', '--tr-surface-container': '#1d2026', '--tr-surface-container-high': '#272a31',
|
|
68
|
+
'--tr-on-surface': '#e2e2e9', '--tr-on-surface-variant': '#c3c6d1', '--tr-outline': '#8d919d', '--tr-outline-variant': '#434752',
|
|
69
|
+
'--tr-primary': '#a8c7ff', '--tr-danger': '#ffb4ab', '--tr-warning': '#ffb958', '--tr-success': '#7fd7a3',
|
|
70
|
+
'--trc-s1': '#3987e5', '--trc-s2': '#d95926', '--trc-s3': '#199e70', '--trc-s4': '#c98500', '--trc-s5': '#d55181', '--trc-s6': '#008300', '--trc-s7': '#9085e9', '--trc-s8': '#e66767'
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const SERIES = {
|
|
74
|
+
keyword: '--trc-s7', string: '--trc-s3', number: '--trc-s4', type: '--trc-s1', function: '--trc-s2', constant: '--trc-s6', tag: '--trc-s8', attribute: '--trc-s5', regexp: '--trc-s6',
|
|
75
|
+
variable: '--tr-on-surface', operator: '--tr-on-surface', comment: '--tr-on-surface-variant', invalid: '--tr-danger', delimiter: '--tr-on-surface-variant', meta: '--trc-s1'
|
|
76
|
+
};
|
|
77
|
+
/** The shared syntax tokens (`--tr-syntax-*`) per role. When one is not defined the chart-palette colour above is used. `invalid` and `meta` have no token. */
|
|
78
|
+
const SYNTAX = {
|
|
79
|
+
keyword: '--tr-syntax-keyword', string: '--tr-syntax-string', number: '--tr-syntax-number', type: '--tr-syntax-type', function: '--tr-syntax-function',
|
|
80
|
+
variable: '--tr-syntax-variable', constant: '--tr-syntax-constant', operator: '--tr-syntax-operator', tag: '--tr-syntax-tag', attribute: '--tr-syntax-attr',
|
|
81
|
+
regexp: '--tr-syntax-regexp', comment: '--tr-syntax-comment', delimiter: '--tr-syntax-punctuation'
|
|
82
|
+
};
|
|
83
|
+
export const ROLES = Object.keys(SERIES);
|
|
84
|
+
export function buildPalette(tokens, mode) {
|
|
85
|
+
const get = (name) => parseColor(tokens[name]) ?? parseColor(FALLBACK[mode][name]);
|
|
86
|
+
const bg = over(get('--tr-surface'), WHITE);
|
|
87
|
+
const fg = get('--tr-on-surface');
|
|
88
|
+
const lineHighlight = mix(bg, get('--tr-primary'), 0.07);
|
|
89
|
+
const selection = mix(bg, get('--tr-primary'), 0.24);
|
|
90
|
+
const added = mix(bg, get('--tr-success'), 0.15), removed = mix(bg, get('--tr-danger'), 0.14);
|
|
91
|
+
const addedStrong = mix(bg, get('--tr-success'), 0.36), removedStrong = mix(bg, get('--tr-danger'), 0.34);
|
|
92
|
+
const bgs = [bg, lineHighlight, selection, added, removed, addedStrong, removedStrong];
|
|
93
|
+
const roles = {};
|
|
94
|
+
let min = Infinity;
|
|
95
|
+
for (const role of ROLES) {
|
|
96
|
+
const c = ensureContrast((SYNTAX[role] && parseColor(tokens[SYNTAX[role]])) || get(SERIES[role]), bgs);
|
|
97
|
+
min = Math.min(min, ...bgs.map((b) => contrast(c, b)));
|
|
98
|
+
roles[role] = toHex(c);
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
mode,
|
|
102
|
+
bg: toHex(bg),
|
|
103
|
+
fg: toHex(ensureContrast(fg, bgs)),
|
|
104
|
+
lineHighlight: toHex(lineHighlight),
|
|
105
|
+
selection: toHex(selection),
|
|
106
|
+
cursor: toHex(get('--tr-primary')),
|
|
107
|
+
muted: toHex(ensureContrast(get('--tr-on-surface-variant'), bgs)),
|
|
108
|
+
border: toHex(get('--tr-outline-variant')),
|
|
109
|
+
widget: toHex(get('--tr-surface-container-high')),
|
|
110
|
+
added: toHex(added),
|
|
111
|
+
removed: toHex(removed),
|
|
112
|
+
addedStrong: toHex(addedStrong),
|
|
113
|
+
removedStrong: toHex(removedStrong),
|
|
114
|
+
roles,
|
|
115
|
+
minContrast: min
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
// ───── syntax scopes
|
|
119
|
+
/** Monaco token types (and their dotted prefixes) to a role. The longest matching prefix wins, so `string.key.json` beats `string`. */
|
|
120
|
+
export const SCOPES = [
|
|
121
|
+
['comment', 'comment', 'italic'], ['string', 'string'], ['string.key', 'attribute'], ['string.escape', 'regexp'], ['number', 'number'],
|
|
122
|
+
['keyword', 'keyword'], ['type', 'type'], ['namespace', 'type'], ['class', 'type'], ['interface', 'type'], ['predefined', 'function'], ['function', 'function'],
|
|
123
|
+
['tag', 'tag'], ['attribute.name', 'attribute'], ['attribute.value', 'string'], ['key', 'attribute'], ['regexp', 'regexp'], ['constant', 'constant'],
|
|
124
|
+
['variable', 'variable'], ['operator', 'operator'], ['delimiter', 'delimiter'], ['invalid', 'invalid'], ['annotation', 'meta'], ['metatag', 'meta'],
|
|
125
|
+
['emphasis', 'variable', 'italic'], ['strong', 'variable', 'bold']
|
|
126
|
+
];
|
|
127
|
+
/** The role of a Monaco token type such as `keyword.sql`, or `undefined` for plain text. */
|
|
128
|
+
export function scopeRole(type) {
|
|
129
|
+
let best;
|
|
130
|
+
for (const [prefix, role] of SCOPES) {
|
|
131
|
+
if ((type === prefix || type.startsWith(prefix + '.')) && (!best || prefix.length > best[0]))
|
|
132
|
+
best = [prefix.length, role];
|
|
133
|
+
}
|
|
134
|
+
return best?.[1];
|
|
135
|
+
}
|
|
136
|
+
/** The Monaco theme for a palette. */
|
|
137
|
+
export function monacoTheme(p) {
|
|
138
|
+
const no = (c) => c.replace('#', '');
|
|
139
|
+
return {
|
|
140
|
+
base: p.mode === 'dark' ? 'vs-dark' : 'vs',
|
|
141
|
+
inherit: false,
|
|
142
|
+
rules: [
|
|
143
|
+
{ token: '', foreground: no(p.fg), background: no(p.bg) },
|
|
144
|
+
...SCOPES.map(([token, role, fontStyle]) => ({ token, foreground: no(p.roles[role]), ...(fontStyle ? { fontStyle } : {}) }))
|
|
145
|
+
],
|
|
146
|
+
colors: {
|
|
147
|
+
'editor.background': p.bg,
|
|
148
|
+
'editor.foreground': p.fg,
|
|
149
|
+
'editorLineNumber.foreground': p.muted,
|
|
150
|
+
'editorLineNumber.activeForeground': p.fg,
|
|
151
|
+
'editor.lineHighlightBackground': p.lineHighlight,
|
|
152
|
+
'editor.lineHighlightBorder': p.lineHighlight,
|
|
153
|
+
'editor.selectionBackground': p.selection,
|
|
154
|
+
'editor.inactiveSelectionBackground': p.lineHighlight,
|
|
155
|
+
'editorCursor.foreground': p.cursor,
|
|
156
|
+
'editorIndentGuide.background1': p.border,
|
|
157
|
+
'editorWhitespace.foreground': p.border,
|
|
158
|
+
'editorGutter.background': p.bg,
|
|
159
|
+
'editorWidget.background': p.widget,
|
|
160
|
+
'editorWidget.border': p.border,
|
|
161
|
+
'editorWidget.foreground': p.fg,
|
|
162
|
+
'editorHoverWidget.background': p.widget,
|
|
163
|
+
'editorHoverWidget.border': p.border,
|
|
164
|
+
'editorHoverWidget.foreground': p.fg,
|
|
165
|
+
'editorSuggestWidget.background': p.widget,
|
|
166
|
+
'editorSuggestWidget.border': p.border,
|
|
167
|
+
'editorSuggestWidget.foreground': p.fg,
|
|
168
|
+
'editorSuggestWidget.selectedBackground': p.selection,
|
|
169
|
+
'editorSuggestWidget.highlightForeground': p.roles.keyword,
|
|
170
|
+
'input.background': p.bg,
|
|
171
|
+
'input.foreground': p.fg,
|
|
172
|
+
'input.border': p.border,
|
|
173
|
+
focusBorder: p.cursor,
|
|
174
|
+
'scrollbarSlider.background': p.border + '99',
|
|
175
|
+
'scrollbarSlider.hoverBackground': p.muted + '66',
|
|
176
|
+
'scrollbarSlider.activeBackground': p.muted + '99',
|
|
177
|
+
'minimap.background': p.bg,
|
|
178
|
+
'editorError.foreground': p.roles.invalid,
|
|
179
|
+
'editorWarning.foreground': p.roles.number,
|
|
180
|
+
'editorInfo.foreground': p.roles.type,
|
|
181
|
+
'diffEditor.insertedTextBackground': p.added + 'aa',
|
|
182
|
+
'diffEditor.removedTextBackground': p.removed + 'aa',
|
|
183
|
+
'diffEditor.insertedLineBackground': p.added + '66',
|
|
184
|
+
'diffEditor.removedLineBackground': p.removed + '66'
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
/** Editor type metrics from the density-scaled tokens: `--tr-text-md` (px) and `--tr-leading-normal` (a ratio). */
|
|
189
|
+
export function fontMetrics(textMd, leading, family) {
|
|
190
|
+
const size = parseFloat(textMd ?? '');
|
|
191
|
+
const ratio = parseFloat(leading ?? '');
|
|
192
|
+
const fontSize = size > 0 ? size : 14;
|
|
193
|
+
return { fontSize, lineHeight: Math.round(fontSize * (ratio > 0 ? ratio : 1.5)), fontFamily: family?.trim() || "ui-monospace, 'SF Mono', Menlo, monospace" };
|
|
194
|
+
}
|
|
195
|
+
/** The theme in effect at `el`: nearest `data-theme`, else the OS preference; tokens and density as computed there. */
|
|
196
|
+
export function readTheme(el) {
|
|
197
|
+
const forced = el.closest('[data-theme]')?.getAttribute('data-theme');
|
|
198
|
+
const mode = forced === 'dark' || forced === 'light' ? forced : matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
199
|
+
const cs = getComputedStyle(el);
|
|
200
|
+
const tokens = {};
|
|
201
|
+
for (const name of TOKEN_VARS)
|
|
202
|
+
tokens[name] = cs.getPropertyValue(name).trim() || undefined;
|
|
203
|
+
return {
|
|
204
|
+
mode,
|
|
205
|
+
palette: buildPalette(tokens, mode),
|
|
206
|
+
metrics: fontMetrics(cs.getPropertyValue('--tr-text-md'), cs.getPropertyValue('--tr-leading-normal'), cs.getPropertyValue('--tr-font-mono'))
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
/** Calls `cb` whenever the theme or density can have changed (`data-theme`, `data-density`, class or style on any ancestor, or the OS scheme). Returns a stop function. */
|
|
210
|
+
export function watchTheme(el, cb) {
|
|
211
|
+
const mo = new MutationObserver(cb);
|
|
212
|
+
for (let n = el; n; n = n.parentElement)
|
|
213
|
+
mo.observe(n, { attributes: true, attributeFilter: ['data-theme', 'data-density', 'class', 'style'] });
|
|
214
|
+
const mq = matchMedia('(prefers-color-scheme: dark)');
|
|
215
|
+
mq.addEventListener('change', cb);
|
|
216
|
+
return () => { mo.disconnect(); mq.removeEventListener('change', cb); };
|
|
217
|
+
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type MarkerSeverity = 'error' | 'warning' | 'info' | 'hint';
|
|
2
|
+
/** A diagnostic. Lines and columns are 1-based. `endLine`/`endCol` default to the end of the start word. */
|
|
3
|
+
export interface CodeMarker {
|
|
4
|
+
line: number;
|
|
5
|
+
col: number;
|
|
6
|
+
endLine?: number;
|
|
7
|
+
endCol?: number;
|
|
8
|
+
severity: MarkerSeverity;
|
|
9
|
+
message: string;
|
|
10
|
+
/** Optional rule or source label, shown next to the message. */
|
|
11
|
+
source?: string;
|
|
12
|
+
code?: string;
|
|
13
|
+
}
|
|
14
|
+
/** A note anchored to a line of a diff. Add whatever else your `annotation` snippet needs (an id, a thread, a severity). */
|
|
15
|
+
export interface DiffAnnotation {
|
|
16
|
+
/** 1-based line number on the chosen side. */
|
|
17
|
+
line: number;
|
|
18
|
+
/** Which file the number belongs to; defaults to `new`. */
|
|
19
|
+
side?: 'old' | 'new';
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
export type CompletionKind = 'text' | 'keyword' | 'function' | 'method' | 'variable' | 'field' | 'class' | 'interface' | 'module' | 'property' | 'constant' | 'snippet' | 'value' | 'table' | 'column';
|
|
23
|
+
export interface CompletionItem {
|
|
24
|
+
label: string;
|
|
25
|
+
/** Text inserted; defaults to the label. */
|
|
26
|
+
insertText?: string;
|
|
27
|
+
kind?: CompletionKind;
|
|
28
|
+
detail?: string;
|
|
29
|
+
documentation?: string;
|
|
30
|
+
/** Sort key (lower first); defaults to the label. */
|
|
31
|
+
sortText?: string;
|
|
32
|
+
/** `insertText` is a snippet with `$1`/`${1:name}` tab stops. */
|
|
33
|
+
snippet?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** What a `completions` callback gets: the caret and the text before it. */
|
|
36
|
+
export interface CompletionContext {
|
|
37
|
+
/** The whole document. */
|
|
38
|
+
value: string;
|
|
39
|
+
language: string;
|
|
40
|
+
path?: string;
|
|
41
|
+
line: number;
|
|
42
|
+
col: number;
|
|
43
|
+
/** The word being typed (may be empty). */
|
|
44
|
+
word: string;
|
|
45
|
+
/** The text of the current line before the caret. */
|
|
46
|
+
prefix: string;
|
|
47
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/worker.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@ruckc/truss-code",
|
|
3
|
+
"version": "1.11.0",
|
|
4
|
+
"description": "Monaco code editor, read-only code blocks and diff views styled with Truss UI",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"sideEffects": [
|
|
11
|
+
"**/*.css"
|
|
12
|
+
],
|
|
13
|
+
"svelte": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"svelte": "./dist/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"svelte": "^5.20.0",
|
|
23
|
+
"@ruckc/truss-ui": "^1.0.0",
|
|
24
|
+
"monaco-editor": "^0.57.0"
|
|
25
|
+
},
|
|
26
|
+
"author": "Curtis Ruck",
|
|
27
|
+
"homepage": "https://truss.ruck.io",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/ruckc/truss-ui/issues"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/ruckc/truss-ui.git",
|
|
37
|
+
"directory": "packages/code"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"svelte",
|
|
41
|
+
"sveltekit",
|
|
42
|
+
"truss",
|
|
43
|
+
"code-editor",
|
|
44
|
+
"monaco",
|
|
45
|
+
"diff"
|
|
46
|
+
]
|
|
47
|
+
}
|
package/README.md
DELETED