tangled
alpha
login
or
join now
pulljosh.com
/
caret
A world-class math input for the web
3
fork
atom
overview
issues
pulls
pipelines
Improve .gitignore setup
Josh Pullen
2 days ago
aaec924d
8d91a9e9
+17
-213
11 changed files
expand all
collapse all
unified
split
.gitignore
apps
docs
.astro
content-assets.mjs
content-modules.mjs
content.d.ts
data-store.json
settings.json
types.d.ts
.gitignore
playground
.gitignore
packages
core
.gitignore
math
.gitignore
+13
-5
.gitignore
···
1
1
-
/node_modules
2
2
-
/packages/*/dist
3
3
-
/packages/*/node_modules
4
4
-
/apps/*/dist
5
5
-
/apps/*/node_modules
1
1
+
.DS_Store
2
2
+
Thumbs.db
3
3
+
*.swp
4
4
+
*.log
5
5
+
6
6
+
node_modules/
7
7
+
.pnpm-debug.log*
8
8
+
9
9
+
.env
10
10
+
.env.local
11
11
+
.env.*.local
12
12
+
*.env.bak
13
13
+
6
14
.turbo
-1
apps/docs/.astro/content-assets.mjs
···
1
1
-
export default new Map();
-1
apps/docs/.astro/content-modules.mjs
···
1
1
-
export default new Map();
-199
apps/docs/.astro/content.d.ts
···
1
1
-
declare module 'astro:content' {
2
2
-
export interface RenderResult {
3
3
-
Content: import('astro/runtime/server/index.js').AstroComponentFactory;
4
4
-
headings: import('astro').MarkdownHeading[];
5
5
-
remarkPluginFrontmatter: Record<string, any>;
6
6
-
}
7
7
-
interface Render {
8
8
-
'.md': Promise<RenderResult>;
9
9
-
}
10
10
-
11
11
-
export interface RenderedContent {
12
12
-
html: string;
13
13
-
metadata?: {
14
14
-
imagePaths: Array<string>;
15
15
-
[key: string]: unknown;
16
16
-
};
17
17
-
}
18
18
-
}
19
19
-
20
20
-
declare module 'astro:content' {
21
21
-
type Flatten<T> = T extends { [K: string]: infer U } ? U : never;
22
22
-
23
23
-
export type CollectionKey = keyof AnyEntryMap;
24
24
-
export type CollectionEntry<C extends CollectionKey> = Flatten<AnyEntryMap[C]>;
25
25
-
26
26
-
export type ContentCollectionKey = keyof ContentEntryMap;
27
27
-
export type DataCollectionKey = keyof DataEntryMap;
28
28
-
29
29
-
type AllValuesOf<T> = T extends any ? T[keyof T] : never;
30
30
-
type ValidContentEntrySlug<C extends keyof ContentEntryMap> = AllValuesOf<
31
31
-
ContentEntryMap[C]
32
32
-
>['slug'];
33
33
-
34
34
-
export type ReferenceDataEntry<
35
35
-
C extends CollectionKey,
36
36
-
E extends keyof DataEntryMap[C] = string,
37
37
-
> = {
38
38
-
collection: C;
39
39
-
id: E;
40
40
-
};
41
41
-
export type ReferenceContentEntry<
42
42
-
C extends keyof ContentEntryMap,
43
43
-
E extends ValidContentEntrySlug<C> | (string & {}) = string,
44
44
-
> = {
45
45
-
collection: C;
46
46
-
slug: E;
47
47
-
};
48
48
-
export type ReferenceLiveEntry<C extends keyof LiveContentConfig['collections']> = {
49
49
-
collection: C;
50
50
-
id: string;
51
51
-
};
52
52
-
53
53
-
/** @deprecated Use `getEntry` instead. */
54
54
-
export function getEntryBySlug<
55
55
-
C extends keyof ContentEntryMap,
56
56
-
E extends ValidContentEntrySlug<C> | (string & {}),
57
57
-
>(
58
58
-
collection: C,
59
59
-
// Note that this has to accept a regular string too, for SSR
60
60
-
entrySlug: E,
61
61
-
): E extends ValidContentEntrySlug<C>
62
62
-
? Promise<CollectionEntry<C>>
63
63
-
: Promise<CollectionEntry<C> | undefined>;
64
64
-
65
65
-
/** @deprecated Use `getEntry` instead. */
66
66
-
export function getDataEntryById<C extends keyof DataEntryMap, E extends keyof DataEntryMap[C]>(
67
67
-
collection: C,
68
68
-
entryId: E,
69
69
-
): Promise<CollectionEntry<C>>;
70
70
-
71
71
-
export function getCollection<C extends keyof AnyEntryMap, E extends CollectionEntry<C>>(
72
72
-
collection: C,
73
73
-
filter?: (entry: CollectionEntry<C>) => entry is E,
74
74
-
): Promise<E[]>;
75
75
-
export function getCollection<C extends keyof AnyEntryMap>(
76
76
-
collection: C,
77
77
-
filter?: (entry: CollectionEntry<C>) => unknown,
78
78
-
): Promise<CollectionEntry<C>[]>;
79
79
-
80
80
-
export function getLiveCollection<C extends keyof LiveContentConfig['collections']>(
81
81
-
collection: C,
82
82
-
filter?: LiveLoaderCollectionFilterType<C>,
83
83
-
): Promise<
84
84
-
import('astro').LiveDataCollectionResult<LiveLoaderDataType<C>, LiveLoaderErrorType<C>>
85
85
-
>;
86
86
-
87
87
-
export function getEntry<
88
88
-
C extends keyof ContentEntryMap,
89
89
-
E extends ValidContentEntrySlug<C> | (string & {}),
90
90
-
>(
91
91
-
entry: ReferenceContentEntry<C, E>,
92
92
-
): E extends ValidContentEntrySlug<C>
93
93
-
? Promise<CollectionEntry<C>>
94
94
-
: Promise<CollectionEntry<C> | undefined>;
95
95
-
export function getEntry<
96
96
-
C extends keyof DataEntryMap,
97
97
-
E extends keyof DataEntryMap[C] | (string & {}),
98
98
-
>(
99
99
-
entry: ReferenceDataEntry<C, E>,
100
100
-
): E extends keyof DataEntryMap[C]
101
101
-
? Promise<DataEntryMap[C][E]>
102
102
-
: Promise<CollectionEntry<C> | undefined>;
103
103
-
export function getEntry<
104
104
-
C extends keyof ContentEntryMap,
105
105
-
E extends ValidContentEntrySlug<C> | (string & {}),
106
106
-
>(
107
107
-
collection: C,
108
108
-
slug: E,
109
109
-
): E extends ValidContentEntrySlug<C>
110
110
-
? Promise<CollectionEntry<C>>
111
111
-
: Promise<CollectionEntry<C> | undefined>;
112
112
-
export function getEntry<
113
113
-
C extends keyof DataEntryMap,
114
114
-
E extends keyof DataEntryMap[C] | (string & {}),
115
115
-
>(
116
116
-
collection: C,
117
117
-
id: E,
118
118
-
): E extends keyof DataEntryMap[C]
119
119
-
? string extends keyof DataEntryMap[C]
120
120
-
? Promise<DataEntryMap[C][E]> | undefined
121
121
-
: Promise<DataEntryMap[C][E]>
122
122
-
: Promise<CollectionEntry<C> | undefined>;
123
123
-
export function getLiveEntry<C extends keyof LiveContentConfig['collections']>(
124
124
-
collection: C,
125
125
-
filter: string | LiveLoaderEntryFilterType<C>,
126
126
-
): Promise<import('astro').LiveDataEntryResult<LiveLoaderDataType<C>, LiveLoaderErrorType<C>>>;
127
127
-
128
128
-
/** Resolve an array of entry references from the same collection */
129
129
-
export function getEntries<C extends keyof ContentEntryMap>(
130
130
-
entries: ReferenceContentEntry<C, ValidContentEntrySlug<C>>[],
131
131
-
): Promise<CollectionEntry<C>[]>;
132
132
-
export function getEntries<C extends keyof DataEntryMap>(
133
133
-
entries: ReferenceDataEntry<C, keyof DataEntryMap[C]>[],
134
134
-
): Promise<CollectionEntry<C>[]>;
135
135
-
136
136
-
export function render<C extends keyof AnyEntryMap>(
137
137
-
entry: AnyEntryMap[C][string],
138
138
-
): Promise<RenderResult>;
139
139
-
140
140
-
export function reference<C extends keyof AnyEntryMap>(
141
141
-
collection: C,
142
142
-
): import('astro/zod').ZodEffects<
143
143
-
import('astro/zod').ZodString,
144
144
-
C extends keyof ContentEntryMap
145
145
-
? ReferenceContentEntry<C, ValidContentEntrySlug<C>>
146
146
-
: ReferenceDataEntry<C, keyof DataEntryMap[C]>
147
147
-
>;
148
148
-
// Allow generic `string` to avoid excessive type errors in the config
149
149
-
// if `dev` is not running to update as you edit.
150
150
-
// Invalid collection names will be caught at build time.
151
151
-
export function reference<C extends string>(
152
152
-
collection: C,
153
153
-
): import('astro/zod').ZodEffects<import('astro/zod').ZodString, never>;
154
154
-
155
155
-
type ReturnTypeOrOriginal<T> = T extends (...args: any[]) => infer R ? R : T;
156
156
-
type InferEntrySchema<C extends keyof AnyEntryMap> = import('astro/zod').infer<
157
157
-
ReturnTypeOrOriginal<Required<ContentConfig['collections'][C]>['schema']>
158
158
-
>;
159
159
-
160
160
-
type ContentEntryMap = {
161
161
-
162
162
-
};
163
163
-
164
164
-
type DataEntryMap = {
165
165
-
166
166
-
};
167
167
-
168
168
-
type AnyEntryMap = ContentEntryMap & DataEntryMap;
169
169
-
170
170
-
type ExtractLoaderTypes<T> = T extends import('astro/loaders').LiveLoader<
171
171
-
infer TData,
172
172
-
infer TEntryFilter,
173
173
-
infer TCollectionFilter,
174
174
-
infer TError
175
175
-
>
176
176
-
? { data: TData; entryFilter: TEntryFilter; collectionFilter: TCollectionFilter; error: TError }
177
177
-
: { data: never; entryFilter: never; collectionFilter: never; error: never };
178
178
-
type ExtractDataType<T> = ExtractLoaderTypes<T>['data'];
179
179
-
type ExtractEntryFilterType<T> = ExtractLoaderTypes<T>['entryFilter'];
180
180
-
type ExtractCollectionFilterType<T> = ExtractLoaderTypes<T>['collectionFilter'];
181
181
-
type ExtractErrorType<T> = ExtractLoaderTypes<T>['error'];
182
182
-
183
183
-
type LiveLoaderDataType<C extends keyof LiveContentConfig['collections']> =
184
184
-
LiveContentConfig['collections'][C]['schema'] extends undefined
185
185
-
? ExtractDataType<LiveContentConfig['collections'][C]['loader']>
186
186
-
: import('astro/zod').infer<
187
187
-
Exclude<LiveContentConfig['collections'][C]['schema'], undefined>
188
188
-
>;
189
189
-
type LiveLoaderEntryFilterType<C extends keyof LiveContentConfig['collections']> =
190
190
-
ExtractEntryFilterType<LiveContentConfig['collections'][C]['loader']>;
191
191
-
type LiveLoaderCollectionFilterType<C extends keyof LiveContentConfig['collections']> =
192
192
-
ExtractCollectionFilterType<LiveContentConfig['collections'][C]['loader']>;
193
193
-
type LiveLoaderErrorType<C extends keyof LiveContentConfig['collections']> = ExtractErrorType<
194
194
-
LiveContentConfig['collections'][C]['loader']
195
195
-
>;
196
196
-
197
197
-
export type ContentConfig = typeof import("../src/content.config.mjs");
198
198
-
export type LiveContentConfig = never;
199
199
-
}
-1
apps/docs/.astro/data-store.json
···
1
1
-
[["Map",1,2],"meta::meta",["Map",3,4,5,6],"astro-version","5.16.6","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":4321,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[],\"responsiveStyles\":false},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true,\"allowedDomains\":[]},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false,\"liveContentCollections\":false,\"csp\":false,\"staticImportMetaEnv\":false,\"chromeDevtoolsWorkspace\":false,\"failOnPrerenderConflict\":false,\"svgo\":false},\"legacy\":{\"collections\":false}}"]
-5
apps/docs/.astro/settings.json
···
1
1
-
{
2
2
-
"_variables": {
3
3
-
"lastUpdateCheck": 1769113797068
4
4
-
}
5
5
-
}
-1
apps/docs/.astro/types.d.ts
···
1
1
-
/// <reference types="astro/client" />
+1
apps/docs/.gitignore
···
1
1
+
.astro
+1
apps/playground/.gitignore
···
1
1
+
dist
+1
packages/core/.gitignore
···
1
1
+
dist
+1
packages/math/.gitignore
···
1
1
+
dist