@superdoc-dev/template-builder 1.2.0-next.1 → 1.2.0-next.2

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/dist/types.d.ts CHANGED
@@ -7,6 +7,7 @@ export interface FieldDefinition {
7
7
  metadata?: Record<string, any>;
8
8
  mode?: 'inline' | 'block';
9
9
  group?: string;
10
+ fieldType?: string;
10
11
  }
11
12
  /** Field instance in a template document */
12
13
  export interface TemplateField {
@@ -16,6 +17,7 @@ export interface TemplateField {
16
17
  position?: number;
17
18
  mode?: 'inline' | 'block';
18
19
  group?: string;
20
+ fieldType?: string;
19
21
  }
20
22
  export interface TriggerEvent {
21
23
  position: {
@@ -0,0 +1,17 @@
1
+ import { SuperDoc } from 'superdoc';
2
+ import { TemplateField, SuperDocTemplateBuilderProps, ToolbarConfig } from './types';
3
+ export declare const areTemplateFieldsEqual: (a: TemplateField[], b: TemplateField[]) => boolean;
4
+ export declare const resolveToolbar: (toolbar: SuperDocTemplateBuilderProps["toolbar"]) => {
5
+ selector: string;
6
+ config: Omit<ToolbarConfig, "selector">;
7
+ renderDefaultContainer: boolean;
8
+ } | null;
9
+ export declare const getPresentationEditor: (superdoc: SuperDoc | null) => any;
10
+ export declare const getFieldTypeStyle: (fieldType: string) => {
11
+ background: string;
12
+ color: string;
13
+ };
14
+ export declare const MENU_VIEWPORT_PADDING = 10;
15
+ export declare const MENU_APPROX_WIDTH = 250;
16
+ export declare const MENU_APPROX_HEIGHT = 300;
17
+ export declare const clampToViewport: (rect: DOMRect) => DOMRect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/template-builder",
3
- "version": "1.2.0-next.1",
3
+ "version": "1.2.0-next.2",
4
4
  "description": "React template builder component for SuperDoc",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -11,10 +11,12 @@
11
11
  "types": "./dist/index.d.ts",
12
12
  "import": "./dist/index.mjs",
13
13
  "require": "./dist/index.js"
14
- }
14
+ },
15
+ "./field-types.css": "./src/styles/field-types.css"
15
16
  },
16
17
  "files": [
17
18
  "dist",
19
+ "src/styles",
18
20
  "README.md"
19
21
  ],
20
22
  "scripts": {
@@ -0,0 +1,26 @@
1
+ .superdoc-structured-content-inline.superdoc-structured-content-inline,
2
+ .superdoc-structured-content-block.superdoc-structured-content-block {
3
+ border-color: var(--superdoc-field-owner-color, #629be7);
4
+ }
5
+ .superdoc-structured-content-inline.superdoc-structured-content-inline:hover,
6
+ .superdoc-structured-content-block.superdoc-structured-content-block:hover {
7
+ border-color: var(--superdoc-field-owner-color, #629be7);
8
+ }
9
+ .superdoc-structured-content-inline.superdoc-structured-content-inline .superdoc-structured-content-inline__label,
10
+ .superdoc-structured-content-block.superdoc-structured-content-block .superdoc-structured-content-block__label {
11
+ border-color: var(--superdoc-field-owner-color, #629be7);
12
+ background-color: color-mix(in srgb, var(--superdoc-field-owner-color, #629be7) 87%, transparent);
13
+ }
14
+ .superdoc-structured-content-inline[data-sdt-tag*='"fieldType":"signer"'],
15
+ .superdoc-structured-content-block[data-sdt-tag*='"fieldType":"signer"'] {
16
+ border-color: var(--superdoc-field-signer-color, #d97706);
17
+ }
18
+ .superdoc-structured-content-inline[data-sdt-tag*='"fieldType":"signer"']:hover,
19
+ .superdoc-structured-content-block[data-sdt-tag*='"fieldType":"signer"']:hover {
20
+ border-color: var(--superdoc-field-signer-color, #d97706);
21
+ }
22
+ .superdoc-structured-content-inline[data-sdt-tag*='"fieldType":"signer"'] .superdoc-structured-content-inline__label,
23
+ .superdoc-structured-content-block[data-sdt-tag*='"fieldType":"signer"'] .superdoc-structured-content-block__label {
24
+ border-color: var(--superdoc-field-signer-color, #d97706);
25
+ background-color: color-mix(in srgb, var(--superdoc-field-signer-color, #d97706) 87%, transparent);
26
+ }
File without changes