@akcelik/strct 5.21.0 → 5.22.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akcelik/strct",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.22.0",
|
|
4
4
|
"description": "UIStruct — a standalone Angular component library with a tokenised, multi-palette theme system, built for datacenter / infrastructure management UIs.",
|
|
5
5
|
"author": "Serkan Akcelik <serkan.akcelik@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
package/types/akcelik-strct.d.ts
CHANGED
|
@@ -8415,6 +8415,13 @@ declare const STRCT_MD_LIMITS: {
|
|
|
8415
8415
|
readonly depth: 8;
|
|
8416
8416
|
/** Inline delimiter runs considered per text span. */
|
|
8417
8417
|
readonly delimiters: 2000;
|
|
8418
|
+
/**
|
|
8419
|
+
* How far a closing delimiter or bracket is looked for. Without it every
|
|
8420
|
+
* unmatched opener scanned to the end of the document, once each: a 64 KiB
|
|
8421
|
+
* line of "*a " took 1.6 s to read, and a streamed reply is read again on
|
|
8422
|
+
* every token.
|
|
8423
|
+
*/
|
|
8424
|
+
readonly scan: 4096;
|
|
8418
8425
|
};
|
|
8419
8426
|
type StrctMdAlign = 'start' | 'center' | 'end' | null;
|
|
8420
8427
|
type StrctMdInline = {
|
|
@@ -8496,6 +8503,7 @@ type StrctMdTokenizer = (text: string) => StrctMdToken[];
|
|
|
8496
8503
|
declare function strctParseMarkdown(source: string, options?: {
|
|
8497
8504
|
streaming?: boolean;
|
|
8498
8505
|
tokenize?: StrctMdTokenizer;
|
|
8506
|
+
breaks?: boolean;
|
|
8499
8507
|
}): StrctMdBlock[];
|
|
8500
8508
|
/**
|
|
8501
8509
|
* Inline reading. Code spans win over everything (their content is literal),
|
|
@@ -8503,13 +8511,16 @@ declare function strctParseMarkdown(source: string, options?: {
|
|
|
8503
8511
|
*/
|
|
8504
8512
|
declare function parseInlines(source: string, options?: {
|
|
8505
8513
|
tokenize?: StrctMdTokenizer;
|
|
8514
|
+
breaks?: boolean;
|
|
8506
8515
|
}): StrctMdInline[];
|
|
8507
8516
|
/**
|
|
8508
8517
|
* What a link may do. Anything that is not plainly safe stays the text the
|
|
8509
8518
|
* model wrote: `javascript:`, `data:`, a protocol-relative `//host`, or
|
|
8510
8519
|
* anything this does not recognise.
|
|
8511
8520
|
*/
|
|
8512
|
-
declare function strctClassifyHref(href: string
|
|
8521
|
+
declare function strctClassifyHref(href: string, options?: {
|
|
8522
|
+
mailto?: boolean;
|
|
8523
|
+
}): 'external' | 'internal' | null;
|
|
8513
8524
|
|
|
8514
8525
|
/**
|
|
8515
8526
|
* A template for a span the consumer claimed through `tokens`, keyed by the
|
|
@@ -8569,9 +8580,25 @@ declare class StrctMarkdown {
|
|
|
8569
8580
|
readonly linkPolicy: _angular_core.InputSignal<((href: string) => "external" | "internal" | null) | null>;
|
|
8570
8581
|
/** Claim runs of plain text — an inventory id becomes an object chip. */
|
|
8571
8582
|
readonly tokens: _angular_core.InputSignal<StrctMdTokenizer | null>;
|
|
8583
|
+
/**
|
|
8584
|
+
* A single newline is a line break, the way a comment box reads: a model
|
|
8585
|
+
* writing "Host: X\nCPU: 40 %" means two lines. Off by default, which is
|
|
8586
|
+
* CommonMark.
|
|
8587
|
+
*/
|
|
8588
|
+
readonly breaks: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
8589
|
+
/** What a screen reader hears after an external link (localisable). */
|
|
8590
|
+
readonly newTabLabel: _angular_core.InputSignal<string>;
|
|
8591
|
+
/**
|
|
8592
|
+
* The token templates of the view that nested this one. A list item or a
|
|
8593
|
+
* quote is drawn by a nested view, which has no projected content of its
|
|
8594
|
+
* own — without this its claimed runs fall back to plain text.
|
|
8595
|
+
*/
|
|
8596
|
+
readonly inheritedTokens: _angular_core.InputSignal<readonly StrctMarkdownToken[]>;
|
|
8572
8597
|
/** An in-app link was followed; the consumer routes it. */
|
|
8573
8598
|
readonly navigate: _angular_core.OutputEmitterRef<string>;
|
|
8574
|
-
private readonly
|
|
8599
|
+
private readonly ownTokenDefs;
|
|
8600
|
+
/** This view's own templates, plus the ones handed down to it. */
|
|
8601
|
+
protected readonly allTokenDefs: _angular_core.Signal<readonly StrctMarkdownToken[]>;
|
|
8575
8602
|
protected readonly blocks: _angular_core.Signal<StrctMdBlock[]>;
|
|
8576
8603
|
protected level(level: number): number;
|
|
8577
8604
|
protected hrefKind(href: string): 'external' | 'internal' | null;
|
|
@@ -8580,7 +8607,7 @@ declare class StrctMarkdown {
|
|
|
8580
8607
|
protected caretOn(index: number): boolean;
|
|
8581
8608
|
protected onInternal(event: Event, href: string): void;
|
|
8582
8609
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctMarkdown, never>;
|
|
8583
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctMarkdown, "strct-markdown", never, { "source": { "alias": "source"; "required": false; "isSignal": true; }; "tree": { "alias": "tree"; "required": false; "isSignal": true; }; "streaming": { "alias": "streaming"; "required": false; "isSignal": true; }; "headingOffset": { "alias": "headingOffset"; "required": false; "isSignal": true; }; "linkPolicy": { "alias": "linkPolicy"; "required": false; "isSignal": true; }; "tokens": { "alias": "tokens"; "required": false; "isSignal": true; }; }, { "navigate": "navigate"; }, ["
|
|
8610
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctMarkdown, "strct-markdown", never, { "source": { "alias": "source"; "required": false; "isSignal": true; }; "tree": { "alias": "tree"; "required": false; "isSignal": true; }; "streaming": { "alias": "streaming"; "required": false; "isSignal": true; }; "headingOffset": { "alias": "headingOffset"; "required": false; "isSignal": true; }; "linkPolicy": { "alias": "linkPolicy"; "required": false; "isSignal": true; }; "tokens": { "alias": "tokens"; "required": false; "isSignal": true; }; "breaks": { "alias": "breaks"; "required": false; "isSignal": true; }; "newTabLabel": { "alias": "newTabLabel"; "required": false; "isSignal": true; }; "inheritedTokens": { "alias": "inheritedTokens"; "required": false; "isSignal": true; }; }, { "navigate": "navigate"; }, ["ownTokenDefs"], never, true, never>;
|
|
8584
8611
|
}
|
|
8585
8612
|
|
|
8586
8613
|
/** One product (or platform) a person may switch to. */
|