Constructor
new StringSets(chunker, polisher, caller)
Creates an instance of StringSets.
Creates an instance of StringSets.
Parameters:
Name | Type | Description |
---|---|---|
chunker |
Object | Chunker instance to manage content chunking. |
polisher |
Object | Polisher instance for post-processing. |
caller |
Object | Calling controller instance. |
Extends
- Handler
Members
pageLastString :Object.<string, string>|undefined
Keeps track of the last string value per identifier on the previous page.
Keeps track of the last string value per identifier on the previous page.
Type:
- Object.<string, string> | undefined
stringSetSelectors :Object.<string, {identifier: string, func: string, value: string, selector: string}>
Stores selectors and related string-set info keyed by identifier.
Stores selectors and related string-set info keyed by identifier.
Type:
- Object.<string, {identifier: string, func: string, value: string, selector: string}>
type :string|undefined
Holds the type of string currently processed (e.g.
Holds the type of string currently processed (e.g. "first", "last").
Type:
- string | undefined
Methods
afterPageLayout(fragment)
Called after page layout to update CSS custom properties for string-set variables.
Called after page layout to update CSS custom properties for string-set variables. Computes first, last, start, and first-except string values and sets them as CSS variables.
Parameters:
Name | Type | Description |
---|---|---|
fragment |
DocumentFragment | The DOM fragment for the current page. |
onContent(funcNode, fItem, fList, declaration, rule)
Processes string()
CSS function nodes within content declarations,
transforming them into CSS variables referencing pagedjs-generated custom properties.
Processes string()
CSS function nodes within content declarations,
transforming them into CSS variables referencing pagedjs-generated custom properties.
Parameters:
Name | Type | Description |
---|---|---|
funcNode |
Object | The function node representing |
fItem |
Object | Function item node (unused here). |
fList |
Object | Function list node (unused here). |
declaration |
Object | The CSS declaration node. |
rule |
Object | The CSS rule node. |
onDeclaration(declaration, dItem, dList, rule)
Handles CSS declarations, looking specifically for string-set
declarations.
Handles CSS declarations, looking specifically for string-set
declarations.
Parses identifiers and functions, storing them with selectors.
Parameters:
Name | Type | Description |
---|---|---|
declaration |
Object | The CSS declaration node. |
dItem |
Object | Declaration item (unused here). |
dList |
Object | Declaration list (unused here). |
rule |
Object | The CSS rule node containing the declaration. |