@pitcher/js-api 1.26.0-beta.2 → 1.26.0-beta.3

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.
@@ -1,21 +1,27 @@
1
1
  import { CSSProperties } from 'vue';
2
- import { ComponentTypes, ComponentNode } from '../../../types/canvas';
3
2
  interface Props {
4
- page: ComponentNode[];
5
3
  isScaleContentEnabled?: boolean;
6
4
  aspectRatioStyle: CSSProperties | undefined;
7
- componentMap: Record<ComponentTypes, any>;
8
- getChildComponentStyle: (parent: ComponentNode, child: ComponentNode, index: number) => CSSProperties;
9
- getComponentBindings: (component: ComponentNode) => any;
10
- getTopLevelComponentStyle: (page: ComponentNode[], component: ComponentNode, index: number) => CSSProperties;
11
- onElementVisibility: (isVisible: boolean, component: ComponentNode) => void;
12
- shouldRenderComponentWrapper: (component: ComponentNode) => boolean | undefined;
13
5
  aspectRatio: {
14
6
  x: number;
15
7
  y: number;
16
8
  } | undefined;
17
9
  }
18
- declare const _default: import('vue').DefineComponent<Props, {
10
+ declare function __VLS_template(): {
11
+ attrs: Partial<{}>;
12
+ slots: {
13
+ default?(_: {}): any;
14
+ default?(_: {}): any;
15
+ };
16
+ refs: {
17
+ pageWrapperRef: HTMLDivElement;
18
+ pageContainerRef: HTMLDivElement;
19
+ pageContentRef: HTMLDivElement;
20
+ };
21
+ rootEl: HTMLDivElement;
22
+ };
23
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
+ declare const __VLS_component: import('vue').DefineComponent<Props, {
19
25
  pageWrapperRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
20
26
  pageContainerRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
21
27
  pageContentRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
@@ -24,4 +30,10 @@ declare const _default: import('vue').DefineComponent<Props, {
24
30
  pageContainerRef: HTMLDivElement;
25
31
  pageContentRef: HTMLDivElement;
26
32
  }, HTMLDivElement>;
33
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
27
34
  export default _default;
35
+ type __VLS_WithTemplateSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
@@ -31,6 +31,8 @@ type __VLS_Props = {
31
31
  resizable?: boolean;
32
32
  resizeHandles?: ResizeHandlePosition[];
33
33
  resizeMaintainAspectRatio?: boolean;
34
+ expiredContent?: boolean;
35
+ restrictedContent?: boolean;
34
36
  variants?: {
35
37
  title: string;
36
38
  options: DropdownOption[];
@@ -37,6 +37,8 @@ type __VLS_Props = {
37
37
  showOnlyTopToolbar?: boolean;
38
38
  to?: HTMLElement | string;
39
39
  showOnlyBottomToolbar?: boolean;
40
+ expiredContent?: boolean;
41
+ restrictedContent?: boolean;
40
42
  };
41
43
  declare function __VLS_template(): {
42
44
  attrs: Partial<{}>;
@@ -4019,9 +4019,9 @@ export default function useCanvas(): {
4019
4019
  enable_quick_filters_for_search_metadata_filters?: boolean | undefined;
4020
4020
  enable_thumbnails_for_templates_and_blocks?: boolean | undefined;
4021
4021
  default_pdf_page_dimensions?: {
4022
- width?: number | undefined;
4023
- height?: number | undefined;
4024
- printScale?: number | undefined;
4022
+ width?: number | string | undefined;
4023
+ height?: number | string | undefined;
4024
+ print_scale?: number | undefined;
4025
4025
  } | undefined;
4026
4026
  disable_browser_search_context?: boolean | undefined;
4027
4027
  location_prompt_type?: "warning" | "block" | undefined;
@@ -4316,9 +4316,9 @@ export default function useCanvas(): {
4316
4316
  enable_quick_filters_for_search_metadata_filters?: boolean | undefined;
4317
4317
  enable_thumbnails_for_templates_and_blocks?: boolean | undefined;
4318
4318
  default_pdf_page_dimensions?: {
4319
- width?: number | undefined;
4320
- height?: number | undefined;
4321
- printScale?: number | undefined;
4319
+ width?: number | string | undefined;
4320
+ height?: number | string | undefined;
4321
+ print_scale?: number | undefined;
4322
4322
  } | undefined;
4323
4323
  disable_browser_search_context?: boolean | undefined;
4324
4324
  location_prompt_type?: "warning" | "block" | undefined;
@@ -4608,9 +4608,9 @@ export default function useCanvas(): {
4608
4608
  readonly enable_quick_filters_for_search_metadata_filters?: boolean | undefined;
4609
4609
  readonly enable_thumbnails_for_templates_and_blocks?: boolean | undefined;
4610
4610
  readonly default_pdf_page_dimensions?: {
4611
- readonly width?: number | undefined;
4612
- readonly height?: number | undefined;
4613
- readonly printScale?: number | undefined;
4611
+ readonly width?: number | string | undefined;
4612
+ readonly height?: number | string | undefined;
4613
+ readonly print_scale?: number | undefined;
4614
4614
  } | undefined;
4615
4615
  readonly disable_browser_search_context?: boolean | undefined;
4616
4616
  readonly location_prompt_type?: "warning" | "block" | undefined;
@@ -4899,9 +4899,9 @@ export default function useCanvas(): {
4899
4899
  readonly enable_quick_filters_for_search_metadata_filters?: boolean | undefined;
4900
4900
  readonly enable_thumbnails_for_templates_and_blocks?: boolean | undefined;
4901
4901
  readonly default_pdf_page_dimensions?: {
4902
- readonly width?: number | undefined;
4903
- readonly height?: number | undefined;
4904
- readonly printScale?: number | undefined;
4902
+ readonly width?: number | string | undefined;
4903
+ readonly height?: number | string | undefined;
4904
+ readonly print_scale?: number | undefined;
4905
4905
  } | undefined;
4906
4906
  readonly disable_browser_search_context?: boolean | undefined;
4907
4907
  readonly location_prompt_type?: "warning" | "block" | undefined;
@@ -1 +1,30 @@
1
1
  export declare function replaceThemePresetsWithInlineStyles(htmlContent: string, shouldPreserveStyles?: boolean): string;
2
+ /**
3
+ * Converts a measurement value to pixels.
4
+ * If the value is a number, it's assumed to be in pixels.
5
+ * If it's a string, it must include a unit (mm, cm, in, px, pt, pc).
6
+ * Supports both comma and period as decimal separators (e.g., "10.5mm" or "10,5mm").
7
+ *
8
+ * Conversion rates:
9
+ * - 1 inch = 96 pixels (CSS standard)
10
+ * - 1 cm = 37.795275591 pixels
11
+ * - 1 mm = 3.7795275591 pixels
12
+ * - 1 pt = 1.333333 pixels
13
+ * - 1 pc = 16 pixels
14
+ *
15
+ * @param value - Number in pixels or string with unit (e.g., "1000mm", "100,5cm", "4.5in", "96px", "72pt", "6pc")
16
+ * @returns Value in pixels
17
+ */
18
+ export declare function convertToPixels(value: number | string | undefined): number | undefined;
19
+ /**
20
+ * Formats a dimension value for Gotenberg PDF conversion.
21
+ * If the value is a string with units (mm, cm, in, px, pt, pc), normalizes it to use period as decimal separator.
22
+ * If it's a number, appends "px" since the convention is that numbers represent pixels.
23
+ * Supports both comma and period as decimal separators (e.g., "10.5mm" or "10,5mm").
24
+ *
25
+ * Gotenberg supports: 72pt, 96px, 1in, 25.4mm, 2.54cm, or 6pc. Default unit is inches if unspecified.
26
+ *
27
+ * @param value - Number in pixels or string with unit (e.g., "1000mm", "100,5cm", "4.5in", "96px", "72pt", "6pc")
28
+ * @returns Formatted value for Gotenberg (e.g., "1000mm", "10.5cm", "4in", "96px", "72pt", "6pc") or undefined
29
+ */
30
+ export declare function formatDimensionForGotenberg(value: number | string | undefined): string | undefined;
@@ -0,0 +1,8 @@
1
+ interface Props {
2
+ expired?: boolean;
3
+ restricted?: boolean;
4
+ onlyIcon?: boolean;
5
+ onlyTag?: boolean;
6
+ }
7
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
8
+ export default _default;
package/lib/main.lib.d.ts CHANGED
@@ -47,6 +47,7 @@ export { default as CConfirmationContent } from './components/CConfirmation/CCon
47
47
  export { default as CConfirmationAction } from './components/CConfirmation/CConfirmationAction.vue';
48
48
  export { default as CCanvasSelector } from './components/CCanvasSelector/CCanvasSelector.vue';
49
49
  export { default as CContactSelector } from './components/CContactSelector/CContactSelector.vue';
50
+ export { default as CContentError } from './components/CContentError/CContentError.vue';
50
51
  export { default as CContactSelectorSelected } from './components/CContactSelector/CContactSelectorSelected.vue';
51
52
  export * from './components/CContactSelector/CContactSelector.types';
52
53
  export { default as CCreateCanvasModal } from './components/CCreateCanvasModal/CCreateCanvasModal.vue';
@@ -157,6 +158,7 @@ export { default as useBroadcastRouteChange } from './composables/useBroadcastRo
157
158
  export * from './plugins/vueQuery';
158
159
  export * from './apps/canvas-builder/util/canvas.util';
159
160
  export * from './apps/canvas-builder/util/tree';
161
+ export * from './apps/canvas-builder/util/print.util';
160
162
  export * from './components/filters/filter.util';
161
163
  export * from './util/anchor';
162
164
  export * from './util/array';
@@ -14,6 +14,7 @@ export interface GetCanvasesParams {
14
14
  section_ids?: string[];
15
15
  tags__in?: string[];
16
16
  id__in?: string;
17
+ access_type?: string;
17
18
  }
18
19
  export interface CanvasMetadataRetrieve {
19
20
  canvas_id: CanvasRetrieve['id'];
@@ -83,9 +83,9 @@ export type OrganizationSettings = {
83
83
  enable_quick_filters_for_search_metadata_filters?: boolean;
84
84
  enable_thumbnails_for_templates_and_blocks?: boolean;
85
85
  default_pdf_page_dimensions?: {
86
- width?: number;
87
- height?: number;
88
- printScale?: number;
86
+ width?: number | string;
87
+ height?: number | string;
88
+ print_scale?: number;
89
89
  };
90
90
  disable_browser_search_context?: boolean;
91
91
  location_prompt_type?: 'warning' | 'block';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pitcher/js-api",
3
- "version": "1.26.0-beta.2",
3
+ "version": "1.26.0-beta.3",
4
4
  "type": "module",
5
5
  "main": "js-api.umd.min.js",
6
6
  "module": "js-api.esm.js",