@rulecms/source-components-angular 0.4.0 → 0.5.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/fesm2022/rulecms-source-components-angular.mjs +1042 -66
- package/fesm2022/rulecms-source-components-angular.mjs.map +1 -1
- package/lib/base-components/display/component-attributes/component-name-to-modify-attribute.d.ts.map +1 -1
- package/lib/base-components/display/components/r-accordion/accordion-attributes.d.ts +1 -1
- package/lib/base-components/display/components/r-accordion/accordion-library-stylesheet.d.ts +13 -0
- package/lib/base-components/display/components/r-accordion/accordion-library-stylesheet.d.ts.map +1 -0
- package/lib/base-components/display/components/r-accordion/r-accordion.component.d.ts +11 -1
- package/lib/base-components/display/components/r-accordion/r-accordion.component.d.ts.map +1 -1
- package/lib/base-components/display/components/r-button/r-button.component.d.ts +3 -1
- package/lib/base-components/display/components/r-button/r-button.component.d.ts.map +1 -1
- package/lib/base-components/display/components/r-text/attribute-edit-mode-configs.d.ts.map +1 -1
- package/lib/base-components/display/components/r-text/default-attribute-values.d.ts.map +1 -1
- package/lib/base-components/display/components/r-text/r-text.component.d.ts +36 -2
- package/lib/base-components/display/components/r-text/r-text.component.d.ts.map +1 -1
- package/lib/base-components/display/components/r-text/resolve-renders-own-element.d.ts +7 -4
- package/lib/base-components/display/components/r-text/resolve-renders-own-element.d.ts.map +1 -1
- package/lib/base-components/display/components/r-text/text-attributes.d.ts +49 -0
- package/lib/base-components/display/components/r-text/text-attributes.d.ts.map +1 -0
- package/lib/base-components/display/components/r-text/text-library-stylesheet.d.ts +15 -0
- package/lib/base-components/display/components/r-text/text-library-stylesheet.d.ts.map +1 -0
- package/lib/component-library-module.d.ts +1 -6
- package/lib/component-library-module.d.ts.map +1 -1
- package/lib/library-stylesheet.d.ts +7 -0
- package/lib/library-stylesheet.d.ts.map +1 -0
- package/lib/library-version.d.ts +3 -0
- package/lib/library-version.d.ts.map +1 -0
- package/lib/shared/html-tag.component.d.ts +5 -1
- package/lib/shared/html-tag.component.d.ts.map +1 -1
- package/lib/shared/inline-markup/index.d.ts +3 -0
- package/lib/shared/inline-markup/index.d.ts.map +1 -1
- package/lib/shared/inline-markup/inline-markup.component.d.ts +8 -1
- package/lib/shared/inline-markup/inline-markup.component.d.ts.map +1 -1
- package/lib/shared/inline-markup/parse-inline-markers.d.ts +6 -1
- package/lib/shared/inline-markup/parse-inline-markers.d.ts.map +1 -1
- package/lib/shared/inline-markup/prepared-inline-markup.d.ts +32 -0
- package/lib/shared/inline-markup/prepared-inline-markup.d.ts.map +1 -0
- package/lib/shared/inline-markup/render-inline-markup-split.d.ts +33 -0
- package/lib/shared/inline-markup/render-inline-markup-split.d.ts.map +1 -0
- package/lib/shared/placeholders/fill-placeholders.d.ts +15 -0
- package/lib/shared/placeholders/fill-placeholders.d.ts.map +1 -0
- package/lib/shared/placeholders/index.d.ts +4 -0
- package/lib/shared/placeholders/index.d.ts.map +1 -0
- package/lib/shared/placeholders/parse-placeholder-expression.d.ts +26 -0
- package/lib/shared/placeholders/parse-placeholder-expression.d.ts.map +1 -0
- package/lib/shared/placeholders/placeholder-token.d.ts +15 -0
- package/lib/shared/placeholders/placeholder-token.d.ts.map +1 -0
- package/lib/shared/placeholders/placeholder-values.d.ts +23 -0
- package/lib/shared/placeholders/placeholder-values.d.ts.map +1 -0
- package/lib/shared/placeholders/placeholder-warnings.d.ts +10 -0
- package/lib/shared/placeholders/placeholder-warnings.d.ts.map +1 -0
- package/lib/types.d.ts +6 -0
- package/lib/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/public-api.d.ts +5 -1
- package/public-api.d.ts.map +1 -1
package/lib/base-components/display/component-attributes/component-name-to-modify-attribute.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-name-to-modify-attribute.d.ts","sourceRoot":"","sources":["../../../../../src/lib/base-components/display/component-attributes/component-name-to-modify-attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAEhE;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,EAAE,
|
|
1
|
+
{"version":3,"file":"component-name-to-modify-attribute.d.ts","sourceRoot":"","sources":["../../../../../src/lib/base-components/display/component-attributes/component-name-to-modify-attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAEhE;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,EAAE,8BAsF5C,CAAC"}
|
|
@@ -61,7 +61,7 @@ type Attributes = {
|
|
|
61
61
|
/**
|
|
62
62
|
* The summary, on one line. An unset attribute falls back to the placeholder,
|
|
63
63
|
* but text the author deliberately cleared stays cleared: an empty `<summary>`
|
|
64
|
-
* still draws its
|
|
64
|
+
* still draws its chevron and still toggles, and the composer needs the element
|
|
65
65
|
* to stay selectable on the canvas. Same distinction `r-list` draws for its
|
|
66
66
|
* items and `r-button` for its label.
|
|
67
67
|
*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SSR-safe rules for `r-accordion` motion and the custom chevron.
|
|
3
|
+
*
|
|
4
|
+
* widget-angular injects this once per library via `ComponentLibraryModule.stylesheet`.
|
|
5
|
+
* Open/close height and opacity cannot be inline styles: they key off `[open]`
|
|
6
|
+
* and `::details-content`. The chevron rotate is the same. Hiding the UA
|
|
7
|
+
* triangle belongs here too — `summary::marker` is a pseudo-element.
|
|
8
|
+
*
|
|
9
|
+
* Browsers that do not support `::details-content` / `interpolate-size` still
|
|
10
|
+
* open and close; they just snap. The chevron and the disclosure keep working.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ACCORDION_LIBRARY_STYLESHEET: string;
|
|
13
|
+
//# sourceMappingURL=accordion-library-stylesheet.d.ts.map
|
package/lib/base-components/display/components/r-accordion/accordion-library-stylesheet.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-library-stylesheet.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-accordion/accordion-library-stylesheet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,QAgCjC,CAAC"}
|
|
@@ -9,13 +9,23 @@ export declare class RAccordionComponent {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
readonly summaryLayoutStyle: {
|
|
11
11
|
display: string;
|
|
12
|
+
alignItems: string;
|
|
12
13
|
width: string;
|
|
13
14
|
boxSizing: string;
|
|
15
|
+
cursor: string;
|
|
16
|
+
listStyle: string;
|
|
14
17
|
};
|
|
15
18
|
readonly summaryHeadingStyle: {
|
|
16
|
-
|
|
19
|
+
flex: string;
|
|
20
|
+
minWidth: number;
|
|
17
21
|
margin: number;
|
|
18
22
|
};
|
|
23
|
+
readonly chevronStyle: {
|
|
24
|
+
width: string;
|
|
25
|
+
height: string;
|
|
26
|
+
flexShrink: number;
|
|
27
|
+
marginLeft: string;
|
|
28
|
+
};
|
|
19
29
|
get summary(): string;
|
|
20
30
|
get headingLevel(): "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
|
|
21
31
|
get links(): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"r-accordion.component.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-accordion/r-accordion.component.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"r-accordion.component.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-accordion/r-accordion.component.ts"],"names":[],"mappings":";AAmCA,qBA8Ca,mBAAmB;IACrB,mBAAmB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC7C,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,QAAQ,CAAC,kBAAkB;;;;;;;MAAwB;IACnD,QAAQ,CAAC,mBAAmB;;;;MAAyB;IACrD,QAAQ,CAAC,YAAY;;;;;MAAiB;IAEtC,IAAI,OAAO,WAEV;IACD,IAAI,YAAY,iDAEf;IACD,IAAI,KAAK,QAER;IACD,IAAI,UAAU,QAEb;IACD,IAAI,IAAI,YAEP;IACD,IAAI,MAAM,aAET;yCA1BU,mBAAmB;2CAAnB,mBAAmB;CA2B/B"}
|
|
@@ -9,6 +9,8 @@ export declare class RButtonComponent {
|
|
|
9
9
|
};
|
|
10
10
|
className?: string;
|
|
11
11
|
widgetInstanceProps?: WidgetInstanceProps;
|
|
12
|
+
/** Emitted as `data-rulecms-column-path` when the renderer supplies a path. */
|
|
13
|
+
columnPath?: string;
|
|
12
14
|
get preset(): import("@rulecms/source-components-angular").ButtonPreset;
|
|
13
15
|
get disabled(): boolean;
|
|
14
16
|
get style(): {
|
|
@@ -21,6 +23,6 @@ export declare class RButtonComponent {
|
|
|
21
23
|
get iconPosition(): "leading" | "trailing";
|
|
22
24
|
handleClick(event: Event): void;
|
|
23
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<RButtonComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RButtonComponent, "rulecms-r-button", never, { "componentAttributes": { "alias": "componentAttributes"; "required": false; }; "styleProps": { "alias": "styleProps"; "required": false; }; "className": { "alias": "className"; "required": false; }; "widgetInstanceProps": { "alias": "widgetInstanceProps"; "required": false; }; }, {}, never, never, true, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RButtonComponent, "rulecms-r-button", never, { "componentAttributes": { "alias": "componentAttributes"; "required": false; }; "styleProps": { "alias": "styleProps"; "required": false; }; "className": { "alias": "className"; "required": false; }; "widgetInstanceProps": { "alias": "widgetInstanceProps"; "required": false; }; "columnPath": { "alias": "columnPath"; "required": false; }; }, {}, never, never, true, never>;
|
|
25
27
|
}
|
|
26
28
|
//# sourceMappingURL=r-button.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"r-button.component.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-button/r-button.component.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;;AAmBvE,
|
|
1
|
+
{"version":3,"file":"r-button.component.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-button/r-button.component.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;;AAmBvE,qBA4Ea,gBAAgB;IAClB,mBAAmB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC7C,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IACnD,+EAA+E;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IAE7B,IAAI,MAAM,8DAET;IACD,IAAI,QAAQ,YAEX;IACD,IAAI,KAAK;;MAMR;IACD,IAAI,KAAK,WAER;IACD,IAAI,SAAS,uBAEZ;IACD,IAAI,IAAI,8EAEP;IACD,IAAI,QAAQ,IAAI,QAAQ,GAAG,IAAI,CAE9B;IACD,IAAI,YAAY,2BAEf;IAED,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;yCArCpB,gBAAgB;2CAAhB,gBAAgB;CA4C5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribute-edit-mode-configs.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-text/attribute-edit-mode-configs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"attribute-edit-mode-configs.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-text/attribute-edit-mode-configs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAO5D,eAAO,MAAM,wBAAwB,EAAE,uBAAuB,EA+C7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-attribute-values.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-text/default-attribute-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"default-attribute-values.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-text/default-attribute-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAO1D,eAAO,MAAM,oBAAoB,kEACgC,CAAC;AAElE,eAAO,MAAM,sBAAsB,EAAE,qBAAqB,EA+BzD,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { EnclosingTag } from './enclosing-tags';
|
|
2
|
+
import type { PreparedMarkupRun } from '../../../../shared/inline-markup/prepared-inline-markup';
|
|
3
|
+
import type { PageViewType, WidgetInstanceProps } from '../../../../types';
|
|
1
4
|
import * as i0 from "@angular/core";
|
|
2
5
|
export declare class RTextComponent {
|
|
3
6
|
componentAttributes?: {
|
|
@@ -7,6 +10,17 @@ export declare class RTextComponent {
|
|
|
7
10
|
[key: string]: any;
|
|
8
11
|
};
|
|
9
12
|
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Host-app props for this instance. `placeholderValues` — an object, or a
|
|
15
|
+
* JSON string holding one — fills the `{{ … }}` placeholders in the text.
|
|
16
|
+
*/
|
|
17
|
+
widgetInstanceProps?: WidgetInstanceProps;
|
|
18
|
+
/**
|
|
19
|
+
* `'Compose'` on the composer canvas, where placeholders show as written.
|
|
20
|
+
* Any other value, or none, fills them in.
|
|
21
|
+
*/
|
|
22
|
+
pageViewType?: PageViewType;
|
|
23
|
+
readonly visuallyHidden: Record<string, string>;
|
|
10
24
|
get content(): string;
|
|
11
25
|
get links(): unknown;
|
|
12
26
|
/**
|
|
@@ -14,8 +28,28 @@ export declare class RTextComponent {
|
|
|
14
28
|
* styling list — resolve by 1-based position against separate attributes.
|
|
15
29
|
*/
|
|
16
30
|
get spanStyles(): unknown;
|
|
17
|
-
|
|
31
|
+
/**
|
|
32
|
+
* How this render fills `{{ … }}` placeholders. On the composer canvas they
|
|
33
|
+
* stay as the author typed them: the composer never passes host values, so
|
|
34
|
+
* filling them there would only blank them out.
|
|
35
|
+
*/
|
|
36
|
+
get fillText(): ((words: string) => string) | undefined;
|
|
37
|
+
get showMoreAfter(): number | undefined;
|
|
38
|
+
get showMoreLabel(): string;
|
|
39
|
+
get showLessLabel(): string;
|
|
40
|
+
get split(): {
|
|
41
|
+
head: PreparedMarkupRun[];
|
|
42
|
+
tail: PreparedMarkupRun[];
|
|
43
|
+
} | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* A configured limit with no enclosing tag always produces a span root —
|
|
46
|
+
* truncated or not — so this agrees with `resolveRendersOwnElement`.
|
|
47
|
+
*/
|
|
48
|
+
get tag(): EnclosingTag | undefined;
|
|
49
|
+
get rootAttributes(): {
|
|
50
|
+
[name: string]: string;
|
|
51
|
+
} | undefined;
|
|
18
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<RTextComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RTextComponent, "rulecms-r-text", never, { "componentAttributes": { "alias": "componentAttributes"; "required": false; }; "styleProps": { "alias": "styleProps"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, never, true, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RTextComponent, "rulecms-r-text", never, { "componentAttributes": { "alias": "componentAttributes"; "required": false; }; "styleProps": { "alias": "styleProps"; "required": false; }; "className": { "alias": "className"; "required": false; }; "widgetInstanceProps": { "alias": "widgetInstanceProps"; "required": false; }; "pageViewType": { "alias": "pageViewType"; "required": false; }; }, {}, never, never, true, never>;
|
|
20
54
|
}
|
|
21
55
|
//# sourceMappingURL=r-text.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"r-text.component.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-text/r-text.component.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"r-text.component.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-text/r-text.component.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAQrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAOjG,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;;AAmB3E,qBA2Da,cAAc;IAChB,mBAAmB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC7C,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACM,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IACnD;;;OAGG;IACM,YAAY,CAAC,EAAE,YAAY,CAAC;IAErC,QAAQ,CAAC,cAAc,yBAAmB;IAE1C,IAAI,OAAO,IAAI,MAAM,CAGpB;IAED,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED;;;OAGG;IACH,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;;;OAIG;IACH,IAAI,QAAQ,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAMtD;IAED,IAAI,aAAa,IAAI,MAAM,GAAG,SAAS,CAEtC;IAED,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,IAAI,KAAK,IAAI;QAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;QAAC,IAAI,EAAE,iBAAiB,EAAE,CAAA;KAAE,GAAG,SAAS,CAMhF;IAED;;;OAGG;IACH,IAAI,GAAG,IAAI,YAAY,GAAG,SAAS,CAGlC;IAED,IAAI,cAAc,IAAI;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,SAAS,CAE3D;yCA9EU,cAAc;2CAAd,cAAc;CA+E1B"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { NoContainerResolverContext } from '../../../../types';
|
|
2
2
|
/**
|
|
3
3
|
* True when RText is about to render an element that can carry a className —
|
|
4
|
-
* any enclosing tag, block or inline
|
|
4
|
+
* any enclosing tag, block or inline, or a bare text with a show-more limit
|
|
5
|
+
* (which renders as a `span`). True bare text has no element, so false.
|
|
5
6
|
*
|
|
6
|
-
* Shares `resolveEnclosingTag` with RText and
|
|
7
|
-
* disagreed with what the component renders, a
|
|
8
|
-
* nothing or force a redundant wrapper.
|
|
7
|
+
* Shares `resolveEnclosingTag` and `resolveTextShowMoreAfter` with RText and
|
|
8
|
+
* `resolveNoContainer`: if this disagreed with what the component renders, a
|
|
9
|
+
* class would either land on nothing or force a redundant wrapper. The limit
|
|
10
|
+
* is part of the answer because a configured budget always produces a root
|
|
11
|
+
* element, even when the filled text happens to fit.
|
|
9
12
|
*/
|
|
10
13
|
export declare const resolveRendersOwnElement: ({ componentAttributes, }: NoContainerResolverContext) => boolean;
|
|
11
14
|
//# sourceMappingURL=resolve-renders-own-element.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-renders-own-element.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-text/resolve-renders-own-element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve-renders-own-element.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-text/resolve-renders-own-element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAIpE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,6BAElC,0BAA0B,KAAG,OAE6B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The attribute names `r-text` reads for show more / show less.
|
|
3
|
+
*
|
|
4
|
+
* These sit beside the existing text attributes rather than sharing a name
|
|
5
|
+
* with any other component: RuleCMS publishes one page per component-scope
|
|
6
|
+
* attribute and requires exactly one owning component. Reuse happens a level
|
|
7
|
+
* down, where the composer resolves an attribute to an *editor* by name —
|
|
8
|
+
* the limit reuses the plain-text field and the labels reuse the multi-line
|
|
9
|
+
* text field.
|
|
10
|
+
*
|
|
11
|
+
* Nothing here duplicates a column style attribute. Spacing, colour and
|
|
12
|
+
* typography come from Column Styles on the root element; the attributes
|
|
13
|
+
* below are only the character budget and the two toggle labels.
|
|
14
|
+
*/
|
|
15
|
+
export declare const TEXT_SHOW_MORE_AFTER_ATTRIBUTE = "text-show-more-after-3-resolutions";
|
|
16
|
+
export declare const TEXT_SHOW_MORE_LABEL_ATTRIBUTE = "text-show-more-label-3-resolutions";
|
|
17
|
+
export declare const TEXT_SHOW_LESS_LABEL_ATTRIBUTE = "text-show-less-label-3-resolutions";
|
|
18
|
+
export declare const DEFAULT_TEXT_SHOW_MORE_LABEL = "Show more";
|
|
19
|
+
export declare const DEFAULT_TEXT_SHOW_LESS_LABEL = "Show less";
|
|
20
|
+
type Attributes = {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
} | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Character budget for collapsing the text. A positive whole number turns
|
|
25
|
+
* the feature on; anything else — unset, null, empty, zero, a decimal, a
|
|
26
|
+
* non-digit string — leaves the text as it always was.
|
|
27
|
+
*
|
|
28
|
+
* The editor stores a string in the plain-text field (the number editor is
|
|
29
|
+
* pixel-specific), but a hand-written or migrated config may carry a real
|
|
30
|
+
* number; both mean the same thing here. Digit-only strings after trim are
|
|
31
|
+
* accepted, including leading zeros (`'07'` → 7); `'0'` and `'00'` are still
|
|
32
|
+
* off because the value is not >= 1.
|
|
33
|
+
*/
|
|
34
|
+
export declare const resolveTextShowMoreAfter: (componentAttributes: Attributes) => number | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Label on the toggle while the text is collapsed. Unset or null falls back
|
|
37
|
+
* to "Show more". A blank after trimming also falls back — a toggle with no
|
|
38
|
+
* words would leave the rest of the text unreachable.
|
|
39
|
+
*/
|
|
40
|
+
export declare const resolveTextShowMoreLabel: (componentAttributes: Attributes) => string;
|
|
41
|
+
/**
|
|
42
|
+
* Label on the toggle while the text is expanded. Unset or null falls back
|
|
43
|
+
* to "Show less". A blank after trimming also falls back — the composer's
|
|
44
|
+
* text editor deletes a cleared setting rather than storing `''`, so a blank
|
|
45
|
+
* here is the same kind of empty as Show more, not a distinct mode.
|
|
46
|
+
*/
|
|
47
|
+
export declare const resolveTextShowLessLabel: (componentAttributes: Attributes) => string;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=text-attributes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-attributes.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-text/text-attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,8BAA8B,uCAAuC,CAAC;AACnF,eAAO,MAAM,8BAA8B,uCAAuC,CAAC;AACnF,eAAO,MAAM,8BAA8B,uCAAuC,CAAC;AAEnF,eAAO,MAAM,4BAA4B,cAAc,CAAC;AACxD,eAAO,MAAM,4BAA4B,cAAc,CAAC;AAExD,KAAK,UAAU,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,SAAS,CAAC;AAiBrD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,wBAAyB,UAAU,KAAG,MAAM,GAAG,SAqBnF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,wBAAyB,UAAU,KAAG,MAO1E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,wBAAyB,UAAU,KAAG,MAO1E,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SSR-safe rules for `r-text` show more / show less.
|
|
3
|
+
*
|
|
4
|
+
* widget-angular injects this once per library via `ComponentLibraryModule.stylesheet`.
|
|
5
|
+
* Collapsing cannot be an inline style: it keys off whether a checkbox inside
|
|
6
|
+
* the toggle is checked, which only CSS `:has()` can see without JavaScript.
|
|
7
|
+
*
|
|
8
|
+
* Every rule sits inside `@supports selector(:has(*))` and is scoped to
|
|
9
|
+
* `[data-rulecms-text-truncate]` with child combinators. Without that support
|
|
10
|
+
* — or without this sheet — the markup's `hidden` attributes leave the full
|
|
11
|
+
* text visible and the toggle invisible, which is the progressive-enhancement
|
|
12
|
+
* path on purpose.
|
|
13
|
+
*/
|
|
14
|
+
export declare const TEXT_LIBRARY_STYLESHEET: string;
|
|
15
|
+
//# sourceMappingURL=text-library-stylesheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-library-stylesheet.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/base-components/display/components/r-text/text-library-stylesheet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,QA6B5B,CAAC"}
|
|
@@ -16,12 +16,7 @@ export declare const manifest: {
|
|
|
16
16
|
};
|
|
17
17
|
/** The render surface: component type → renderable entry. */
|
|
18
18
|
export declare const components: Record<string, import("@rulecms/source-components-angular").RenderCardEntry>;
|
|
19
|
-
|
|
20
|
-
* Optional `ComponentLibraryModule.stylesheet`. widget-angular injects this
|
|
21
|
-
* once per library as an SSR `<style>` tag. v1 is the button hover / focus /
|
|
22
|
-
* active rules; later interactive cards append here.
|
|
23
|
-
*/
|
|
24
|
-
export declare const stylesheet: string;
|
|
19
|
+
export { stylesheet } from './library-stylesheet';
|
|
25
20
|
/** The editor surface: palette + attribute metadata for the RuleCMS composer. */
|
|
26
21
|
export declare const editor: {
|
|
27
22
|
previewComponents: import("@rulecms/source-components-angular").PreviewComponents;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-library-module.d.ts","sourceRoot":"","sources":["../../src/lib/component-library-module.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,UAAU,8EAAyC,CAAC;AAEjE
|
|
1
|
+
{"version":3,"file":"component-library-module.d.ts","sourceRoot":"","sources":["../../src/lib/component-library-module.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,UAAU,8EAAyC,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,iFAAiF;AACjF,eAAO,MAAM,MAAM;;;;CAIlB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional `ComponentLibraryModule.stylesheet`. widget-angular injects this
|
|
3
|
+
* once per library as an SSR `<style>` tag. Button hover / focus / active,
|
|
4
|
+
* accordion motion, and text show-more rules are concatenated here.
|
|
5
|
+
*/
|
|
6
|
+
export declare const stylesheet: string;
|
|
7
|
+
//# sourceMappingURL=library-stylesheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-stylesheet.d.ts","sourceRoot":"","sources":["../../src/lib/library-stylesheet.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,UAAU,QAA8F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-version.d.ts","sourceRoot":"","sources":["../../src/lib/library-version.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,eAAO,MAAM,cAAc,UAAU,CAAC"}
|
|
@@ -9,6 +9,10 @@ export declare class HtmlTagComponent implements AfterViewInit, OnChanges {
|
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
};
|
|
11
11
|
className?: string;
|
|
12
|
+
/** Extra attributes, such as `data-rulecms-text-truncate` on a show-more root. */
|
|
13
|
+
attributes?: {
|
|
14
|
+
[name: string]: string;
|
|
15
|
+
};
|
|
12
16
|
projected: TemplateRef<unknown>;
|
|
13
17
|
private created;
|
|
14
18
|
private viewReady;
|
|
@@ -17,6 +21,6 @@ export declare class HtmlTagComponent implements AfterViewInit, OnChanges {
|
|
|
17
21
|
ngOnChanges(): void;
|
|
18
22
|
private render;
|
|
19
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<HtmlTagComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HtmlTagComponent, "rulecms-html-tag", never, { "tag": { "alias": "tag"; "required": true; }; "styleProps": { "alias": "styleProps"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HtmlTagComponent, "rulecms-html-tag", never, { "tag": { "alias": "tag"; "required": true; }; "styleProps": { "alias": "styleProps"; "required": false; }; "className": { "alias": "className"; "required": false; }; "attributes": { "alias": "attributes"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
21
25
|
}
|
|
22
26
|
//# sourceMappingURL=html-tag.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-tag.component.d.ts","sourceRoot":"","sources":["../../../src/lib/shared/html-tag.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,UAAU,EAEV,SAAS,EACT,SAAS,EAET,gBAAgB,EAChB,WAAW,EACZ,MAAM,eAAe,CAAC;;AAEvB,qBAUa,gBAAiB,YAAW,aAAa,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"html-tag.component.d.ts","sourceRoot":"","sources":["../../../src/lib/shared/html-tag.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,UAAU,EAEV,SAAS,EACT,SAAS,EAET,gBAAgB,EAChB,WAAW,EACZ,MAAM,eAAe,CAAC;;AAEvB,qBAUa,gBAAiB,YAAW,aAAa,EAAE,SAAS;IAa7D,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAdK,GAAG,EAAG,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,kFAAkF;IACzE,UAAU,CAAC,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAEP,SAAS,EAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAE3E,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,SAAS,CAAS;gBAGP,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,EAC7B,QAAQ,EAAE,SAAS,EACnB,GAAG,EAAE,gBAAgB;IAGxC,eAAe,IAAI,IAAI;IAKvB,WAAW,IAAI,IAAI;IAMnB,OAAO,CAAC,MAAM;yCA7BH,gBAAgB;2CAAhB,gBAAgB;CAuD5B"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { parseInlineMarkers } from './parse-inline-markers';
|
|
2
2
|
export type { InlineMarks, MarkupRun, MarkupTextRun, MarkupSpanRun, MarkupBreakRun, } from './parse-inline-markers';
|
|
3
3
|
export { formatInlineMarker, serializeInlineMarkers } from './serialize-inline-markers';
|
|
4
|
+
export { prepareInlineMarkupRuns, preparedRunsNeedElements } from './prepared-inline-markup';
|
|
5
|
+
export type { PreparedMarkupRun, PreparedTextRun, PreparedSpanRun, PreparedBreakRun, } from './prepared-inline-markup';
|
|
6
|
+
export { renderInlineMarkupSplit } from './render-inline-markup-split';
|
|
4
7
|
export { InlineMarkupComponent } from './inline-markup.component';
|
|
5
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/inline-markup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACb,aAAa,EACb,cAAc,GACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAExF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/inline-markup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACb,aAAa,EACb,cAAc,GACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAExF,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAC7F,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementRef, OnChanges, Renderer2 } from '@angular/core';
|
|
2
|
+
import type { PreparedMarkupRun } from './prepared-inline-markup';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class InlineMarkupComponent implements OnChanges {
|
|
4
5
|
private readonly host;
|
|
@@ -6,6 +7,12 @@ export declare class InlineMarkupComponent implements OnChanges {
|
|
|
6
7
|
text: string;
|
|
7
8
|
links: unknown;
|
|
8
9
|
spanStyles: unknown;
|
|
10
|
+
/** Fills `{{ … }}` inside each run's words after markers are parsed. */
|
|
11
|
+
fillText?: (words: string) => string;
|
|
12
|
+
/**
|
|
13
|
+
* Pre-built runs (a show-more head or tail). When set, `text` is ignored.
|
|
14
|
+
*/
|
|
15
|
+
runs?: PreparedMarkupRun[];
|
|
9
16
|
constructor(host: ElementRef<HTMLElement>, renderer: Renderer2);
|
|
10
17
|
ngOnChanges(): void;
|
|
11
18
|
/**
|
|
@@ -17,6 +24,6 @@ export declare class InlineMarkupComponent implements OnChanges {
|
|
|
17
24
|
private createAnchor;
|
|
18
25
|
private clear;
|
|
19
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<InlineMarkupComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InlineMarkupComponent, "rulecms-inline-markup", never, { "text": { "alias": "text"; "required": false; }; "links": { "alias": "links"; "required": false; }; "spanStyles": { "alias": "spanStyles"; "required": false; }; }, {}, never, never, true, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InlineMarkupComponent, "rulecms-inline-markup", never, { "text": { "alias": "text"; "required": false; }; "links": { "alias": "links"; "required": false; }; "spanStyles": { "alias": "spanStyles"; "required": false; }; "fillText": { "alias": "fillText"; "required": false; }; "runs": { "alias": "runs"; "required": false; }; }, {}, never, never, true, never>;
|
|
21
28
|
}
|
|
22
29
|
//# sourceMappingURL=inline-markup.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-markup.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/inline-markup/inline-markup.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEV,SAAS,EACT,SAAS,EACV,MAAM,eAAe,CAAC;;
|
|
1
|
+
{"version":3,"file":"inline-markup.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/inline-markup/inline-markup.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEV,SAAS,EACT,SAAS,EACV,MAAM,eAAe,CAAC;AAOvB,OAAO,KAAK,EAAE,iBAAiB,EAAmB,MAAM,0BAA0B,CAAC;;AAQnF,qBAMa,qBAAsB,YAAW,SAAS;IAYnD,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAZlB,IAAI,SAAM;IACV,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IAC7B,wEAAwE;IAC/D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C;;OAEG;IACM,IAAI,CAAC,EAAE,iBAAiB,EAAE,CAAC;gBAGjB,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,EAC7B,QAAQ,EAAE,SAAS;IAGtC,WAAW,IAAI,IAAI;IA8BnB;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAyBlB,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,KAAK;yCA3FF,qBAAqB;2CAArB,qBAAqB;CAiGjC"}
|
|
@@ -45,7 +45,12 @@ export type MarkupRun = MarkupTextRun | MarkupSpanRun | MarkupBreakRun;
|
|
|
45
45
|
*
|
|
46
46
|
* Indexes are 1-based and normalize through a base-10 parse, so `{01|x}` and
|
|
47
47
|
* `{1|x}` point at the same entry. Resolving an index to an entry is the
|
|
48
|
-
* caller's job; this stays pure and free of
|
|
48
|
+
* caller's job; this stays pure and free of the renderer.
|
|
49
|
+
*
|
|
50
|
+
* `{{ … }}` placeholders are not runs: they stay inside the text of whichever
|
|
51
|
+
* run holds them, exactly as written, and a marker's text may contain whole
|
|
52
|
+
* ones. Filling them in is the renderer's job, after parsing, so a filled-in
|
|
53
|
+
* value can never be read as markup.
|
|
49
54
|
*/
|
|
50
55
|
export declare function parseInlineMarkers(value: string): MarkupRun[];
|
|
51
56
|
//# sourceMappingURL=parse-inline-markers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-inline-markers.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/inline-markup/parse-inline-markers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse-inline-markers.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/inline-markup/parse-inline-markers.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9E,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,aAAa,GAAG,cAAc,CAAC;AA4DvE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,CA2C7D"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AnchorAttributes } from '../links/resolve-link-attributes';
|
|
2
|
+
import type { SpanStyleAttributes } from '../span-styles/resolve-span-style-attributes';
|
|
3
|
+
import type { InlineMarks } from './parse-inline-markers';
|
|
4
|
+
export type PreparedTextRun = {
|
|
5
|
+
kind: 'text';
|
|
6
|
+
words: string;
|
|
7
|
+
};
|
|
8
|
+
export type PreparedSpanRun = {
|
|
9
|
+
kind: 'span';
|
|
10
|
+
words: string;
|
|
11
|
+
marks: InlineMarks;
|
|
12
|
+
anchor: AnchorAttributes | undefined;
|
|
13
|
+
spanStyle: SpanStyleAttributes | undefined;
|
|
14
|
+
};
|
|
15
|
+
export type PreparedBreakRun = {
|
|
16
|
+
kind: 'break';
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* One run after parsing, filling, and resolving link / styling entries. Shared
|
|
20
|
+
* by the full renderer and the head/tail split so both nest elements the same
|
|
21
|
+
* way.
|
|
22
|
+
*/
|
|
23
|
+
export type PreparedMarkupRun = PreparedTextRun | PreparedSpanRun | PreparedBreakRun;
|
|
24
|
+
/**
|
|
25
|
+
* Parses markers, fills words, and resolves anchors and span styles into a
|
|
26
|
+
* list the renderers can share. Empty filled words stay in the list so run
|
|
27
|
+
* indexes stay stable for splitting; they contribute nothing when rendered.
|
|
28
|
+
*/
|
|
29
|
+
export declare function prepareInlineMarkupRuns(text: string, links: unknown, spanStyles?: unknown, fillText?: (words: string) => string): PreparedMarkupRun[];
|
|
30
|
+
/** True when rendering these runs needs elements rather than one text node. */
|
|
31
|
+
export declare function preparedRunsNeedElements(runs: readonly PreparedMarkupRun[]): boolean;
|
|
32
|
+
//# sourceMappingURL=prepared-inline-markup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepared-inline-markup.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/inline-markup/prepared-inline-markup.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAExF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACrC,SAAS,EAAE,mBAAmB,GAAG,SAAS,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjD;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAIrF;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EACd,UAAU,CAAC,EAAE,OAAO,EACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GACnC,iBAAiB,EAAE,CA4BrB;AAED,+EAA+E;AAC/E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,SAAS,iBAAiB,EAAE,GAAG,OAAO,CAQpF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { PreparedMarkupRun } from './prepared-inline-markup';
|
|
2
|
+
/**
|
|
3
|
+
* Same parsing, filling, and element nesting as `renderInlineMarkup`, but
|
|
4
|
+
* splits the result into a visible head and a hidden tail at a character
|
|
5
|
+
* budget — the shared building block for "show more" on r-text.
|
|
6
|
+
*
|
|
7
|
+
* Counts what a reader sees after markers are gone and `fillText` has run:
|
|
8
|
+
* Unicode code points, with consecutive internal whitespace (and `{br|}`)
|
|
9
|
+
* counting once for the budget only. Leading and trailing whitespace —
|
|
10
|
+
* including leading and trailing `{br|}` — do not count, so a trailing space
|
|
11
|
+
* past the limit never invents a "show more" that reveals nothing, and leading
|
|
12
|
+
* spaces never consume the budget or leave an empty-looking head.
|
|
13
|
+
*
|
|
14
|
+
* A whole `{{ … }}` placeholder token is never cut through: whitespace inside
|
|
15
|
+
* it is not a cut point, and the first-word fallback keeps a word that
|
|
16
|
+
* contains a token rather than slicing the token. Counting is unchanged;
|
|
17
|
+
* only where a cut may land changes. Applied whether or not a filler ran —
|
|
18
|
+
* after filling, only leftover literal tokens remain.
|
|
19
|
+
*
|
|
20
|
+
* Returns `undefined` when everything fits, when `limit` is not a positive
|
|
21
|
+
* integer, or when a cut would leave the head or the tail with no
|
|
22
|
+
* non-whitespace character.
|
|
23
|
+
*
|
|
24
|
+
* The head keeps whole words that fit; if the first word is longer than
|
|
25
|
+
* `limit` and has no token, that word is cut at the budget. Whitespace at the
|
|
26
|
+
* cut — including a break — starts the tail, so concatenating the two sides'
|
|
27
|
+
* text matches the full rendering exactly.
|
|
28
|
+
*/
|
|
29
|
+
export declare function renderInlineMarkupSplit(text: string, limit: number, links: unknown, spanStyles?: unknown, fillText?: (words: string) => string): {
|
|
30
|
+
head: PreparedMarkupRun[];
|
|
31
|
+
tail: PreparedMarkupRun[];
|
|
32
|
+
} | undefined;
|
|
33
|
+
//# sourceMappingURL=render-inline-markup-split.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-inline-markup-split.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/inline-markup/render-inline-markup-split.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AA+SlE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,OAAO,EACd,UAAU,CAAC,EAAE,OAAO,EACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GACnC;IAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAAC,IAAI,EAAE,iBAAiB,EAAE,CAAA;CAAE,GAAG,SAAS,CAuBtE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PlaceholderValues } from './placeholder-values';
|
|
2
|
+
/**
|
|
3
|
+
* Replaces every `{{ … }}` placeholder in `text` with what its path finds in
|
|
4
|
+
* `values`, as plain text.
|
|
5
|
+
*
|
|
6
|
+
* A placeholder whose path finds nothing printable — nothing there, `null`, an
|
|
7
|
+
* empty string, an object — shows its `??` fallback, or nothing without one. A
|
|
8
|
+
* token that is not a valid placeholder stays exactly as written.
|
|
9
|
+
*
|
|
10
|
+
* `values` is `undefined` when the host passed none, which is the normal case
|
|
11
|
+
* wherever placeholders are not in use: every placeholder then falls back,
|
|
12
|
+
* silently.
|
|
13
|
+
*/
|
|
14
|
+
export declare function fillPlaceholders(text: string, values: PlaceholderValues | undefined): string;
|
|
15
|
+
//# sourceMappingURL=fill-placeholders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fill-placeholders.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/placeholders/fill-placeholders.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA4F9D;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,SAAS,GAAG,MAAM,CAW5F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/placeholders/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACzF,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What one `{{ … }}` placeholder asks for: a path into the host's values, and
|
|
3
|
+
* the text to show when that path prints nothing.
|
|
4
|
+
*/
|
|
5
|
+
export type PlaceholderExpression = {
|
|
6
|
+
/**
|
|
7
|
+
* Property names to follow from the root of the values, in order. An array
|
|
8
|
+
* position is its index as a string with leading zeros dropped — `list[0]`,
|
|
9
|
+
* `list[00]` and `list.0` all read key `"0"` — because every step is an
|
|
10
|
+
* own-property lookup by the time it runs.
|
|
11
|
+
*/
|
|
12
|
+
path: string[];
|
|
13
|
+
/** Everything after `??`, trimmed. Absent when the placeholder has no `??`. */
|
|
14
|
+
fallback?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The inside of one placeholder token — the text between `{{` and `}}` — to
|
|
18
|
+
* the path and fallback it names, or `undefined` when it is not a placeholder
|
|
19
|
+
* after all and should be shown exactly as written.
|
|
20
|
+
*
|
|
21
|
+
* The grammar is specified in `RText.specs.md` under "Placeholders". Every
|
|
22
|
+
* port of the text component implements the same one, so a change here is a
|
|
23
|
+
* change to all of them.
|
|
24
|
+
*/
|
|
25
|
+
export declare function parsePlaceholderExpression(inner: string): PlaceholderExpression | undefined;
|
|
26
|
+
//# sourceMappingURL=parse-placeholder-expression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-placeholder-expression.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/placeholders/parse-placeholder-expression.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;;OAKG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAgBF;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAY3F"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A placeholder token: `{{`, anything but a brace, `}}`.
|
|
3
|
+
*
|
|
4
|
+
* Found by shape alone. Whether what sits between the braces is a usable
|
|
5
|
+
* expression is `parsePlaceholderExpression`'s decision, so the marker parser
|
|
6
|
+
* and the filler always agree on where a token starts and ends — including for
|
|
7
|
+
* a token that turns out to be a typo and stays literal.
|
|
8
|
+
*
|
|
9
|
+
* A source string rather than a RegExp so the marker grammar can embed it: a
|
|
10
|
+
* marker's text may contain whole tokens, which is what lets
|
|
11
|
+
* `{b|{{ user.firstName }}}` bold a filled-in value instead of ending the
|
|
12
|
+
* marker at the token's first `}`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PLACEHOLDER_TOKEN_PATTERN: string;
|
|
15
|
+
//# sourceMappingURL=placeholder-token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeholder-token.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/placeholders/placeholder-token.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB,QAA6B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The key a host puts its values under in `componentProps`, for any component
|
|
3
|
+
* whose text fills `{{ … }}` placeholders:
|
|
4
|
+
*
|
|
5
|
+
* ```tsx
|
|
6
|
+
* componentProps={{ [textColumnId]: { placeholderValues: { user } } }}
|
|
7
|
+
* ```
|
|
8
|
+
*/
|
|
9
|
+
export declare const PLACEHOLDER_VALUES_PROP = "placeholderValues";
|
|
10
|
+
/** The object or array that placeholder paths are read from. */
|
|
11
|
+
export type PlaceholderValues = Record<string, unknown> | unknown[];
|
|
12
|
+
/**
|
|
13
|
+
* The host's `placeholderValues` as something paths can be read from, or
|
|
14
|
+
* `undefined` when there is nothing to read.
|
|
15
|
+
*
|
|
16
|
+
* Takes an object or array as it is, and a JSON string holding one, for hosts
|
|
17
|
+
* that already have their values as JSON. Anything else — a string that is not
|
|
18
|
+
* JSON, JSON for a bare number or string, a function — counts as no values, so
|
|
19
|
+
* every placeholder prints its fallback or nothing. The value crosses a package
|
|
20
|
+
* boundary untyped, so none of that may throw.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolvePlaceholderValues(value: unknown): PlaceholderValues | undefined;
|
|
23
|
+
//# sourceMappingURL=placeholder-values.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeholder-values.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/placeholders/placeholder-values.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAE3D,gEAAgE;AAChE,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,EAAE,CAAC;AAKpE;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,GAAG,SAAS,CA+BtF"}
|