@puckeditor/plugin-ai 0.8.0-canary.844eb87d → 0.8.0-canary.895ab249
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/dist/index.css +35 -143
- package/dist/index.d.mts +1 -20
- package/dist/index.d.ts +1 -20
- package/dist/index.js +86 -2086
- package/dist/index.mjs +87 -2098
- package/package.json +3 -10
package/dist/index.css
CHANGED
|
@@ -1916,14 +1916,14 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1916
1916
|
}
|
|
1917
1917
|
|
|
1918
1918
|
/* css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/PromptForm/styles.module.css/#css-module-data */
|
|
1919
|
-
.
|
|
1919
|
+
._PromptForm_1pyjk_1 {
|
|
1920
1920
|
--radius: 9px;
|
|
1921
1921
|
background-color: var(--puck-color-grey-09);
|
|
1922
1922
|
border-radius: var(--radius);
|
|
1923
1923
|
position: relative;
|
|
1924
1924
|
width: 100%;
|
|
1925
1925
|
}
|
|
1926
|
-
._PromptForm-
|
|
1926
|
+
._PromptForm-dropOverlay_1pyjk_9 {
|
|
1927
1927
|
align-items: center;
|
|
1928
1928
|
background: var(--puck-color-azure-12);
|
|
1929
1929
|
border: 2px dashed var(--puck-color-azure-04);
|
|
@@ -1940,16 +1940,16 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1940
1940
|
position: absolute;
|
|
1941
1941
|
z-index: 10;
|
|
1942
1942
|
}
|
|
1943
|
-
._PromptForm-
|
|
1943
|
+
._PromptForm-inner_1pyjk_27 {
|
|
1944
1944
|
border-radius: var(--radius);
|
|
1945
1945
|
padding: 1px;
|
|
1946
1946
|
position: relative;
|
|
1947
1947
|
}
|
|
1948
|
-
._PromptForm--
|
|
1948
|
+
._PromptForm--dark_1pyjk_33 {
|
|
1949
1949
|
background-color: var(--puck-color-grey-02);
|
|
1950
1950
|
box-shadow: none;
|
|
1951
1951
|
}
|
|
1952
|
-
._PromptForm--
|
|
1952
|
+
._PromptForm--glow_1pyjk_38 ._PromptForm-glow_1pyjk_38 {
|
|
1953
1953
|
border: 2px solid transparent;
|
|
1954
1954
|
border-radius: var(--radius);
|
|
1955
1955
|
mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
|
|
@@ -1959,7 +1959,7 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1959
1959
|
pointer-events: none;
|
|
1960
1960
|
inset: 0;
|
|
1961
1961
|
}
|
|
1962
|
-
._PromptForm--
|
|
1962
|
+
._PromptForm--glow_1pyjk_38 ._PromptForm-glow_1pyjk_38::after {
|
|
1963
1963
|
background:
|
|
1964
1964
|
radial-gradient(
|
|
1965
1965
|
circle at center,
|
|
@@ -1968,30 +1968,30 @@ button._Menu-item_1tu16_55:hover {
|
|
|
1968
1968
|
content: "";
|
|
1969
1969
|
offset-path: rect(0 100% 100% 0 round 200px);
|
|
1970
1970
|
offset-anchor: calc(var(--anchor) * 1%) 50%;
|
|
1971
|
-
animation:
|
|
1971
|
+
animation: _loop_1pyjk_1 9s infinite linear;
|
|
1972
1972
|
position: absolute;
|
|
1973
1973
|
height: 312px;
|
|
1974
1974
|
aspect-ratio: 1 / 1;
|
|
1975
1975
|
display: inline-block;
|
|
1976
1976
|
}
|
|
1977
|
-
._PromptForm--
|
|
1977
|
+
._PromptForm--dark_1pyjk_33._PromptForm--glow_1pyjk_38 ._PromptForm-glow_1pyjk_38::after {
|
|
1978
1978
|
background:
|
|
1979
1979
|
radial-gradient(
|
|
1980
1980
|
circle at center,
|
|
1981
1981
|
var(--puck-color-azure-08),
|
|
1982
1982
|
transparent 50%);
|
|
1983
1983
|
}
|
|
1984
|
-
@keyframes
|
|
1984
|
+
@keyframes _loop_1pyjk_1 {
|
|
1985
1985
|
to {
|
|
1986
1986
|
offset-distance: 100%;
|
|
1987
1987
|
}
|
|
1988
1988
|
}
|
|
1989
|
-
._PromptForm-
|
|
1989
|
+
._PromptForm-formInner_1pyjk_79 {
|
|
1990
1990
|
background-color: white;
|
|
1991
1991
|
border-radius: 8px;
|
|
1992
1992
|
position: relative;
|
|
1993
1993
|
}
|
|
1994
|
-
._PromptForm-
|
|
1994
|
+
._PromptForm-input_1pyjk_85 {
|
|
1995
1995
|
background-color: transparent;
|
|
1996
1996
|
border: none;
|
|
1997
1997
|
display: block;
|
|
@@ -2008,26 +2008,21 @@ button._Menu-item_1tu16_55:hover {
|
|
|
2008
2008
|
width: 100%;
|
|
2009
2009
|
box-sizing: border-box;
|
|
2010
2010
|
}
|
|
2011
|
-
|
|
2012
|
-
._PromptForm-input_16e09_85 {
|
|
2013
|
-
font-size: var(--puck-font-size-xxs);
|
|
2014
|
-
}
|
|
2015
|
-
}
|
|
2016
|
-
._PromptForm-input_16e09_85:focus {
|
|
2011
|
+
._PromptForm-input_1pyjk_85:focus {
|
|
2017
2012
|
outline: none;
|
|
2018
2013
|
}
|
|
2019
|
-
._PromptForm-
|
|
2014
|
+
._PromptForm-formInner_1pyjk_79:has(._PromptForm-input_1pyjk_85:focus) {
|
|
2020
2015
|
outline: 2px solid var(--puck-color-azure-04);
|
|
2021
2016
|
}
|
|
2022
|
-
._PromptForm--
|
|
2017
|
+
._PromptForm--dark_1pyjk_33 ._PromptForm-input_1pyjk_85 {
|
|
2023
2018
|
background-color: var(--puck-color-grey-01);
|
|
2024
2019
|
color: var(--puck-color-grey-08);
|
|
2025
2020
|
}
|
|
2026
|
-
._PromptForm--
|
|
2021
|
+
._PromptForm--disabled_1pyjk_116 ._PromptForm-input_1pyjk_85 {
|
|
2027
2022
|
background-color: var(--puck-color-grey-12);
|
|
2028
2023
|
cursor: not-allowed;
|
|
2029
2024
|
}
|
|
2030
|
-
._PromptForm-
|
|
2025
|
+
._PromptForm-helper_1pyjk_121 {
|
|
2031
2026
|
align-items: center;
|
|
2032
2027
|
color: var(--puck-color-grey-04);
|
|
2033
2028
|
display: flex;
|
|
@@ -2036,7 +2031,7 @@ button._Menu-item_1tu16_55:hover {
|
|
|
2036
2031
|
font-weight: 500;
|
|
2037
2032
|
padding: 6px 12px;
|
|
2038
2033
|
}
|
|
2039
|
-
._PromptForm-
|
|
2034
|
+
._PromptForm-actions_1pyjk_131 {
|
|
2040
2035
|
align-items: flex-end;
|
|
2041
2036
|
cursor: text;
|
|
2042
2037
|
display: flex;
|
|
@@ -2046,7 +2041,7 @@ button._Menu-item_1tu16_55:hover {
|
|
|
2046
2041
|
right: 0;
|
|
2047
2042
|
padding: 6px;
|
|
2048
2043
|
}
|
|
2049
|
-
._PromptForm-
|
|
2044
|
+
._PromptForm-actionsLeft_1pyjk_142 {
|
|
2050
2045
|
align-items: center;
|
|
2051
2046
|
cursor: auto;
|
|
2052
2047
|
display: flex;
|
|
@@ -2054,11 +2049,11 @@ button._Menu-item_1tu16_55:hover {
|
|
|
2054
2049
|
gap: 6px;
|
|
2055
2050
|
padding-left: 4px;
|
|
2056
2051
|
}
|
|
2057
|
-
._PromptForm-
|
|
2052
|
+
._PromptForm-actionsRight_1pyjk_151 {
|
|
2058
2053
|
cursor: auto;
|
|
2059
2054
|
margin-left: auto;
|
|
2060
2055
|
}
|
|
2061
|
-
._PromptForm-
|
|
2056
|
+
._PromptForm-actionSubmit_1pyjk_156 {
|
|
2062
2057
|
background: var(--puck-color-azure-04);
|
|
2063
2058
|
border-radius: 48px;
|
|
2064
2059
|
color: white;
|
|
@@ -2074,32 +2069,32 @@ button._Menu-item_1tu16_55:hover {
|
|
|
2074
2069
|
width: 100%;
|
|
2075
2070
|
min-width: 32px;
|
|
2076
2071
|
}
|
|
2077
|
-
._PromptForm--
|
|
2072
|
+
._PromptForm--userCta_1pyjk_173 ._PromptForm-actionSubmit_1pyjk_156 {
|
|
2078
2073
|
padding: 8px 12px;
|
|
2079
2074
|
}
|
|
2080
|
-
._PromptForm-
|
|
2075
|
+
._PromptForm-actionSubmit_1pyjk_156:hover {
|
|
2081
2076
|
background: var(--puck-color-azure-05);
|
|
2082
2077
|
}
|
|
2083
|
-
._PromptForm-
|
|
2078
|
+
._PromptForm-actionSubmit_1pyjk_156:focus {
|
|
2084
2079
|
outline: 2px solid var(--puck-color-azure-04);
|
|
2085
2080
|
outline-offset: 2px;
|
|
2086
2081
|
}
|
|
2087
|
-
._PromptForm--
|
|
2082
|
+
._PromptForm--isDisabled_1pyjk_186 ._PromptForm-actionSubmit_1pyjk_156 {
|
|
2088
2083
|
background-color: var(--puck-color-grey-06);
|
|
2089
2084
|
cursor: not-allowed;
|
|
2090
2085
|
}
|
|
2091
|
-
._PromptForm--
|
|
2086
|
+
._PromptForm--isLoading_1pyjk_191 ._PromptForm-actionSubmit_1pyjk_156 {
|
|
2092
2087
|
background-color: var(--puck-color-azure-06);
|
|
2093
2088
|
cursor: not-allowed;
|
|
2094
2089
|
}
|
|
2095
|
-
._PromptForm-
|
|
2090
|
+
._PromptForm-attachments_1pyjk_196 {
|
|
2096
2091
|
display: flex;
|
|
2097
2092
|
flex-wrap: wrap;
|
|
2098
2093
|
gap: 8px;
|
|
2099
2094
|
padding: 8px 12px;
|
|
2100
2095
|
padding-bottom: 0px;
|
|
2101
2096
|
}
|
|
2102
|
-
._PromptForm-
|
|
2097
|
+
._PromptForm-attachmentChip_1pyjk_204 {
|
|
2103
2098
|
align-items: center;
|
|
2104
2099
|
background: var(--puck-color-grey-12);
|
|
2105
2100
|
border: 1px solid var(--puck-color-grey-09);
|
|
@@ -2113,21 +2108,21 @@ button._Menu-item_1tu16_55:hover {
|
|
|
2113
2108
|
padding: 4px 8px;
|
|
2114
2109
|
text-overflow: ellipsis;
|
|
2115
2110
|
}
|
|
2116
|
-
._PromptForm-
|
|
2111
|
+
._PromptForm-attachmentChipUploading_1pyjk_219 {
|
|
2117
2112
|
color: var(--puck-color-grey-05);
|
|
2118
2113
|
}
|
|
2119
|
-
._PromptForm-
|
|
2114
|
+
._PromptForm-attachmentChipFailed_1pyjk_223 {
|
|
2120
2115
|
border-color: var(--puck-color-red-08);
|
|
2121
2116
|
color: var(--puck-color-red-04);
|
|
2122
2117
|
}
|
|
2123
|
-
._PromptForm-
|
|
2118
|
+
._PromptForm-attachmentError_1pyjk_228 {
|
|
2124
2119
|
color: var(--puck-color-red-04);
|
|
2125
2120
|
font-size: var(--puck-font-size-xxxs);
|
|
2126
2121
|
}
|
|
2127
|
-
._PromptForm-
|
|
2128
|
-
animation: _PromptForm-
|
|
2122
|
+
._PromptForm-attachmentSpinner_1pyjk_233 {
|
|
2123
|
+
animation: _PromptForm-attachmentSpin_1pyjk_233 1s linear infinite;
|
|
2129
2124
|
}
|
|
2130
|
-
._PromptForm-
|
|
2125
|
+
._PromptForm-attachmentRemove_1pyjk_237 {
|
|
2131
2126
|
align-items: center;
|
|
2132
2127
|
background: transparent;
|
|
2133
2128
|
border: 0;
|
|
@@ -2137,115 +2132,12 @@ button._Menu-item_1tu16_55:hover {
|
|
|
2137
2132
|
margin-left: 2px;
|
|
2138
2133
|
padding: 0;
|
|
2139
2134
|
}
|
|
2140
|
-
._PromptForm-
|
|
2135
|
+
._PromptForm-attachmentRemove_1pyjk_237:focus-visible {
|
|
2141
2136
|
border-radius: 4px;
|
|
2142
2137
|
outline: 2px solid var(--puck-color-azure-04);
|
|
2143
2138
|
}
|
|
2144
|
-
@keyframes _PromptForm-
|
|
2139
|
+
@keyframes _PromptForm-attachmentSpin_1pyjk_233 {
|
|
2145
2140
|
to {
|
|
2146
2141
|
transform: rotate(360deg);
|
|
2147
2142
|
}
|
|
2148
2143
|
}
|
|
2149
|
-
|
|
2150
|
-
/* css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/DesignModeToggle/styles.module.css/#css-module-data */
|
|
2151
|
-
._DesignModeToggle_o5uty_1 {
|
|
2152
|
-
display: flex;
|
|
2153
|
-
align-items: center;
|
|
2154
|
-
gap: 6px;
|
|
2155
|
-
margin-left: auto;
|
|
2156
|
-
}
|
|
2157
|
-
._DesignModeToggle-button_o5uty_8 {
|
|
2158
|
-
all: unset;
|
|
2159
|
-
box-sizing: border-box;
|
|
2160
|
-
cursor: pointer;
|
|
2161
|
-
display: flex;
|
|
2162
|
-
align-items: center;
|
|
2163
|
-
gap: 4px;
|
|
2164
|
-
padding: 6px 8px;
|
|
2165
|
-
border-radius: 6px;
|
|
2166
|
-
font-size: 12px;
|
|
2167
|
-
font-weight: 500;
|
|
2168
|
-
color: var(--puck-color-grey-04);
|
|
2169
|
-
background: var(--puck-color-grey-11);
|
|
2170
|
-
transition: background 150ms, color 150ms;
|
|
2171
|
-
}
|
|
2172
|
-
._DesignModeToggle-button_o5uty_8:hover {
|
|
2173
|
-
background: var(--puck-color-grey-10);
|
|
2174
|
-
}
|
|
2175
|
-
._DesignModeToggle-button--active_o5uty_28 {
|
|
2176
|
-
background: var(--puck-color-azure-09);
|
|
2177
|
-
color: var(--puck-color-azure-03);
|
|
2178
|
-
}
|
|
2179
|
-
._DesignModeToggle-button_o5uty_8:focus-visible {
|
|
2180
|
-
outline: 2px var(--puck-color-azure-04) solid;
|
|
2181
|
-
}
|
|
2182
|
-
._DesignModeToggle-button_o5uty_8:disabled {
|
|
2183
|
-
cursor: not-allowed;
|
|
2184
|
-
}
|
|
2185
|
-
._DesignModeToggle-button--active_o5uty_28:hover {
|
|
2186
|
-
background: var(--puck-color-azure-08);
|
|
2187
|
-
}
|
|
2188
|
-
|
|
2189
|
-
/* css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/ManageComponents/styles.module.css/#css-module-data */
|
|
2190
|
-
._ManageComponents-cta_xifz3_1 {
|
|
2191
|
-
all: unset;
|
|
2192
|
-
box-sizing: border-box;
|
|
2193
|
-
border-radius: 8px;
|
|
2194
|
-
cursor: pointer;
|
|
2195
|
-
display: flex;
|
|
2196
|
-
align-items: center;
|
|
2197
|
-
justify-content: center;
|
|
2198
|
-
gap: 8px;
|
|
2199
|
-
width: 100%;
|
|
2200
|
-
padding: 8px 12px;
|
|
2201
|
-
font-size: var(--puck-font-size-xs);
|
|
2202
|
-
color: var(--puck-color-grey-04);
|
|
2203
|
-
margin-top: 16px;
|
|
2204
|
-
}
|
|
2205
|
-
._ManageComponents-cta_xifz3_1:hover {
|
|
2206
|
-
color: var(--puck-color-azure-04);
|
|
2207
|
-
background: var(--puck-color-grey-11);
|
|
2208
|
-
}
|
|
2209
|
-
._ManageComponents-list_xifz3_22 {
|
|
2210
|
-
display: flex;
|
|
2211
|
-
flex-direction: column;
|
|
2212
|
-
gap: 8px;
|
|
2213
|
-
overflow-y: auto;
|
|
2214
|
-
}
|
|
2215
|
-
._ManageComponents-item_xifz3_29 {
|
|
2216
|
-
display: flex;
|
|
2217
|
-
align-items: center;
|
|
2218
|
-
border-radius: 4px;
|
|
2219
|
-
justify-content: space-between;
|
|
2220
|
-
padding: 4px 8px;
|
|
2221
|
-
}
|
|
2222
|
-
._ManageComponents-item_xifz3_29:hover {
|
|
2223
|
-
background-color: var(--puck-color-grey-11);
|
|
2224
|
-
}
|
|
2225
|
-
._ManageComponents-delete_xifz3_41 {
|
|
2226
|
-
all: unset;
|
|
2227
|
-
cursor: pointer;
|
|
2228
|
-
display: flex;
|
|
2229
|
-
align-items: center;
|
|
2230
|
-
padding: 4px 8px;
|
|
2231
|
-
border-radius: 8px;
|
|
2232
|
-
font-size: var(--puck-font-size-xxs);
|
|
2233
|
-
color: var(--puck-color-red-03);
|
|
2234
|
-
gap: 4px;
|
|
2235
|
-
}
|
|
2236
|
-
._ManageComponents-delete_xifz3_41:hover {
|
|
2237
|
-
background: var(--puck-color-red-09, #fef2f2);
|
|
2238
|
-
}
|
|
2239
|
-
._ManageComponents-empty_xifz3_57 {
|
|
2240
|
-
text-align: center;
|
|
2241
|
-
color: var(--puck-color-grey-05);
|
|
2242
|
-
}
|
|
2243
|
-
|
|
2244
|
-
/* css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/Drawer/styles.module.css/#css-module-data */
|
|
2245
|
-
._Drawer--empty_1f4ux_1 {
|
|
2246
|
-
align-items: center;
|
|
2247
|
-
color: var(--puck-color-grey-05);
|
|
2248
|
-
display: flex;
|
|
2249
|
-
justify-content: center;
|
|
2250
|
-
height: 100%;
|
|
2251
|
-
}
|
package/dist/index.d.mts
CHANGED
|
@@ -122,23 +122,14 @@ type AddOperation = {
|
|
|
122
122
|
type: string;
|
|
123
123
|
props: object;
|
|
124
124
|
};
|
|
125
|
-
/**
|
|
126
|
-
* Streamed string tails keyed by prop path (e.g. `html`, `cta.label`,
|
|
127
|
-
* `items[2].title`). Each tail is appended to the value currently at that
|
|
128
|
-
* path. A top-level prop is carried either in `props` (full replacement) or
|
|
129
|
-
* in `appends` — never both — so applying them can't double-append.
|
|
130
|
-
*/
|
|
131
|
-
type StringAppends = Record<string, string>;
|
|
132
125
|
type UpdateOperation = {
|
|
133
126
|
op: "update";
|
|
134
127
|
id: string;
|
|
135
128
|
props: object;
|
|
136
|
-
appends?: StringAppends;
|
|
137
129
|
};
|
|
138
130
|
type UpdateRootOperation = {
|
|
139
131
|
op: "updateRoot";
|
|
140
132
|
props: object;
|
|
141
|
-
appends?: StringAppends;
|
|
142
133
|
};
|
|
143
134
|
type MoveOperation = {
|
|
144
135
|
op: "move";
|
|
@@ -238,7 +229,6 @@ type PuckProviderMetadata = {
|
|
|
238
229
|
|
|
239
230
|
type PuckMessage = UIMessage<PuckProviderMetadata, PuckDataParts>;
|
|
240
231
|
|
|
241
|
-
type Mode = "assembly" | "design";
|
|
242
232
|
type RequestOptions = {
|
|
243
233
|
body?: {
|
|
244
234
|
chatId?: string;
|
|
@@ -246,7 +236,6 @@ type RequestOptions = {
|
|
|
246
236
|
messages?: PuckMessage[];
|
|
247
237
|
pageData?: Data;
|
|
248
238
|
config?: Config;
|
|
249
|
-
mode?: Mode;
|
|
250
239
|
[key: string]: any;
|
|
251
240
|
};
|
|
252
241
|
headers?: HeadersInit;
|
|
@@ -274,10 +263,6 @@ type AiPluginProps = {
|
|
|
274
263
|
};
|
|
275
264
|
scrollTracking?: boolean;
|
|
276
265
|
prepareRequest?: (opts: RequestOptions) => RequestOptions | Promise<RequestOptions>;
|
|
277
|
-
designMode?: boolean | {
|
|
278
|
-
visible?: boolean;
|
|
279
|
-
};
|
|
280
|
-
defaultMode?: "assembly" | "design";
|
|
281
266
|
};
|
|
282
267
|
declare global {
|
|
283
268
|
interface Window {
|
|
@@ -290,7 +275,6 @@ declare global {
|
|
|
290
275
|
}
|
|
291
276
|
}
|
|
292
277
|
|
|
293
|
-
declare function withDynamicConfig(config: Config, data: Data): Config;
|
|
294
278
|
declare function createAiPlugin(opts?: AiPluginProps): {
|
|
295
279
|
label: string;
|
|
296
280
|
name: string;
|
|
@@ -298,13 +282,10 @@ declare function createAiPlugin(opts?: AiPluginProps): {
|
|
|
298
282
|
icon: react_jsx_runtime.JSX.Element;
|
|
299
283
|
mobilePanelHeight: "min-content";
|
|
300
284
|
overrides: {
|
|
301
|
-
drawer: ({ children }: {
|
|
302
|
-
children: react.ReactNode;
|
|
303
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
304
285
|
preview: ({ children }: {
|
|
305
286
|
children: react.ReactNode;
|
|
306
287
|
}) => react_jsx_runtime.JSX.Element;
|
|
307
288
|
};
|
|
308
289
|
};
|
|
309
290
|
|
|
310
|
-
export { type ComponentAiParams, type FieldAiParams, createAiPlugin
|
|
291
|
+
export { type ComponentAiParams, type FieldAiParams, createAiPlugin };
|
package/dist/index.d.ts
CHANGED
|
@@ -122,23 +122,14 @@ type AddOperation = {
|
|
|
122
122
|
type: string;
|
|
123
123
|
props: object;
|
|
124
124
|
};
|
|
125
|
-
/**
|
|
126
|
-
* Streamed string tails keyed by prop path (e.g. `html`, `cta.label`,
|
|
127
|
-
* `items[2].title`). Each tail is appended to the value currently at that
|
|
128
|
-
* path. A top-level prop is carried either in `props` (full replacement) or
|
|
129
|
-
* in `appends` — never both — so applying them can't double-append.
|
|
130
|
-
*/
|
|
131
|
-
type StringAppends = Record<string, string>;
|
|
132
125
|
type UpdateOperation = {
|
|
133
126
|
op: "update";
|
|
134
127
|
id: string;
|
|
135
128
|
props: object;
|
|
136
|
-
appends?: StringAppends;
|
|
137
129
|
};
|
|
138
130
|
type UpdateRootOperation = {
|
|
139
131
|
op: "updateRoot";
|
|
140
132
|
props: object;
|
|
141
|
-
appends?: StringAppends;
|
|
142
133
|
};
|
|
143
134
|
type MoveOperation = {
|
|
144
135
|
op: "move";
|
|
@@ -238,7 +229,6 @@ type PuckProviderMetadata = {
|
|
|
238
229
|
|
|
239
230
|
type PuckMessage = UIMessage<PuckProviderMetadata, PuckDataParts>;
|
|
240
231
|
|
|
241
|
-
type Mode = "assembly" | "design";
|
|
242
232
|
type RequestOptions = {
|
|
243
233
|
body?: {
|
|
244
234
|
chatId?: string;
|
|
@@ -246,7 +236,6 @@ type RequestOptions = {
|
|
|
246
236
|
messages?: PuckMessage[];
|
|
247
237
|
pageData?: Data;
|
|
248
238
|
config?: Config;
|
|
249
|
-
mode?: Mode;
|
|
250
239
|
[key: string]: any;
|
|
251
240
|
};
|
|
252
241
|
headers?: HeadersInit;
|
|
@@ -274,10 +263,6 @@ type AiPluginProps = {
|
|
|
274
263
|
};
|
|
275
264
|
scrollTracking?: boolean;
|
|
276
265
|
prepareRequest?: (opts: RequestOptions) => RequestOptions | Promise<RequestOptions>;
|
|
277
|
-
designMode?: boolean | {
|
|
278
|
-
visible?: boolean;
|
|
279
|
-
};
|
|
280
|
-
defaultMode?: "assembly" | "design";
|
|
281
266
|
};
|
|
282
267
|
declare global {
|
|
283
268
|
interface Window {
|
|
@@ -290,7 +275,6 @@ declare global {
|
|
|
290
275
|
}
|
|
291
276
|
}
|
|
292
277
|
|
|
293
|
-
declare function withDynamicConfig(config: Config, data: Data): Config;
|
|
294
278
|
declare function createAiPlugin(opts?: AiPluginProps): {
|
|
295
279
|
label: string;
|
|
296
280
|
name: string;
|
|
@@ -298,13 +282,10 @@ declare function createAiPlugin(opts?: AiPluginProps): {
|
|
|
298
282
|
icon: react_jsx_runtime.JSX.Element;
|
|
299
283
|
mobilePanelHeight: "min-content";
|
|
300
284
|
overrides: {
|
|
301
|
-
drawer: ({ children }: {
|
|
302
|
-
children: react.ReactNode;
|
|
303
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
304
285
|
preview: ({ children }: {
|
|
305
286
|
children: react.ReactNode;
|
|
306
287
|
}) => react_jsx_runtime.JSX.Element;
|
|
307
288
|
};
|
|
308
289
|
};
|
|
309
290
|
|
|
310
|
-
export { type ComponentAiParams, type FieldAiParams, createAiPlugin
|
|
291
|
+
export { type ComponentAiParams, type FieldAiParams, createAiPlugin };
|