@longform/async 0.2.0 → 0.2.1

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,1202 @@
1
+ {
2
+ "metadata": {
3
+ "toolPackage": "@microsoft/api-extractor",
4
+ "toolVersion": "7.58.10",
5
+ "schemaVersion": 1011,
6
+ "oldestForwardsCompatibleVersion": 1001,
7
+ "tsdocConfig": {
8
+ "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
9
+ "noStandardTags": true,
10
+ "tagDefinitions": [
11
+ {
12
+ "tagName": "@alpha",
13
+ "syntaxKind": "modifier"
14
+ },
15
+ {
16
+ "tagName": "@beta",
17
+ "syntaxKind": "modifier"
18
+ },
19
+ {
20
+ "tagName": "@defaultValue",
21
+ "syntaxKind": "block"
22
+ },
23
+ {
24
+ "tagName": "@decorator",
25
+ "syntaxKind": "block",
26
+ "allowMultiple": true
27
+ },
28
+ {
29
+ "tagName": "@deprecated",
30
+ "syntaxKind": "block"
31
+ },
32
+ {
33
+ "tagName": "@eventProperty",
34
+ "syntaxKind": "modifier"
35
+ },
36
+ {
37
+ "tagName": "@example",
38
+ "syntaxKind": "block",
39
+ "allowMultiple": true
40
+ },
41
+ {
42
+ "tagName": "@experimental",
43
+ "syntaxKind": "modifier"
44
+ },
45
+ {
46
+ "tagName": "@inheritDoc",
47
+ "syntaxKind": "inline"
48
+ },
49
+ {
50
+ "tagName": "@internal",
51
+ "syntaxKind": "modifier"
52
+ },
53
+ {
54
+ "tagName": "@label",
55
+ "syntaxKind": "inline"
56
+ },
57
+ {
58
+ "tagName": "@link",
59
+ "syntaxKind": "inline",
60
+ "allowMultiple": true
61
+ },
62
+ {
63
+ "tagName": "@override",
64
+ "syntaxKind": "modifier"
65
+ },
66
+ {
67
+ "tagName": "@packageDocumentation",
68
+ "syntaxKind": "modifier"
69
+ },
70
+ {
71
+ "tagName": "@param",
72
+ "syntaxKind": "block",
73
+ "allowMultiple": true
74
+ },
75
+ {
76
+ "tagName": "@privateRemarks",
77
+ "syntaxKind": "block"
78
+ },
79
+ {
80
+ "tagName": "@public",
81
+ "syntaxKind": "modifier"
82
+ },
83
+ {
84
+ "tagName": "@readonly",
85
+ "syntaxKind": "modifier"
86
+ },
87
+ {
88
+ "tagName": "@remarks",
89
+ "syntaxKind": "block"
90
+ },
91
+ {
92
+ "tagName": "@returns",
93
+ "syntaxKind": "block"
94
+ },
95
+ {
96
+ "tagName": "@sealed",
97
+ "syntaxKind": "modifier"
98
+ },
99
+ {
100
+ "tagName": "@see",
101
+ "syntaxKind": "block"
102
+ },
103
+ {
104
+ "tagName": "@throws",
105
+ "syntaxKind": "block",
106
+ "allowMultiple": true
107
+ },
108
+ {
109
+ "tagName": "@typeParam",
110
+ "syntaxKind": "block",
111
+ "allowMultiple": true
112
+ },
113
+ {
114
+ "tagName": "@virtual",
115
+ "syntaxKind": "modifier"
116
+ },
117
+ {
118
+ "tagName": "@jsx",
119
+ "syntaxKind": "block"
120
+ },
121
+ {
122
+ "tagName": "@jsxRuntime",
123
+ "syntaxKind": "block"
124
+ },
125
+ {
126
+ "tagName": "@jsxFrag",
127
+ "syntaxKind": "block"
128
+ },
129
+ {
130
+ "tagName": "@jsxImportSource",
131
+ "syntaxKind": "block"
132
+ },
133
+ {
134
+ "tagName": "@betaDocumentation",
135
+ "syntaxKind": "modifier"
136
+ },
137
+ {
138
+ "tagName": "@internalRemarks",
139
+ "syntaxKind": "block"
140
+ },
141
+ {
142
+ "tagName": "@preapproved",
143
+ "syntaxKind": "modifier"
144
+ }
145
+ ],
146
+ "supportForTags": {
147
+ "@alpha": true,
148
+ "@beta": true,
149
+ "@defaultValue": true,
150
+ "@decorator": true,
151
+ "@deprecated": true,
152
+ "@eventProperty": true,
153
+ "@example": true,
154
+ "@experimental": true,
155
+ "@inheritDoc": true,
156
+ "@internal": true,
157
+ "@label": true,
158
+ "@link": true,
159
+ "@override": true,
160
+ "@packageDocumentation": true,
161
+ "@param": true,
162
+ "@privateRemarks": true,
163
+ "@public": true,
164
+ "@readonly": true,
165
+ "@remarks": true,
166
+ "@returns": true,
167
+ "@sealed": true,
168
+ "@see": true,
169
+ "@throws": true,
170
+ "@typeParam": true,
171
+ "@virtual": true,
172
+ "@betaDocumentation": true,
173
+ "@internalRemarks": true,
174
+ "@preapproved": true
175
+ },
176
+ "reportUnsupportedHtmlElements": false
177
+ }
178
+ },
179
+ "kind": "Package",
180
+ "canonicalReference": "@longform/async!",
181
+ "docComment": "",
182
+ "name": "@longform/async",
183
+ "preserveMemberOrder": false,
184
+ "members": [
185
+ {
186
+ "kind": "EntryPoint",
187
+ "canonicalReference": "@longform/async!",
188
+ "name": "",
189
+ "preserveMemberOrder": false,
190
+ "members": [
191
+ {
192
+ "kind": "TypeAlias",
193
+ "canonicalReference": "@longform/async!Annotation:type",
194
+ "docComment": "/**\n * The annotation method sets how data attributes can be set on elements outputted by the Longform parser. This is used by clients when searching the DOM for server rendered fragments, or in editing situations.\n *\n * `predictable` should only be used in situations where untrusted user data is not being added to the response. All data attributes would be prefixed with the `data-lf-` prefix, unless a `key` is passed in via the parser args.\n *\n * The predictable mode does not annotate fragments using data attributes if they have a Longform identifier as their HTML id.\n *\n * `obscure` creates a key that is hard to guess in advance when the document is created on the server. This should work in situations where HTTP caching is involved if the full document is created in one pass before being cached, as any untrusted data would also be baked into the response at the time of the obscure key's generation.\n *\n * This approach to obscuring potential data-attribute conflicts is not fool proof. Do not use it in situations where part of a Longform document would be parsed and cached before passing into another document which includes untrusted user data. The first pass might cache the obscure key and allow users to mimic the response and define blocks of HTML that are picked by the client's DOM processing logic.\n *\n * @see\n *\n * [Longform's security considerations](https://longform.occultist.dev/#security-considerations)\n */\n",
195
+ "excerptTokens": [
196
+ {
197
+ "kind": "Content",
198
+ "text": "export type Annotation = "
199
+ },
200
+ {
201
+ "kind": "Content",
202
+ "text": "'none' | 'predictable' | 'obscure'"
203
+ },
204
+ {
205
+ "kind": "Content",
206
+ "text": ";"
207
+ }
208
+ ],
209
+ "fileUrlPath": "dist/types_temp/types.d.ts",
210
+ "releaseTag": "Public",
211
+ "name": "Annotation",
212
+ "typeTokenRange": {
213
+ "startIndex": 1,
214
+ "endIndex": 2
215
+ }
216
+ },
217
+ {
218
+ "kind": "TypeAlias",
219
+ "canonicalReference": "@longform/async!AsyncRenderCtx:type",
220
+ "docComment": "/**\n * Context supplied to async directives.\n */\n",
221
+ "excerptTokens": [
222
+ {
223
+ "kind": "Content",
224
+ "text": "export type AsyncRenderCtx = "
225
+ },
226
+ {
227
+ "kind": "Content",
228
+ "text": "{\n inlineArgs?: string;\n blockArgs?: string;\n doc: "
229
+ },
230
+ {
231
+ "kind": "Reference",
232
+ "text": "Readonly",
233
+ "canonicalReference": "!Readonly:type"
234
+ },
235
+ {
236
+ "kind": "Content",
237
+ "text": "<"
238
+ },
239
+ {
240
+ "kind": "Reference",
241
+ "text": "Doc",
242
+ "canonicalReference": "@longform/async!Doc:type"
243
+ },
244
+ {
245
+ "kind": "Content",
246
+ "text": ">;\n}"
247
+ },
248
+ {
249
+ "kind": "Content",
250
+ "text": ";"
251
+ }
252
+ ],
253
+ "fileUrlPath": "dist/types_temp/types.d.ts",
254
+ "releaseTag": "Public",
255
+ "name": "AsyncRenderCtx",
256
+ "typeTokenRange": {
257
+ "startIndex": 1,
258
+ "endIndex": 6
259
+ }
260
+ },
261
+ {
262
+ "kind": "TypeAlias",
263
+ "canonicalReference": "@longform/async!AttrCtx:type",
264
+ "docComment": "/**\n * Context supplied to attr directives\n */\n",
265
+ "excerptTokens": [
266
+ {
267
+ "kind": "Content",
268
+ "text": "export type AttrCtx = "
269
+ },
270
+ {
271
+ "kind": "Content",
272
+ "text": "{\n tag: string;\n doc: "
273
+ },
274
+ {
275
+ "kind": "Reference",
276
+ "text": "Readonly",
277
+ "canonicalReference": "!Readonly:type"
278
+ },
279
+ {
280
+ "kind": "Content",
281
+ "text": "<"
282
+ },
283
+ {
284
+ "kind": "Reference",
285
+ "text": "Doc",
286
+ "canonicalReference": "@longform/async!Doc:type"
287
+ },
288
+ {
289
+ "kind": "Content",
290
+ "text": ">;\n}"
291
+ },
292
+ {
293
+ "kind": "Content",
294
+ "text": ";"
295
+ }
296
+ ],
297
+ "fileUrlPath": "dist/types_temp/types.d.ts",
298
+ "releaseTag": "Public",
299
+ "name": "AttrCtx",
300
+ "typeTokenRange": {
301
+ "startIndex": 1,
302
+ "endIndex": 6
303
+ }
304
+ },
305
+ {
306
+ "kind": "TypeAlias",
307
+ "canonicalReference": "@longform/async!Directive:type",
308
+ "docComment": "/**\n * Directive definition object. Directives can support multiple roles but some crate ambiguities and should not be used together. The parser will ignore the directive if it implements hooks for conflicting roles.\n *\n * A directive implementing `meta` cannot implement `element`. A directive implementing `element` cannot implement `render` or `asyncRender`. A directive implementing `render` cannot implement `asyncRender`.\n */\n",
309
+ "excerptTokens": [
310
+ {
311
+ "kind": "Content",
312
+ "text": "export type Directive = "
313
+ },
314
+ {
315
+ "kind": "Content",
316
+ "text": "{\n meta?: (args: "
317
+ },
318
+ {
319
+ "kind": "Reference",
320
+ "text": "MetaCtx",
321
+ "canonicalReference": "@longform/async!MetaCtx:type"
322
+ },
323
+ {
324
+ "kind": "Content",
325
+ "text": ") => unknown;\n global?: (ctx: "
326
+ },
327
+ {
328
+ "kind": "Reference",
329
+ "text": "GlobalCtx",
330
+ "canonicalReference": "@longform/async!GlobalCtx:type"
331
+ },
332
+ {
333
+ "kind": "Content",
334
+ "text": ") => void;\n attr?: (ctx: "
335
+ },
336
+ {
337
+ "kind": "Reference",
338
+ "text": "AttrCtx",
339
+ "canonicalReference": "@longform/async!AttrCtx:type"
340
+ },
341
+ {
342
+ "kind": "Content",
343
+ "text": ") => string | boolean | undefined | null;\n element?: (ctx: "
344
+ },
345
+ {
346
+ "kind": "Reference",
347
+ "text": "ElementCtx",
348
+ "canonicalReference": "@longform/async!ElementCtx:type"
349
+ },
350
+ {
351
+ "kind": "Content",
352
+ "text": ") => void;\n render?: (ctx: "
353
+ },
354
+ {
355
+ "kind": "Reference",
356
+ "text": "RenderCtx",
357
+ "canonicalReference": "@longform/async!RenderCtx:type"
358
+ },
359
+ {
360
+ "kind": "Content",
361
+ "text": ") => string | undefined;\n asyncRender?: (ctx: "
362
+ },
363
+ {
364
+ "kind": "Reference",
365
+ "text": "AsyncRenderCtx",
366
+ "canonicalReference": "@longform/async!AsyncRenderCtx:type"
367
+ },
368
+ {
369
+ "kind": "Content",
370
+ "text": ") => string | undefined | "
371
+ },
372
+ {
373
+ "kind": "Reference",
374
+ "text": "Promise",
375
+ "canonicalReference": "!Promise:interface"
376
+ },
377
+ {
378
+ "kind": "Content",
379
+ "text": "<string | undefined>;\n}"
380
+ },
381
+ {
382
+ "kind": "Content",
383
+ "text": ";"
384
+ }
385
+ ],
386
+ "fileUrlPath": "dist/types_temp/types.d.ts",
387
+ "releaseTag": "Public",
388
+ "name": "Directive",
389
+ "typeTokenRange": {
390
+ "startIndex": 1,
391
+ "endIndex": 16
392
+ }
393
+ },
394
+ {
395
+ "kind": "TypeAlias",
396
+ "canonicalReference": "@longform/async!Doc:type",
397
+ "docComment": "/**\n * A doc object used to provide directives with meta information about the doc while it is being parsed.\n */\n",
398
+ "excerptTokens": [
399
+ {
400
+ "kind": "Content",
401
+ "text": "export type Doc = "
402
+ },
403
+ {
404
+ "kind": "Content",
405
+ "text": "{\n id?: string;\n type?: string;\n lang?: string;\n dir?: string;\n meta: "
406
+ },
407
+ {
408
+ "kind": "Reference",
409
+ "text": "Readonly",
410
+ "canonicalReference": "!Readonly:type"
411
+ },
412
+ {
413
+ "kind": "Content",
414
+ "text": "<"
415
+ },
416
+ {
417
+ "kind": "Reference",
418
+ "text": "Record",
419
+ "canonicalReference": "!Record:type"
420
+ },
421
+ {
422
+ "kind": "Content",
423
+ "text": "<string, unknown>>;\n}"
424
+ },
425
+ {
426
+ "kind": "Content",
427
+ "text": ";"
428
+ }
429
+ ],
430
+ "fileUrlPath": "dist/types_temp/types.d.ts",
431
+ "releaseTag": "Public",
432
+ "name": "Doc",
433
+ "typeTokenRange": {
434
+ "startIndex": 1,
435
+ "endIndex": 6
436
+ }
437
+ },
438
+ {
439
+ "kind": "TypeAlias",
440
+ "canonicalReference": "@longform/async!Element_2:type",
441
+ "docComment": "/**\n * An element's description. Directives with access to elements should only apply changes to its `attrs` object. The `id` can be set via the `attrs` object if it does not already have a value, and classes can be appended to the `class` value via the `attrs` object.\n *\n * The element's tag cannot be changed.\n */\n",
442
+ "excerptTokens": [
443
+ {
444
+ "kind": "Content",
445
+ "text": "export type Element = "
446
+ },
447
+ {
448
+ "kind": "Content",
449
+ "text": "{\n tag: string;\n id?: string;\n class?: string;\n attrs: "
450
+ },
451
+ {
452
+ "kind": "Reference",
453
+ "text": "Record",
454
+ "canonicalReference": "!Record:type"
455
+ },
456
+ {
457
+ "kind": "Content",
458
+ "text": "<string, boolean | string>;\n}"
459
+ },
460
+ {
461
+ "kind": "Content",
462
+ "text": ";"
463
+ }
464
+ ],
465
+ "fileUrlPath": "dist/types_temp/types.d.ts",
466
+ "releaseTag": "Public",
467
+ "name": "Element_2",
468
+ "typeTokenRange": {
469
+ "startIndex": 1,
470
+ "endIndex": 4
471
+ }
472
+ },
473
+ {
474
+ "kind": "TypeAlias",
475
+ "canonicalReference": "@longform/async!ElementCtx:type",
476
+ "docComment": "/**\n * Context supplied to element directives.\n */\n",
477
+ "excerptTokens": [
478
+ {
479
+ "kind": "Content",
480
+ "text": "export type ElementCtx = "
481
+ },
482
+ {
483
+ "kind": "Content",
484
+ "text": "{\n inlineArgs?: string;\n blockArgs?: string;\n doc: "
485
+ },
486
+ {
487
+ "kind": "Reference",
488
+ "text": "Readonly",
489
+ "canonicalReference": "!Readonly:type"
490
+ },
491
+ {
492
+ "kind": "Content",
493
+ "text": "<"
494
+ },
495
+ {
496
+ "kind": "Reference",
497
+ "text": "Doc",
498
+ "canonicalReference": "@longform/async!Doc:type"
499
+ },
500
+ {
501
+ "kind": "Content",
502
+ "text": ">;\n el: "
503
+ },
504
+ {
505
+ "kind": "Reference",
506
+ "text": "Element",
507
+ "canonicalReference": "@longform/async!Element_2:type"
508
+ },
509
+ {
510
+ "kind": "Content",
511
+ "text": ";\n chain: "
512
+ },
513
+ {
514
+ "kind": "Reference",
515
+ "text": "Element",
516
+ "canonicalReference": "@longform/async!Element_2:type"
517
+ },
518
+ {
519
+ "kind": "Content",
520
+ "text": "[];\n}"
521
+ },
522
+ {
523
+ "kind": "Content",
524
+ "text": ";"
525
+ }
526
+ ],
527
+ "fileUrlPath": "dist/types_temp/types.d.ts",
528
+ "releaseTag": "Public",
529
+ "name": "ElementCtx",
530
+ "typeTokenRange": {
531
+ "startIndex": 1,
532
+ "endIndex": 10
533
+ }
534
+ },
535
+ {
536
+ "kind": "TypeAlias",
537
+ "canonicalReference": "@longform/async!Fragment:type",
538
+ "docComment": "/**\n * A fragment object.\n */\n",
539
+ "excerptTokens": [
540
+ {
541
+ "kind": "Content",
542
+ "text": "export type Fragment = "
543
+ },
544
+ {
545
+ "kind": "Content",
546
+ "text": "{\n id: string;\n selector: string;\n type: "
547
+ },
548
+ {
549
+ "kind": "Reference",
550
+ "text": "FragmentType",
551
+ "canonicalReference": "@longform/async!FragmentType:type"
552
+ },
553
+ {
554
+ "kind": "Content",
555
+ "text": ";\n html: string;\n}"
556
+ },
557
+ {
558
+ "kind": "Content",
559
+ "text": ";"
560
+ }
561
+ ],
562
+ "fileUrlPath": "dist/types_temp/types.d.ts",
563
+ "releaseTag": "Public",
564
+ "name": "Fragment",
565
+ "typeTokenRange": {
566
+ "startIndex": 1,
567
+ "endIndex": 4
568
+ }
569
+ },
570
+ {
571
+ "kind": "TypeAlias",
572
+ "canonicalReference": "@longform/async!FragmentType:type",
573
+ "docComment": "/**\n * The fragment type.\n *\n * `embed` indicates the fragment has a unique embedded HTML id. `bare` indicates the fragment has no embedded HTML id. `range` indicates the fragment is a range of elements, instead of having a single top level element. `text` indicates the fragment is text only can can be used in situations where HTML might be invalid.\n */\n",
574
+ "excerptTokens": [
575
+ {
576
+ "kind": "Content",
577
+ "text": "export type FragmentType = "
578
+ },
579
+ {
580
+ "kind": "Content",
581
+ "text": "'embed' | 'bare' | 'range' | 'text'"
582
+ },
583
+ {
584
+ "kind": "Content",
585
+ "text": ";"
586
+ }
587
+ ],
588
+ "fileUrlPath": "dist/types_temp/types.d.ts",
589
+ "releaseTag": "Public",
590
+ "name": "FragmentType",
591
+ "typeTokenRange": {
592
+ "startIndex": 1,
593
+ "endIndex": 2
594
+ }
595
+ },
596
+ {
597
+ "kind": "TypeAlias",
598
+ "canonicalReference": "@longform/async!GlobalCtx:type",
599
+ "docComment": "/**\n * Context supplied to directives declared in the global directive.\n */\n",
600
+ "excerptTokens": [
601
+ {
602
+ "kind": "Content",
603
+ "text": "export type GlobalCtx = "
604
+ },
605
+ {
606
+ "kind": "Content",
607
+ "text": "{\n doc: "
608
+ },
609
+ {
610
+ "kind": "Reference",
611
+ "text": "Doc",
612
+ "canonicalReference": "@longform/async!Doc:type"
613
+ },
614
+ {
615
+ "kind": "Content",
616
+ "text": ";\n}"
617
+ },
618
+ {
619
+ "kind": "Content",
620
+ "text": ";"
621
+ }
622
+ ],
623
+ "fileUrlPath": "dist/types_temp/types.d.ts",
624
+ "releaseTag": "Public",
625
+ "name": "GlobalCtx",
626
+ "typeTokenRange": {
627
+ "startIndex": 1,
628
+ "endIndex": 4
629
+ }
630
+ },
631
+ {
632
+ "kind": "Function",
633
+ "canonicalReference": "@longform/async!longform:function(1)",
634
+ "docComment": "/**\n * Parses a longform document into a object containing the root and fragments in the output format.\n *\n * @param input - The Longform document to parse.\n *\n * @param args - Arguments for the Longform parser.\n */\n",
635
+ "excerptTokens": [
636
+ {
637
+ "kind": "Content",
638
+ "text": "export declare function longform(input: "
639
+ },
640
+ {
641
+ "kind": "Content",
642
+ "text": "string"
643
+ },
644
+ {
645
+ "kind": "Content",
646
+ "text": ", args?: "
647
+ },
648
+ {
649
+ "kind": "Reference",
650
+ "text": "LongformArgs",
651
+ "canonicalReference": "@longform/async!LongformArgs:type"
652
+ },
653
+ {
654
+ "kind": "Content",
655
+ "text": "): "
656
+ },
657
+ {
658
+ "kind": "Reference",
659
+ "text": "Promise",
660
+ "canonicalReference": "!Promise:interface"
661
+ },
662
+ {
663
+ "kind": "Content",
664
+ "text": "<"
665
+ },
666
+ {
667
+ "kind": "Reference",
668
+ "text": "ParsedLongform",
669
+ "canonicalReference": "@longform/async!ParsedLongform:type"
670
+ },
671
+ {
672
+ "kind": "Content",
673
+ "text": ">"
674
+ },
675
+ {
676
+ "kind": "Content",
677
+ "text": ";"
678
+ }
679
+ ],
680
+ "fileUrlPath": "dist/types_temp/longform.d.ts",
681
+ "returnTypeTokenRange": {
682
+ "startIndex": 5,
683
+ "endIndex": 9
684
+ },
685
+ "releaseTag": "Public",
686
+ "overloadIndex": 1,
687
+ "parameters": [
688
+ {
689
+ "parameterName": "input",
690
+ "parameterTypeTokenRange": {
691
+ "startIndex": 1,
692
+ "endIndex": 2
693
+ },
694
+ "isOptional": false
695
+ },
696
+ {
697
+ "parameterName": "args",
698
+ "parameterTypeTokenRange": {
699
+ "startIndex": 3,
700
+ "endIndex": 4
701
+ },
702
+ "isOptional": true
703
+ }
704
+ ],
705
+ "name": "longform"
706
+ },
707
+ {
708
+ "kind": "TypeAlias",
709
+ "canonicalReference": "@longform/async!LongformArgs:type",
710
+ "docComment": "/**\n * The Longform parser is designed to serve multiple roles.\n *\n * In a situation where a document containing a HTML page's main content is split from a re-useable layout the `'doc'` output mode can be used on the main content and the result passed as arguments to the Longform parser when parsing the layout document. The id, type, lang and direction as well as any custom meta values and the parsed fragments from the main document will be available to the template's fragments.\n *\n * In a situation where a directive is being defined, the output mode `head` can be used to use the Longform parser as a DSL for custom directives. The `templates` output mode can be used to parse the block arguments of the directive as Longform templates, with the directive supplying arguments specified by the directive.\n *\n * The `mountable` output mode is used where Longform needs to be outputted so another libraries SSR rendered content can fill the gaps in mountable elements. Usually this would be used for a layout document which is used in a similar way to Astro's islands.\n */\n",
711
+ "excerptTokens": [
712
+ {
713
+ "kind": "Content",
714
+ "text": "export type LongformArgs = "
715
+ },
716
+ {
717
+ "kind": "Content",
718
+ "text": "{\n key?: string;\n id?: string;\n type?: string;\n lang?: string;\n dir?: string;\n meta?: "
719
+ },
720
+ {
721
+ "kind": "Reference",
722
+ "text": "Record",
723
+ "canonicalReference": "!Record:type"
724
+ },
725
+ {
726
+ "kind": "Content",
727
+ "text": "<string, unknown>;\n targetType?: "
728
+ },
729
+ {
730
+ "kind": "Reference",
731
+ "text": "TargetType",
732
+ "canonicalReference": "@longform/async!TargetType:type"
733
+ },
734
+ {
735
+ "kind": "Content",
736
+ "text": ";\n outputMode?: "
737
+ },
738
+ {
739
+ "kind": "Reference",
740
+ "text": "OutputMode",
741
+ "canonicalReference": "@longform/async!OutputMode:type"
742
+ },
743
+ {
744
+ "kind": "Content",
745
+ "text": ";\n annotations?: "
746
+ },
747
+ {
748
+ "kind": "Reference",
749
+ "text": "Annotation",
750
+ "canonicalReference": "@longform/async!Annotation:type"
751
+ },
752
+ {
753
+ "kind": "Content",
754
+ "text": ";\n directives?: "
755
+ },
756
+ {
757
+ "kind": "Reference",
758
+ "text": "Record",
759
+ "canonicalReference": "!Record:type"
760
+ },
761
+ {
762
+ "kind": "Content",
763
+ "text": "<string, "
764
+ },
765
+ {
766
+ "kind": "Reference",
767
+ "text": "Directive",
768
+ "canonicalReference": "@longform/async!Directive:type"
769
+ },
770
+ {
771
+ "kind": "Content",
772
+ "text": ">;\n fragments?: "
773
+ },
774
+ {
775
+ "kind": "Reference",
776
+ "text": "Record",
777
+ "canonicalReference": "!Record:type"
778
+ },
779
+ {
780
+ "kind": "Content",
781
+ "text": "<string, "
782
+ },
783
+ {
784
+ "kind": "Reference",
785
+ "text": "Fragment",
786
+ "canonicalReference": "@longform/async!Fragment:type"
787
+ },
788
+ {
789
+ "kind": "Content",
790
+ "text": ">;\n}"
791
+ },
792
+ {
793
+ "kind": "Content",
794
+ "text": ";"
795
+ }
796
+ ],
797
+ "fileUrlPath": "dist/types_temp/types.d.ts",
798
+ "releaseTag": "Public",
799
+ "name": "LongformArgs",
800
+ "typeTokenRange": {
801
+ "startIndex": 1,
802
+ "endIndex": 18
803
+ }
804
+ },
805
+ {
806
+ "kind": "TypeAlias",
807
+ "canonicalReference": "@longform/async!MetaCtx:type",
808
+ "docComment": "/**\n * Context supplied to meta directives.\n */\n",
809
+ "excerptTokens": [
810
+ {
811
+ "kind": "Content",
812
+ "text": "export type MetaCtx = "
813
+ },
814
+ {
815
+ "kind": "Content",
816
+ "text": "{\n inlineArgs?: string;\n blockArgs?: string;\n}"
817
+ },
818
+ {
819
+ "kind": "Content",
820
+ "text": ";"
821
+ }
822
+ ],
823
+ "fileUrlPath": "dist/types_temp/types.d.ts",
824
+ "releaseTag": "Public",
825
+ "name": "MetaCtx",
826
+ "typeTokenRange": {
827
+ "startIndex": 1,
828
+ "endIndex": 2
829
+ }
830
+ },
831
+ {
832
+ "kind": "TypeAlias",
833
+ "canonicalReference": "@longform/async!MountPoint:type",
834
+ "docComment": "/**\n * If the parser's output mode is `mountable`, the Longform parser will break output of the root element up in locations where the `@mount:: mountPointId` directive is used.\n */\n",
835
+ "excerptTokens": [
836
+ {
837
+ "kind": "Content",
838
+ "text": "export type MountPoint = "
839
+ },
840
+ {
841
+ "kind": "Content",
842
+ "text": "{\n id: string;\n part: string;\n}"
843
+ },
844
+ {
845
+ "kind": "Content",
846
+ "text": ";"
847
+ }
848
+ ],
849
+ "fileUrlPath": "dist/types_temp/types.d.ts",
850
+ "releaseTag": "Public",
851
+ "name": "MountPoint",
852
+ "typeTokenRange": {
853
+ "startIndex": 1,
854
+ "endIndex": 2
855
+ }
856
+ },
857
+ {
858
+ "kind": "TypeAlias",
859
+ "canonicalReference": "@longform/async!OutputMode:type",
860
+ "docComment": "/**\n * The Longform parser supports several output modes which are useful for different situations.\n *\n * `doc` Outputs all fragments normally.\n *\n * `head` Parses the `\\@id`, `\\@type`, `\\@lang`, `\\@dir` and any directives implementing the `meta` directive hook. It exits as soon as it hits another directive type or fragment declaration.\n *\n * `mountable` Supports use of the `\\@mount` directive for turning elements into mountpoints. This output mode populates the `mountpoints` array in the parse result. This array can be looped over and data from another rendering tool can mount its output into the named mount points. Once all mountpoint entries have been populated the `tail` property in the parsed result should be appended to the final document.\n *\n * The mountable mode is currently very basic in implementation and only supports documents implementing a single root element.\n *\n * `templates` parses every fragment as though it was a template even if the `\\@template` directive is not used. This is useful for creating directives which use the block args to define a Longform template.\n */\n",
861
+ "excerptTokens": [
862
+ {
863
+ "kind": "Content",
864
+ "text": "export type OutputMode = "
865
+ },
866
+ {
867
+ "kind": "Content",
868
+ "text": "'doc' | 'head' | 'mountable' | 'templates'"
869
+ },
870
+ {
871
+ "kind": "Content",
872
+ "text": ";"
873
+ }
874
+ ],
875
+ "fileUrlPath": "dist/types_temp/types.d.ts",
876
+ "releaseTag": "Public",
877
+ "name": "OutputMode",
878
+ "typeTokenRange": {
879
+ "startIndex": 1,
880
+ "endIndex": 2
881
+ }
882
+ },
883
+ {
884
+ "kind": "TypeAlias",
885
+ "canonicalReference": "@longform/async!ParsedLongform:type",
886
+ "docComment": "/**\n * An object containing the parsed Longform result.\n */\n",
887
+ "excerptTokens": [
888
+ {
889
+ "kind": "Content",
890
+ "text": "export type ParsedLongform = "
891
+ },
892
+ {
893
+ "kind": "Content",
894
+ "text": "{\n key?: string;\n id?: string;\n type?: string;\n lang?: string;\n dir?: string;\n meta: "
895
+ },
896
+ {
897
+ "kind": "Reference",
898
+ "text": "Record",
899
+ "canonicalReference": "!Record:type"
900
+ },
901
+ {
902
+ "kind": "Content",
903
+ "text": "<string, unknown>;\n targetType?: "
904
+ },
905
+ {
906
+ "kind": "Reference",
907
+ "text": "TargetType",
908
+ "canonicalReference": "@longform/async!TargetType:type"
909
+ },
910
+ {
911
+ "kind": "Content",
912
+ "text": ";\n outputMode: "
913
+ },
914
+ {
915
+ "kind": "Reference",
916
+ "text": "OutputMode",
917
+ "canonicalReference": "@longform/async!OutputMode:type"
918
+ },
919
+ {
920
+ "kind": "Content",
921
+ "text": ";\n annotations?: "
922
+ },
923
+ {
924
+ "kind": "Reference",
925
+ "text": "Annotation",
926
+ "canonicalReference": "@longform/async!Annotation:type"
927
+ },
928
+ {
929
+ "kind": "Content",
930
+ "text": ";\n root?: string;\n template?: string;\n selector?: string;\n fragments: "
931
+ },
932
+ {
933
+ "kind": "Reference",
934
+ "text": "Record",
935
+ "canonicalReference": "!Record:type"
936
+ },
937
+ {
938
+ "kind": "Content",
939
+ "text": "<string, "
940
+ },
941
+ {
942
+ "kind": "Reference",
943
+ "text": "Fragment",
944
+ "canonicalReference": "@longform/async!Fragment:type"
945
+ },
946
+ {
947
+ "kind": "Content",
948
+ "text": ">;\n templates: "
949
+ },
950
+ {
951
+ "kind": "Reference",
952
+ "text": "Record",
953
+ "canonicalReference": "!Record:type"
954
+ },
955
+ {
956
+ "kind": "Content",
957
+ "text": "<string, string>;\n mountpoints?: "
958
+ },
959
+ {
960
+ "kind": "Reference",
961
+ "text": "MountPoint",
962
+ "canonicalReference": "@longform/async!MountPoint:type"
963
+ },
964
+ {
965
+ "kind": "Content",
966
+ "text": "[];\n tail?: string;\n}"
967
+ },
968
+ {
969
+ "kind": "Content",
970
+ "text": ";"
971
+ }
972
+ ],
973
+ "fileUrlPath": "dist/types_temp/types.d.ts",
974
+ "releaseTag": "Public",
975
+ "name": "ParsedLongform",
976
+ "typeTokenRange": {
977
+ "startIndex": 1,
978
+ "endIndex": 18
979
+ }
980
+ },
981
+ {
982
+ "kind": "Function",
983
+ "canonicalReference": "@longform/async!processTemplate:function(1)",
984
+ "docComment": "/**\n * Processes a client side Longform template to HTML fragment string.\n *\n * @param fragment - The fragment template.\n *\n * @param args - Args for the template.\n *\n * @param longformArgs - Args for the Longform parser.\n *\n * @param getFragment - A function which returns an already processed fragment's HTML string.\n *\n * @returns The processed template.\n */\n",
985
+ "excerptTokens": [
986
+ {
987
+ "kind": "Content",
988
+ "text": "export declare function processTemplate(template: "
989
+ },
990
+ {
991
+ "kind": "Content",
992
+ "text": "string"
993
+ },
994
+ {
995
+ "kind": "Content",
996
+ "text": ", args: "
997
+ },
998
+ {
999
+ "kind": "Reference",
1000
+ "text": "Record",
1001
+ "canonicalReference": "!Record:type"
1002
+ },
1003
+ {
1004
+ "kind": "Content",
1005
+ "text": "<string, string | number>"
1006
+ },
1007
+ {
1008
+ "kind": "Content",
1009
+ "text": ", longformArgs?: "
1010
+ },
1011
+ {
1012
+ "kind": "Reference",
1013
+ "text": "LongformArgs",
1014
+ "canonicalReference": "@longform/async!LongformArgs:type"
1015
+ },
1016
+ {
1017
+ "kind": "Content",
1018
+ "text": ", getFragment?: "
1019
+ },
1020
+ {
1021
+ "kind": "Content",
1022
+ "text": "(fragment: string) => string | undefined"
1023
+ },
1024
+ {
1025
+ "kind": "Content",
1026
+ "text": "): "
1027
+ },
1028
+ {
1029
+ "kind": "Reference",
1030
+ "text": "Promise",
1031
+ "canonicalReference": "!Promise:interface"
1032
+ },
1033
+ {
1034
+ "kind": "Content",
1035
+ "text": "<"
1036
+ },
1037
+ {
1038
+ "kind": "Reference",
1039
+ "text": "TemplateOutput",
1040
+ "canonicalReference": "@longform/async!TemplateOutput:type"
1041
+ },
1042
+ {
1043
+ "kind": "Content",
1044
+ "text": " | undefined>"
1045
+ },
1046
+ {
1047
+ "kind": "Content",
1048
+ "text": ";"
1049
+ }
1050
+ ],
1051
+ "fileUrlPath": "dist/types_temp/longform.d.ts",
1052
+ "returnTypeTokenRange": {
1053
+ "startIndex": 10,
1054
+ "endIndex": 14
1055
+ },
1056
+ "releaseTag": "Public",
1057
+ "overloadIndex": 1,
1058
+ "parameters": [
1059
+ {
1060
+ "parameterName": "template",
1061
+ "parameterTypeTokenRange": {
1062
+ "startIndex": 1,
1063
+ "endIndex": 2
1064
+ },
1065
+ "isOptional": false
1066
+ },
1067
+ {
1068
+ "parameterName": "args",
1069
+ "parameterTypeTokenRange": {
1070
+ "startIndex": 3,
1071
+ "endIndex": 5
1072
+ },
1073
+ "isOptional": false
1074
+ },
1075
+ {
1076
+ "parameterName": "longformArgs",
1077
+ "parameterTypeTokenRange": {
1078
+ "startIndex": 6,
1079
+ "endIndex": 7
1080
+ },
1081
+ "isOptional": true
1082
+ },
1083
+ {
1084
+ "parameterName": "getFragment",
1085
+ "parameterTypeTokenRange": {
1086
+ "startIndex": 8,
1087
+ "endIndex": 9
1088
+ },
1089
+ "isOptional": true
1090
+ }
1091
+ ],
1092
+ "name": "processTemplate"
1093
+ },
1094
+ {
1095
+ "kind": "TypeAlias",
1096
+ "canonicalReference": "@longform/async!RenderCtx:type",
1097
+ "docComment": "/**\n * Context supplied to render directives.\n */\n",
1098
+ "excerptTokens": [
1099
+ {
1100
+ "kind": "Content",
1101
+ "text": "export type RenderCtx = "
1102
+ },
1103
+ {
1104
+ "kind": "Content",
1105
+ "text": "{\n inlineArgs?: string;\n blockArgs?: string;\n doc: "
1106
+ },
1107
+ {
1108
+ "kind": "Reference",
1109
+ "text": "Readonly",
1110
+ "canonicalReference": "!Readonly:type"
1111
+ },
1112
+ {
1113
+ "kind": "Content",
1114
+ "text": "<"
1115
+ },
1116
+ {
1117
+ "kind": "Reference",
1118
+ "text": "Doc",
1119
+ "canonicalReference": "@longform/async!Doc:type"
1120
+ },
1121
+ {
1122
+ "kind": "Content",
1123
+ "text": ">;\n}"
1124
+ },
1125
+ {
1126
+ "kind": "Content",
1127
+ "text": ";"
1128
+ }
1129
+ ],
1130
+ "fileUrlPath": "dist/types_temp/types.d.ts",
1131
+ "releaseTag": "Public",
1132
+ "name": "RenderCtx",
1133
+ "typeTokenRange": {
1134
+ "startIndex": 1,
1135
+ "endIndex": 6
1136
+ }
1137
+ },
1138
+ {
1139
+ "kind": "TypeAlias",
1140
+ "canonicalReference": "@longform/async!TargetType:type",
1141
+ "docComment": "/**\n * The content type of the response can be passed into the Longform parser to change the shape of the output. The default value `text/html` will use HTML's method for closing void tags. The XML versions would use XML valid syntax.\n *\n * If `application/xml` is provided, no data attributes will be added to the outputted markup, even if an annotation mode or key is given.\n */\n",
1142
+ "excerptTokens": [
1143
+ {
1144
+ "kind": "Content",
1145
+ "text": "export type TargetType = "
1146
+ },
1147
+ {
1148
+ "kind": "Content",
1149
+ "text": "'text/html' | 'application/xhtml+xml' | 'application/xml'"
1150
+ },
1151
+ {
1152
+ "kind": "Content",
1153
+ "text": ";"
1154
+ }
1155
+ ],
1156
+ "fileUrlPath": "dist/types_temp/types.d.ts",
1157
+ "releaseTag": "Public",
1158
+ "name": "TargetType",
1159
+ "typeTokenRange": {
1160
+ "startIndex": 1,
1161
+ "endIndex": 2
1162
+ }
1163
+ },
1164
+ {
1165
+ "kind": "TypeAlias",
1166
+ "canonicalReference": "@longform/async!TemplateOutput:type",
1167
+ "docComment": "/**\n * An object containing a parsed Longform template.\n */\n",
1168
+ "excerptTokens": [
1169
+ {
1170
+ "kind": "Content",
1171
+ "text": "export type TemplateOutput = "
1172
+ },
1173
+ {
1174
+ "kind": "Content",
1175
+ "text": "{\n id?: string;\n type: 'root' | "
1176
+ },
1177
+ {
1178
+ "kind": "Reference",
1179
+ "text": "FragmentType",
1180
+ "canonicalReference": "@longform/async!FragmentType:type"
1181
+ },
1182
+ {
1183
+ "kind": "Content",
1184
+ "text": ";\n html: string;\n}"
1185
+ },
1186
+ {
1187
+ "kind": "Content",
1188
+ "text": ";"
1189
+ }
1190
+ ],
1191
+ "fileUrlPath": "dist/types_temp/types.d.ts",
1192
+ "releaseTag": "Public",
1193
+ "name": "TemplateOutput",
1194
+ "typeTokenRange": {
1195
+ "startIndex": 1,
1196
+ "endIndex": 4
1197
+ }
1198
+ }
1199
+ ]
1200
+ }
1201
+ ]
1202
+ }