@mission-studio/puck 1.0.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.
@@ -0,0 +1,135 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { E as Entry, a as EntryBoundValue, T as ThemeableColorValue, C as ColorValue, b as ThemeColorKey, c as CustomFieldProps, R as ResponsiveVisibility } from './ResponsiveToggleField-CVhKzDAT.mjs';
3
+ export { B as BorderRadiusPreset, d as ColorPreset, D as DEFAULT_THEME, e as EntryContent, F as FontFamilyPreset, f as FontSizePreset, g as FontWeightPreset, P as PageTheme, h as ResponsiveToggleField, S as ShadowPreset, i as SpacingPreset, j as ThemeBorderKey, k as ThemeBorders, l as ThemeColors, m as ThemeProvider, n as ThemeShadowKey, o as ThemeShadows, p as ThemeSpacing, q as ThemeSpacingKey, r as ThemeTypography, s as ThemeableBorderRadiusValue, t as ThemeableShadowValue, u as ThemeableSpacingValue, v as allColorPresets, w as borderRadiusScale, x as fontFamilies, y as fontSizes, z as fontWeights, A as getBorderRadiusCSS, G as getClosestBorderRadiusValue, H as getClosestSpacingValue, I as getFontSizeCSS, J as getShadowCSS, K as neutralColors, L as shadowPresets, M as spacingScale, N as useTheme } from './ResponsiveToggleField-CVhKzDAT.mjs';
4
+ import { ReactNode } from 'react';
5
+ import { Data } from '@measured/puck';
6
+
7
+ declare function TemplatesList(): react_jsx_runtime.JSX.Element;
8
+
9
+ type EntriesContextValue = {
10
+ entries: Entry[];
11
+ getEntry: (name: string) => Entry | undefined;
12
+ getEntryValue: (entryName: string, fieldKey: string) => string | number | boolean | null | undefined;
13
+ entryNames: string[];
14
+ };
15
+ declare function EntriesProvider({ entries, children, }: {
16
+ entries: Entry[];
17
+ children: ReactNode;
18
+ }): react_jsx_runtime.JSX.Element;
19
+ declare function useEntries(): EntriesContextValue;
20
+
21
+ type EntryBoundTextFieldProps = {
22
+ value: EntryBoundValue<string> | string | undefined;
23
+ onChange: (value: EntryBoundValue<string> | string) => void;
24
+ label: string;
25
+ disabled?: boolean;
26
+ placeholder?: string;
27
+ };
28
+ declare function EntryBoundTextField({ value, onChange, label, disabled, placeholder, }: EntryBoundTextFieldProps): react_jsx_runtime.JSX.Element;
29
+ declare function createEntryBoundTextField(label: string, placeholder?: string): {
30
+ type: "custom";
31
+ label: string;
32
+ render: ({ value, onChange, readOnly, }: {
33
+ value: EntryBoundValue<string> | string | undefined;
34
+ onChange: (value: EntryBoundValue<string> | string) => void;
35
+ readOnly?: boolean;
36
+ }) => react_jsx_runtime.JSX.Element;
37
+ };
38
+
39
+ type ThemeableColorFieldProps = {
40
+ value: ThemeableColorValue | ColorValue | undefined;
41
+ onChange: (value: ThemeableColorValue) => void;
42
+ themeKey: ThemeColorKey;
43
+ label: string;
44
+ disabled?: boolean;
45
+ };
46
+ declare function ThemeableColorField({ value, onChange, themeKey, label, disabled, }: ThemeableColorFieldProps): react_jsx_runtime.JSX.Element;
47
+ declare function createThemeableColorField(label: string, themeKey: ThemeColorKey): {
48
+ type: "custom";
49
+ label: string;
50
+ render: ({ value, onChange, readOnly, }: {
51
+ value: ThemeableColorValue | ColorValue | undefined;
52
+ onChange: (value: ThemeableColorValue) => void;
53
+ readOnly?: boolean;
54
+ }) => react_jsx_runtime.JSX.Element;
55
+ };
56
+
57
+ type TypographyValue = {
58
+ fontFamily: string;
59
+ fontSize: string;
60
+ fontWeight: number;
61
+ };
62
+ declare function TypographyField({ value, onChangeAction, disabled, label, }: CustomFieldProps<TypographyValue>): react_jsx_runtime.JSX.Element;
63
+
64
+ declare function BorderRadiusField({ value, onChangeAction, disabled, label, }: CustomFieldProps<number>): react_jsx_runtime.JSX.Element;
65
+
66
+ declare function ColorPickerField({ value, onChangeAction, disabled, label, }: CustomFieldProps<ColorValue>): react_jsx_runtime.JSX.Element;
67
+
68
+ declare function ShadowField({ value, onChangeAction, disabled, label, }: CustomFieldProps<string>): react_jsx_runtime.JSX.Element;
69
+
70
+ declare function SpacingSliderField({ value, onChangeAction, disabled, label, }: CustomFieldProps<number>): react_jsx_runtime.JSX.Element;
71
+
72
+ declare function createColorField(label?: string): {
73
+ type: "custom";
74
+ label: string | undefined;
75
+ render: ({ value, onChange, readOnly, }: {
76
+ value: ColorValue;
77
+ onChange: (value: ColorValue) => void;
78
+ readOnly?: boolean;
79
+ }) => react_jsx_runtime.JSX.Element;
80
+ };
81
+ declare function createSpacingField(label?: string): {
82
+ type: "custom";
83
+ label: string | undefined;
84
+ render: ({ value, onChange, readOnly, }: {
85
+ value: number;
86
+ onChange: (value: number) => void;
87
+ readOnly?: boolean;
88
+ }) => react_jsx_runtime.JSX.Element;
89
+ };
90
+ declare function createShadowField(label?: string): {
91
+ type: "custom";
92
+ label: string | undefined;
93
+ render: ({ value, onChange, readOnly, }: {
94
+ value: string;
95
+ onChange: (value: string) => void;
96
+ readOnly?: boolean;
97
+ }) => react_jsx_runtime.JSX.Element;
98
+ };
99
+ declare function createBorderRadiusField(label?: string): {
100
+ type: "custom";
101
+ label: string | undefined;
102
+ render: ({ value, onChange, readOnly, }: {
103
+ value: number;
104
+ onChange: (value: number) => void;
105
+ readOnly?: boolean;
106
+ }) => react_jsx_runtime.JSX.Element;
107
+ };
108
+ declare function createTypographyField(label?: string): {
109
+ type: "custom";
110
+ label: string | undefined;
111
+ render: ({ value, onChange, readOnly, }: {
112
+ value: TypographyValue;
113
+ onChange: (value: TypographyValue) => void;
114
+ readOnly?: boolean;
115
+ }) => react_jsx_runtime.JSX.Element;
116
+ };
117
+ declare function createResponsiveField(label?: string): {
118
+ type: "custom";
119
+ label: string | undefined;
120
+ render: ({ value, onChange, readOnly, }: {
121
+ value: ResponsiveVisibility;
122
+ onChange: (value: ResponsiveVisibility) => void;
123
+ readOnly?: boolean;
124
+ }) => react_jsx_runtime.JSX.Element;
125
+ };
126
+
127
+ type Template = {
128
+ name: string;
129
+ description: string;
130
+ category: string;
131
+ getData: () => Partial<Data>;
132
+ };
133
+ declare const templates: Template[];
134
+
135
+ export { BorderRadiusField, ColorPickerField, ColorValue, CustomFieldProps, EntriesProvider, Entry, EntryBoundTextField, EntryBoundValue, ResponsiveVisibility, ShadowField, SpacingSliderField, TemplatesList, ThemeColorKey, ThemeableColorField, ThemeableColorValue, TypographyField, type TypographyValue, createBorderRadiusField, createColorField, createEntryBoundTextField, createResponsiveField, createShadowField, createSpacingField, createThemeableColorField, createTypographyField, templates, useEntries };
@@ -0,0 +1,135 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { E as Entry, a as EntryBoundValue, T as ThemeableColorValue, C as ColorValue, b as ThemeColorKey, c as CustomFieldProps, R as ResponsiveVisibility } from './ResponsiveToggleField-CVhKzDAT.js';
3
+ export { B as BorderRadiusPreset, d as ColorPreset, D as DEFAULT_THEME, e as EntryContent, F as FontFamilyPreset, f as FontSizePreset, g as FontWeightPreset, P as PageTheme, h as ResponsiveToggleField, S as ShadowPreset, i as SpacingPreset, j as ThemeBorderKey, k as ThemeBorders, l as ThemeColors, m as ThemeProvider, n as ThemeShadowKey, o as ThemeShadows, p as ThemeSpacing, q as ThemeSpacingKey, r as ThemeTypography, s as ThemeableBorderRadiusValue, t as ThemeableShadowValue, u as ThemeableSpacingValue, v as allColorPresets, w as borderRadiusScale, x as fontFamilies, y as fontSizes, z as fontWeights, A as getBorderRadiusCSS, G as getClosestBorderRadiusValue, H as getClosestSpacingValue, I as getFontSizeCSS, J as getShadowCSS, K as neutralColors, L as shadowPresets, M as spacingScale, N as useTheme } from './ResponsiveToggleField-CVhKzDAT.js';
4
+ import { ReactNode } from 'react';
5
+ import { Data } from '@measured/puck';
6
+
7
+ declare function TemplatesList(): react_jsx_runtime.JSX.Element;
8
+
9
+ type EntriesContextValue = {
10
+ entries: Entry[];
11
+ getEntry: (name: string) => Entry | undefined;
12
+ getEntryValue: (entryName: string, fieldKey: string) => string | number | boolean | null | undefined;
13
+ entryNames: string[];
14
+ };
15
+ declare function EntriesProvider({ entries, children, }: {
16
+ entries: Entry[];
17
+ children: ReactNode;
18
+ }): react_jsx_runtime.JSX.Element;
19
+ declare function useEntries(): EntriesContextValue;
20
+
21
+ type EntryBoundTextFieldProps = {
22
+ value: EntryBoundValue<string> | string | undefined;
23
+ onChange: (value: EntryBoundValue<string> | string) => void;
24
+ label: string;
25
+ disabled?: boolean;
26
+ placeholder?: string;
27
+ };
28
+ declare function EntryBoundTextField({ value, onChange, label, disabled, placeholder, }: EntryBoundTextFieldProps): react_jsx_runtime.JSX.Element;
29
+ declare function createEntryBoundTextField(label: string, placeholder?: string): {
30
+ type: "custom";
31
+ label: string;
32
+ render: ({ value, onChange, readOnly, }: {
33
+ value: EntryBoundValue<string> | string | undefined;
34
+ onChange: (value: EntryBoundValue<string> | string) => void;
35
+ readOnly?: boolean;
36
+ }) => react_jsx_runtime.JSX.Element;
37
+ };
38
+
39
+ type ThemeableColorFieldProps = {
40
+ value: ThemeableColorValue | ColorValue | undefined;
41
+ onChange: (value: ThemeableColorValue) => void;
42
+ themeKey: ThemeColorKey;
43
+ label: string;
44
+ disabled?: boolean;
45
+ };
46
+ declare function ThemeableColorField({ value, onChange, themeKey, label, disabled, }: ThemeableColorFieldProps): react_jsx_runtime.JSX.Element;
47
+ declare function createThemeableColorField(label: string, themeKey: ThemeColorKey): {
48
+ type: "custom";
49
+ label: string;
50
+ render: ({ value, onChange, readOnly, }: {
51
+ value: ThemeableColorValue | ColorValue | undefined;
52
+ onChange: (value: ThemeableColorValue) => void;
53
+ readOnly?: boolean;
54
+ }) => react_jsx_runtime.JSX.Element;
55
+ };
56
+
57
+ type TypographyValue = {
58
+ fontFamily: string;
59
+ fontSize: string;
60
+ fontWeight: number;
61
+ };
62
+ declare function TypographyField({ value, onChangeAction, disabled, label, }: CustomFieldProps<TypographyValue>): react_jsx_runtime.JSX.Element;
63
+
64
+ declare function BorderRadiusField({ value, onChangeAction, disabled, label, }: CustomFieldProps<number>): react_jsx_runtime.JSX.Element;
65
+
66
+ declare function ColorPickerField({ value, onChangeAction, disabled, label, }: CustomFieldProps<ColorValue>): react_jsx_runtime.JSX.Element;
67
+
68
+ declare function ShadowField({ value, onChangeAction, disabled, label, }: CustomFieldProps<string>): react_jsx_runtime.JSX.Element;
69
+
70
+ declare function SpacingSliderField({ value, onChangeAction, disabled, label, }: CustomFieldProps<number>): react_jsx_runtime.JSX.Element;
71
+
72
+ declare function createColorField(label?: string): {
73
+ type: "custom";
74
+ label: string | undefined;
75
+ render: ({ value, onChange, readOnly, }: {
76
+ value: ColorValue;
77
+ onChange: (value: ColorValue) => void;
78
+ readOnly?: boolean;
79
+ }) => react_jsx_runtime.JSX.Element;
80
+ };
81
+ declare function createSpacingField(label?: string): {
82
+ type: "custom";
83
+ label: string | undefined;
84
+ render: ({ value, onChange, readOnly, }: {
85
+ value: number;
86
+ onChange: (value: number) => void;
87
+ readOnly?: boolean;
88
+ }) => react_jsx_runtime.JSX.Element;
89
+ };
90
+ declare function createShadowField(label?: string): {
91
+ type: "custom";
92
+ label: string | undefined;
93
+ render: ({ value, onChange, readOnly, }: {
94
+ value: string;
95
+ onChange: (value: string) => void;
96
+ readOnly?: boolean;
97
+ }) => react_jsx_runtime.JSX.Element;
98
+ };
99
+ declare function createBorderRadiusField(label?: string): {
100
+ type: "custom";
101
+ label: string | undefined;
102
+ render: ({ value, onChange, readOnly, }: {
103
+ value: number;
104
+ onChange: (value: number) => void;
105
+ readOnly?: boolean;
106
+ }) => react_jsx_runtime.JSX.Element;
107
+ };
108
+ declare function createTypographyField(label?: string): {
109
+ type: "custom";
110
+ label: string | undefined;
111
+ render: ({ value, onChange, readOnly, }: {
112
+ value: TypographyValue;
113
+ onChange: (value: TypographyValue) => void;
114
+ readOnly?: boolean;
115
+ }) => react_jsx_runtime.JSX.Element;
116
+ };
117
+ declare function createResponsiveField(label?: string): {
118
+ type: "custom";
119
+ label: string | undefined;
120
+ render: ({ value, onChange, readOnly, }: {
121
+ value: ResponsiveVisibility;
122
+ onChange: (value: ResponsiveVisibility) => void;
123
+ readOnly?: boolean;
124
+ }) => react_jsx_runtime.JSX.Element;
125
+ };
126
+
127
+ type Template = {
128
+ name: string;
129
+ description: string;
130
+ category: string;
131
+ getData: () => Partial<Data>;
132
+ };
133
+ declare const templates: Template[];
134
+
135
+ export { BorderRadiusField, ColorPickerField, ColorValue, CustomFieldProps, EntriesProvider, Entry, EntryBoundTextField, EntryBoundValue, ResponsiveVisibility, ShadowField, SpacingSliderField, TemplatesList, ThemeColorKey, ThemeableColorField, ThemeableColorValue, TypographyField, type TypographyValue, createBorderRadiusField, createColorField, createEntryBoundTextField, createResponsiveField, createShadowField, createSpacingField, createThemeableColorField, createTypographyField, templates, useEntries };