@vivliostyle/core 2.40.0 → 2.41.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.
@@ -38,7 +38,14 @@ export declare class ViewFactory extends Base.SimpleEventTarget implements Vtree
38
38
  [key: string]: string;
39
39
  };
40
40
  readonly documentURLTransformer: Base.DocumentURLTransformer;
41
+ readonly pageProps?: {
42
+ [key: string]: CssCascade.ElementStyle;
43
+ };
44
+ readonly cascadedPageStyle?: CssCascade.ElementStyle;
45
+ private readonly semanticFootnoteFirstRefOffsets;
46
+ private readonly semanticFootnoteFirstRefOffsetsInitialized;
41
47
  private static SVG_URL_ATTRIBUTES;
48
+ private static FOOTNOTE_CALL_OWNER_ATTR;
42
49
  document: Document;
43
50
  exprContentListener: Vtree.ExprContentListener;
44
51
  nodeContext: Vtree.NodeContext | null;
@@ -49,9 +56,18 @@ export declare class ViewFactory extends Base.SimpleEventTarget implements Vtree
49
56
  viewNode: Node | null;
50
57
  constructor(flowName: string, context: Exprs.Context, viewport: Viewport, styler: CssStyler.Styler, regionIds: string[], xmldoc: XmlDoc.XMLDocHolder, docFaces: Font.DocumentFaces, footnoteStyle: CssCascade.ElementStyle, stylerProducer: StylerProducer, page: Vtree.Page, customRenderer: CustomRenderer, fallbackMap: {
51
58
  [key: string]: string;
52
- }, documentURLTransformer: Base.DocumentURLTransformer);
59
+ }, documentURLTransformer: Base.DocumentURLTransformer, pageProps?: {
60
+ [key: string]: CssCascade.ElementStyle;
61
+ }, cascadedPageStyle?: CssCascade.ElementStyle, semanticFootnoteFirstRefOffsets?: Map<string, number | null>, semanticFootnoteFirstRefOffsetsInitialized?: {
62
+ value: boolean;
63
+ });
53
64
  /** @override */
54
65
  clone(): Vtree.LayoutContext;
66
+ private initializeSemanticFootnoteFirstRefOffsets;
67
+ /**
68
+ * True only for the first semantic footnote reference to the same target.
69
+ */
70
+ private shouldGenerateSemanticFootnote;
55
71
  createPseudoelementShadow(element: Element, isRoot: boolean, cascStyle: CssCascade.ElementStyle, computedStyle: {
56
72
  [key: string]: Css.Val;
57
73
  }, styler: CssStyler.AbstractStyler, context: Exprs.Context, parentShadow: Vtree.ShadowContext, subShadow: Vtree.ShadowContext): Vtree.ShadowContext;
@@ -125,7 +141,22 @@ export declare class ViewFactory extends Base.SimpleEventTarget implements Vtree
125
141
  setCurrent(nodeContext: Vtree.NodeContext, firstTime: boolean, atUnforcedBreak?: boolean): Task.Result<boolean>;
126
142
  processShadowContent(pos: Vtree.NodeContext): Vtree.NodeContext;
127
143
  private nextPositionInTree;
128
- isTransclusion(element: Element, elementStyle: CssCascade.ElementStyle, transclusionType: string | null): boolean;
144
+ /**
145
+ * Find a footnote-call element immediately before the given view node.
146
+ */
147
+ private findImmediateFootnoteCallSibling;
148
+ /**
149
+ * True for semantic footnotes that already provide a noteref call in source
150
+ * (EPUB or DPUB-ARIA pattern), so an extra ::footnote-call must not be inserted.
151
+ */
152
+ private isSemanticFootnoteElement;
153
+ /**
154
+ * Insert a footnote-call NodeContext before the footnote element.
155
+ * The footnote-call will be processed as a normal inline element,
156
+ * then shadowSibling will lead to the footnote element.
157
+ * (Issue #868)
158
+ */
159
+ private insertFootnoteCall;
129
160
  /** @override */
130
161
  nextInTree(position: Vtree.NodeContext, atUnforcedBreak?: boolean): Task.Result<Vtree.NodeContext>;
131
162
  addImageFetchers(bg: Css.Val): void;
@@ -156,7 +187,7 @@ export declare class ViewFactory extends Base.SimpleEventTarget implements Vtree
156
187
  peelOff(nodeContext: Vtree.NodeContext, nodeOffset: number): Task.Result<Vtree.NodeContext>;
157
188
  createElement(ns: string, tag: string): Element;
158
189
  /** @override */
159
- applyFootnoteStyle(vertical: boolean, rtl: boolean, target: Element): boolean;
190
+ applyFootnoteStyle(vertical: boolean, rtl: boolean, target: Element): Task.Result<boolean>;
160
191
  /** @override */
161
192
  processFragmentedBlockEdge(nodeContext: Vtree.NodeContext): void;
162
193
  private fixClonedBoxDecorationOverflow;
@@ -178,6 +209,7 @@ export declare const propertiesNotPassedToDOM: {
178
209
  "flow-linger": boolean;
179
210
  "flow-options": boolean;
180
211
  "flow-priority": boolean;
212
+ "footnote-display": boolean;
181
213
  "footnote-policy": boolean;
182
214
  "margin-break": boolean;
183
215
  page: boolean;
@@ -123,6 +123,7 @@ export type Whitespace = Vtree.Whitespace;
123
123
  */
124
124
  export declare function whitespaceFromPropertyValue(whitespace: string): Whitespace | null;
125
125
  export declare function canIgnore(node: Node, whitespace?: Whitespace): boolean;
126
+ export declare function canIgnoreText(text: string, whitespace?: Whitespace): boolean;
126
127
  export declare class Flow {
127
128
  readonly flowName: string;
128
129
  readonly parentFlowName: string | null;
@@ -222,7 +223,6 @@ export declare class NodeContext implements Vtree.NodeContext {
222
223
  clearSide: string | null;
223
224
  floatMinWrapBlock: Css.Numeric | null;
224
225
  columnSpan: Css.Val | null;
225
- verticalAlign: string;
226
226
  captionSide: string;
227
227
  inlineBorderSpacing: number;
228
228
  blockBorderSpacing: number;