@squaredr/fieldcraft-pro 0.0.5 → 1.1.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.
- package/LICENSE.txt +48 -10
- package/README.md +37 -6
- package/dist/{chunk-MQGR25NG.mjs → chunk-7LQW5QYT.mjs} +1 -3
- package/dist/{chunk-APHGEYG4.mjs → chunk-CJBC3KWB.mjs} +156 -130
- package/dist/chunk-QQ4JZGTD.mjs +9 -0
- package/dist/chunk-RSU3X25P.mjs +976 -0
- package/dist/chunk-VECQKSWS.mjs +582 -0
- package/dist/form-builder/index.d.mts +2 -2
- package/dist/form-builder/index.d.ts +2 -2
- package/dist/form-builder/index.js +474 -123
- package/dist/form-builder/index.mjs +3 -1
- package/dist/index.d.mts +52 -3
- package/dist/index.d.ts +52 -3
- package/dist/index.js +1571 -474
- package/dist/index.mjs +7 -5
- package/dist/response-viewer/index.d.mts +4 -1
- package/dist/response-viewer/index.d.ts +4 -1
- package/dist/response-viewer/index.js +1155 -320
- package/dist/response-viewer/index.mjs +3 -1
- package/dist/styles.css +1 -1
- package/dist/theme-editor/index.js +324 -4
- package/dist/theme-editor/index.mjs +2 -1
- package/package.json +15 -14
- package/dist/chunk-NIKQEWPG.mjs +0 -467
- /package/{dist/theme-editor-styles.css → theme-editor/styles.css} +0 -0
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export { DEFAULT_PALETTE, DEFAULT_SCHEMA, FormBuilder, FormBuilderThemeProvider, QUESTION_TYPE_INFO, addOption, addQuestion, addSection, cleanPreset,
|
|
1
|
+
export { DEFAULT_PALETTE, DEFAULT_SCHEMA, FormBuilder, FormBuilderThemeProvider, QUESTION_TYPE_INFO, addOption, addQuestion, addSection, cleanPreset, duplicateQuestion, duplicateSection, findQuestion, findSection, generateId, generateOptionId, generateQuestionId, generateSectionId, moveOption, moveQuestion, moveSection, removeOption, removeQuestion, removeSection, squaredrDarkPreset, updateOption, updateQuestion, updateSection, useBuilderState, useBuilderTheme, useDragDrop, useUndoRedo } from '../chunk-CJBC3KWB.mjs';
|
|
2
|
+
export { cn } from '../chunk-QQ4JZGTD.mjs';
|
|
3
|
+
import '../chunk-VECQKSWS.mjs';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,58 @@
|
|
|
1
|
-
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode, ComponentType } from 'react';
|
|
2
3
|
export { BuilderState, BuilderStateHook, DEFAULT_PALETTE, DEFAULT_SCHEMA, DragItem, DropTarget, FormBuilder, FormBuilderProps, FormBuilderTheme, FormBuilderThemeProvider, MutationAction, PaletteCategory, PropertyPanelTab, QUESTION_TYPE_INFO, QuestionTypeCategory, QuestionTypeInfo, SelectedItem, UndoRedoState, addOption, addQuestion, addSection, cleanPreset, cn, duplicateQuestion, duplicateSection, findQuestion, findSection, generateId, generateOptionId, generateQuestionId, generateSectionId, moveOption, moveQuestion, moveSection, removeOption, removeQuestion, removeSection, squaredrDarkPreset, updateOption, updateQuestion, updateSection, useBuilderState, useBuilderTheme, useDragDrop, useUndoRedo } from './form-builder/index.mjs';
|
|
3
4
|
export { ResponseField, ResponseViewer, ResponseViewerProps, ViewMode } from './response-viewer/index.mjs';
|
|
4
5
|
export { PREVIEW_SCHEMA, ThemeEditor, ThemeEditorInner, ThemeEditorProps } from './theme-editor/index.mjs';
|
|
5
|
-
import 'react';
|
|
6
6
|
import '@squaredr/fieldcraft-core';
|
|
7
|
-
import 'react/jsx-runtime';
|
|
8
7
|
import 'clsx';
|
|
9
8
|
import '@dnd-kit/core';
|
|
9
|
+
|
|
10
|
+
type LicenseStatus = "validating" | "valid" | "invalid" | "expired" | "revoked" | "domain_mismatch";
|
|
11
|
+
type LicenseTier = "starter" | "pro" | "business" | "enterprise";
|
|
12
|
+
type LicenseContext = {
|
|
13
|
+
status: LicenseStatus;
|
|
14
|
+
tier: LicenseTier | null;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type FieldCraftProProviderProps = {
|
|
18
|
+
licenseKey: string;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
declare function FieldCraftProProvider({ licenseKey, children }: FieldCraftProProviderProps): react_jsx_runtime.JSX.Element;
|
|
22
|
+
|
|
23
|
+
declare function useLicense(): LicenseContext;
|
|
24
|
+
|
|
25
|
+
declare function requireLicense<P extends object>(Component: ComponentType<P>, featureName: string): ComponentType<P>;
|
|
26
|
+
|
|
27
|
+
declare function validateLicense(key: string): Promise<LicenseContext>;
|
|
28
|
+
|
|
29
|
+
type UnlicensedOverlayProps = {
|
|
30
|
+
featureName: string;
|
|
31
|
+
reason: string;
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Renders children (the actual Pro component) with a giant,
|
|
36
|
+
* unmissable overlay on top. The component is visible underneath
|
|
37
|
+
* but completely unusable — forcing a license purchase for production.
|
|
38
|
+
*/
|
|
39
|
+
declare function UnlicensedOverlay({ featureName, reason, children }: UnlicensedOverlayProps): react_jsx_runtime.JSX.Element;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Detects whether the current environment is a production deployment.
|
|
43
|
+
*
|
|
44
|
+
* Dev (returns false) = component works freely, no watermark:
|
|
45
|
+
* - localhost, 127.0.0.1, 0.0.0.0, [::1]
|
|
46
|
+
* - Ports like :3000, :5173, :4200, :8080
|
|
47
|
+
* - NODE_ENV !== "production"
|
|
48
|
+
* - file:// protocol
|
|
49
|
+
*
|
|
50
|
+
* Production (returns true) = watermark overlay:
|
|
51
|
+
* - Real domains (.com, .io, .dev, etc.)
|
|
52
|
+
* - HTTPS protocol
|
|
53
|
+
* - NODE_ENV === "production"
|
|
54
|
+
* - Known hosting platforms (vercel.app, netlify.app, etc.)
|
|
55
|
+
*/
|
|
56
|
+
declare function isProductionEnvironment(): boolean;
|
|
57
|
+
|
|
58
|
+
export { FieldCraftProProvider, type LicenseContext, type LicenseStatus, UnlicensedOverlay, isProductionEnvironment, requireLicense, useLicense, validateLicense };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,58 @@
|
|
|
1
|
-
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode, ComponentType } from 'react';
|
|
2
3
|
export { BuilderState, BuilderStateHook, DEFAULT_PALETTE, DEFAULT_SCHEMA, DragItem, DropTarget, FormBuilder, FormBuilderProps, FormBuilderTheme, FormBuilderThemeProvider, MutationAction, PaletteCategory, PropertyPanelTab, QUESTION_TYPE_INFO, QuestionTypeCategory, QuestionTypeInfo, SelectedItem, UndoRedoState, addOption, addQuestion, addSection, cleanPreset, cn, duplicateQuestion, duplicateSection, findQuestion, findSection, generateId, generateOptionId, generateQuestionId, generateSectionId, moveOption, moveQuestion, moveSection, removeOption, removeQuestion, removeSection, squaredrDarkPreset, updateOption, updateQuestion, updateSection, useBuilderState, useBuilderTheme, useDragDrop, useUndoRedo } from './form-builder/index.js';
|
|
3
4
|
export { ResponseField, ResponseViewer, ResponseViewerProps, ViewMode } from './response-viewer/index.js';
|
|
4
5
|
export { PREVIEW_SCHEMA, ThemeEditor, ThemeEditorInner, ThemeEditorProps } from './theme-editor/index.js';
|
|
5
|
-
import 'react';
|
|
6
6
|
import '@squaredr/fieldcraft-core';
|
|
7
|
-
import 'react/jsx-runtime';
|
|
8
7
|
import 'clsx';
|
|
9
8
|
import '@dnd-kit/core';
|
|
9
|
+
|
|
10
|
+
type LicenseStatus = "validating" | "valid" | "invalid" | "expired" | "revoked" | "domain_mismatch";
|
|
11
|
+
type LicenseTier = "starter" | "pro" | "business" | "enterprise";
|
|
12
|
+
type LicenseContext = {
|
|
13
|
+
status: LicenseStatus;
|
|
14
|
+
tier: LicenseTier | null;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type FieldCraftProProviderProps = {
|
|
18
|
+
licenseKey: string;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
declare function FieldCraftProProvider({ licenseKey, children }: FieldCraftProProviderProps): react_jsx_runtime.JSX.Element;
|
|
22
|
+
|
|
23
|
+
declare function useLicense(): LicenseContext;
|
|
24
|
+
|
|
25
|
+
declare function requireLicense<P extends object>(Component: ComponentType<P>, featureName: string): ComponentType<P>;
|
|
26
|
+
|
|
27
|
+
declare function validateLicense(key: string): Promise<LicenseContext>;
|
|
28
|
+
|
|
29
|
+
type UnlicensedOverlayProps = {
|
|
30
|
+
featureName: string;
|
|
31
|
+
reason: string;
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Renders children (the actual Pro component) with a giant,
|
|
36
|
+
* unmissable overlay on top. The component is visible underneath
|
|
37
|
+
* but completely unusable — forcing a license purchase for production.
|
|
38
|
+
*/
|
|
39
|
+
declare function UnlicensedOverlay({ featureName, reason, children }: UnlicensedOverlayProps): react_jsx_runtime.JSX.Element;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Detects whether the current environment is a production deployment.
|
|
43
|
+
*
|
|
44
|
+
* Dev (returns false) = component works freely, no watermark:
|
|
45
|
+
* - localhost, 127.0.0.1, 0.0.0.0, [::1]
|
|
46
|
+
* - Ports like :3000, :5173, :4200, :8080
|
|
47
|
+
* - NODE_ENV !== "production"
|
|
48
|
+
* - file:// protocol
|
|
49
|
+
*
|
|
50
|
+
* Production (returns true) = watermark overlay:
|
|
51
|
+
* - Real domains (.com, .io, .dev, etc.)
|
|
52
|
+
* - HTTPS protocol
|
|
53
|
+
* - NODE_ENV === "production"
|
|
54
|
+
* - Known hosting platforms (vercel.app, netlify.app, etc.)
|
|
55
|
+
*/
|
|
56
|
+
declare function isProductionEnvironment(): boolean;
|
|
57
|
+
|
|
58
|
+
export { FieldCraftProProvider, type LicenseContext, type LicenseStatus, UnlicensedOverlay, isProductionEnvironment, requireLicense, useLicense, validateLicense };
|