@vivliostyle/core 2.38.0 → 2.39.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.
@@ -419,6 +419,25 @@ export declare class MatchesRelationalAction extends MatchesAction {
419
419
  apply(cascadeInstance: CascadeInstance): void;
420
420
  relational(): boolean;
421
421
  }
422
+ /**
423
+ * Cascade Action for :nth-child(An+B of S) pseudo-class
424
+ */
425
+ export declare class IsNthSiblingOfSelectorAction extends IsNthAction {
426
+ checkAppliedAction: CheckAppliedAction;
427
+ firstActions: CascadeAction[];
428
+ constructor(a: number, b: number, chains: ChainedAction[][]);
429
+ apply(cascadeInstance: CascadeInstance): void;
430
+ protected matchesSelector(element: Element, cascadeInstance: CascadeInstance): boolean;
431
+ getPriority(): number;
432
+ }
433
+ /**
434
+ * Cascade Action for :nth-last-child(An+B of S) pseudo-class
435
+ */
436
+ export declare class IsNthLastSiblingOfSelectorAction extends IsNthSiblingOfSelectorAction {
437
+ constructor(a: number, b: number, chains: ChainedAction[][]);
438
+ apply(cascadeInstance: CascadeInstance): void;
439
+ getPriority(): number;
440
+ }
422
441
  /**
423
442
  * An object that is notified as elements are pushed and popped and typically
424
443
  * controls a "named condition" (which is a count associated with a name).
@@ -677,6 +696,9 @@ export declare class CascadeInstance {
677
696
  currentPageType: string | null;
678
697
  previousPageType: string | null;
679
698
  firstPageType: string | null;
699
+ pageTypePageCounts: {
700
+ [pageType: string]: number;
701
+ };
680
702
  isFirst: boolean;
681
703
  isRoot: boolean;
682
704
  counters: CounterValues;
@@ -828,7 +850,7 @@ export declare class CascadeParserHandler extends CssParser.SlaveParserHandler i
828
850
  /** @override */
829
851
  simpleProperty(name: string, value: Css.Val, important: any): void;
830
852
  finish(): Cascade;
831
- startFuncWithSelector(funcName: string): void;
853
+ startFuncWithSelector(funcName: string, params?: (number | string)[]): void;
832
854
  }
833
855
  export declare const nthSelectorActionClasses: {
834
856
  [key: string]: typeof IsNthAction;
@@ -885,6 +907,22 @@ export declare class WhereParameterParserHandler extends MatchesParameterParserH
885
907
  export declare class HasParameterParserHandler extends MatchesParameterParserHandler {
886
908
  relational(): boolean;
887
909
  }
910
+ /**
911
+ * Cascade Parser Handler for :nth-child(An+B of S) pseudo-class parameter
912
+ */
913
+ export declare class NthChildOfSelectorParameterParserHandler extends MatchesParameterParserHandler {
914
+ readonly a: number;
915
+ readonly b: number;
916
+ constructor(parent: CascadeParserHandler, a: number, b: number);
917
+ endFuncWithSelector(): void;
918
+ forgiving(): boolean;
919
+ }
920
+ /**
921
+ * Cascade Parser Handler for :nth-last-child(An+B of S) pseudo-class parameter
922
+ */
923
+ export declare class NthLastChildOfSelectorParameterParserHandler extends NthChildOfSelectorParameterParserHandler {
924
+ endFuncWithSelector(): void;
925
+ }
888
926
  export declare class DefineParserHandler extends CssParser.SlaveParserHandler {
889
927
  constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler);
890
928
  property(name: string, value: Css.Val, important: boolean): void;
@@ -325,12 +325,13 @@ export declare class PageMarginBoxPartitionInstance extends PageMaster.Partition
325
325
  * Dynamically generate and manage page masters corresponding to page at-rules.
326
326
  */
327
327
  export declare class PageManager {
328
- private readonly cascadeInstance;
329
328
  private readonly pageScope;
330
329
  private readonly rootPageBoxInstance;
331
330
  private readonly context;
332
331
  private readonly docElementStyle;
333
332
  private pageMasterCache;
333
+ /** The cascade instance used for page rule evaluation */
334
+ readonly pageCascadeInstance: CssCascade.CascadeInstance;
334
335
  constructor(cascadeInstance: CssCascade.CascadeInstance, pageScope: Exprs.LexicalScope, rootPageBoxInstance: PageMaster.RootPageBoxInstance, context: Exprs.Context, docElementStyle: CssCascade.ElementStyle);
335
336
  /**
336
337
  * Determine the page progression and define left/right/recto/verso pages.
@@ -413,6 +414,15 @@ export declare class IsNthPageAction extends CssCascade.IsNthAction {
413
414
  apply(cascadeInstance: CssCascade.CascadeInstance): void;
414
415
  getPriority(): number;
415
416
  }
417
+ export declare class IsNthOfPageTypeAction extends CssCascade.IsNthAction {
418
+ readonly scope: Exprs.LexicalScope;
419
+ readonly a: number;
420
+ readonly b: number;
421
+ readonly pageType: string;
422
+ constructor(scope: Exprs.LexicalScope, a: number, b: number, pageType: string);
423
+ apply(cascadeInstance: CssCascade.CascadeInstance): void;
424
+ getPriority(): number;
425
+ }
416
426
  /**
417
427
  * Action applying an at-page rule
418
428
  */
@@ -79,8 +79,9 @@ export declare class ParserHandler implements CssTokenizer.TokenizerHandler {
79
79
  endRule(): void;
80
80
  /**
81
81
  * @param funcName The name of the function taking a selector list as argument
82
+ * @param params Optional parameters (e.g., [a, b] for nth-child(An+B of S))
82
83
  */
83
- startFuncWithSelector(funcName: string): void;
84
+ startFuncWithSelector(funcName: string, params?: (number | string)[]): void;
84
85
  endFuncWithSelector(): void;
85
86
  /**
86
87
  * For relational pseudo-class `:has()` support
@@ -137,7 +138,7 @@ export declare class DispatchParserHandler extends ParserHandler {
137
138
  startRuleBody(): void;
138
139
  property(name: string, value: Css.Val, important: boolean): void;
139
140
  endRule(): void;
140
- startFuncWithSelector(funcName: string): void;
141
+ startFuncWithSelector(funcName: string, params?: (number | string)[]): void;
141
142
  endFuncWithSelector(): void;
142
143
  pushSelectorText(selectorText: string): void;
143
144
  }
@@ -169,7 +170,7 @@ export declare class SlaveParserHandler extends SkippingParserHandler {
169
170
  startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void;
170
171
  startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void;
171
172
  startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void;
172
- startFuncWithSelector(funcName: string): void;
173
+ startFuncWithSelector(funcName: string, params?: (number | string)[]): void;
173
174
  endFuncWithSelector(): void;
174
175
  property(name: string, value: Css.Val, important: boolean): void;
175
176
  }