@airtable/blocks 0.0.0-experimental-20e3506bd-20250428 → 0.0.0-experimental-d5ee5e823-20250501
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/cjs/base/models/base.js +1 -1
- package/dist/cjs/base/models/create_aggregators.js +1 -1
- package/dist/cjs/base/models/cursor.js +2 -2
- package/dist/cjs/base/models/field.js +2 -2
- package/dist/cjs/base/models/record_coloring.js +2 -2
- package/dist/cjs/base/models/record_query_result.js +1 -1
- package/dist/cjs/base/models/session.js +4 -4
- package/dist/cjs/base/models/table.js +2 -2
- package/dist/cjs/base/models/view.js +1 -1
- package/dist/cjs/base/perform_record_action.js +1 -1
- package/dist/cjs/base/sdk.js +4 -1
- package/dist/cjs/base/settings_button.js +2 -2
- package/dist/cjs/base/types/view.js +1 -1
- package/dist/cjs/base/ui/base_provider.js +1 -1
- package/dist/cjs/base/ui/expand_record.js +1 -1
- package/dist/cjs/base/ui/expand_record_list.js +1 -1
- package/dist/cjs/base/ui/expand_record_picker_async.js +1 -1
- package/dist/cjs/base/ui/global_alert.js +1 -1
- package/dist/cjs/base/ui/initialize_block.js +18 -5
- package/dist/cjs/base/ui/progress_bar.js +1 -1
- package/dist/cjs/base/ui/ui.js +1 -1
- package/dist/cjs/base/ui/use_base.js +1 -1
- package/dist/cjs/base/ui/use_cursor.js +1 -1
- package/dist/cjs/{shared → base}/ui/use_loadable.js +6 -6
- package/dist/cjs/base/ui/use_record_action_data.js +2 -2
- package/dist/cjs/base/ui/use_records.js +5 -5
- package/dist/cjs/base/ui/use_session.js +1 -1
- package/dist/cjs/base/ui/use_settings_button.js +1 -1
- package/dist/cjs/base/ui/use_view_metadata.js +2 -2
- package/dist/cjs/base/ui/use_viewport.js +1 -1
- package/dist/cjs/base/ui/viewport_constraint.js +2 -2
- package/dist/cjs/base/viewport.js +1 -1
- package/dist/cjs/interface/models/models.js +53 -0
- package/dist/cjs/interface/sdk.js +0 -15
- package/dist/cjs/interface/ui/expand_record.js +2 -1
- package/dist/cjs/interface/ui/initialize_block.js +14 -4
- package/dist/cjs/interface/ui/ui.js +20 -8
- package/dist/cjs/interface/ui/use_custom_properties.js +52 -5
- package/dist/cjs/shared/colors.js +2 -2
- package/dist/cjs/shared/global_config.js +45 -40
- package/dist/cjs/shared/models/base_core.js +34 -11
- package/dist/cjs/shared/models/field_core.js +1 -1
- package/dist/cjs/shared/models/record_core.js +1 -1
- package/dist/cjs/shared/models/session_core.js +1 -1
- package/dist/cjs/shared/models/table_core.js +1 -1
- package/dist/cjs/shared/sdk_core.js +5 -5
- package/dist/cjs/shared/types/field.js +1 -1
- package/dist/cjs/shared/ui/remote_utils.js +3 -3
- package/dist/cjs/shared/ui/use_global_config.js +13 -8
- package/dist/cjs/shared/ui/use_synced.js +1 -1
- package/dist/cjs/shared/ui/use_watchable.js +3 -22
- package/dist/cjs/shared/ui/with_hooks.js +3 -3
- package/dist/types/src/base/models/base.d.ts +1 -1
- package/dist/types/src/base/models/create_aggregators.d.ts +1 -1
- package/dist/types/src/base/models/cursor.d.ts +2 -2
- package/dist/types/src/base/models/field.d.ts +2 -2
- package/dist/types/src/base/models/record_coloring.d.ts +2 -2
- package/dist/types/src/base/models/record_query_result.d.ts +1 -1
- package/dist/types/src/base/models/session.d.ts +4 -4
- package/dist/types/src/base/models/table.d.ts +2 -2
- package/dist/types/src/base/models/view.d.ts +1 -1
- package/dist/types/src/base/perform_record_action.d.ts +1 -1
- package/dist/types/src/base/sdk.d.ts.map +1 -1
- package/dist/types/src/base/settings_button.d.ts +2 -2
- package/dist/types/src/base/types/view.d.ts +1 -1
- package/dist/types/src/base/ui/base_provider.d.ts +1 -1
- package/dist/types/src/base/ui/expand_record.d.ts +1 -1
- package/dist/types/src/base/ui/expand_record_list.d.ts +1 -1
- package/dist/types/src/base/ui/expand_record_picker_async.d.ts +1 -1
- package/dist/types/src/base/ui/global_alert.d.ts +1 -1
- package/dist/types/src/base/ui/initialize_block.d.ts +1 -1
- package/dist/types/src/base/ui/initialize_block.d.ts.map +1 -1
- package/dist/types/src/base/ui/progress_bar.d.ts +1 -1
- package/dist/types/src/base/ui/types/tooltip_anchor_props.d.ts +1 -0
- package/dist/types/src/base/ui/types/tooltip_anchor_props.d.ts.map +1 -1
- package/dist/types/src/base/ui/ui.d.ts +1 -1
- package/dist/types/src/base/ui/ui.d.ts.map +1 -1
- package/dist/types/src/base/ui/use_base.d.ts +1 -1
- package/dist/types/src/base/ui/use_cursor.d.ts +1 -1
- package/dist/types/src/{shared → base}/ui/use_loadable.d.ts +3 -3
- package/dist/types/src/base/ui/use_loadable.d.ts.map +1 -0
- package/dist/types/src/base/ui/use_record_action_data.d.ts +1 -1
- package/dist/types/src/base/ui/use_session.d.ts +1 -1
- package/dist/types/src/base/ui/use_settings_button.d.ts +1 -1
- package/dist/types/src/base/ui/use_viewport.d.ts +1 -1
- package/dist/types/src/base/ui/viewport_constraint.d.ts +2 -2
- package/dist/types/src/base/viewport.d.ts +1 -1
- package/dist/types/src/interface/models/models.d.ts +8 -0
- package/dist/types/src/interface/models/models.d.ts.map +1 -0
- package/dist/types/src/interface/sdk.d.ts.map +1 -1
- package/dist/types/src/interface/ui/expand_record.d.ts +2 -1
- package/dist/types/src/interface/ui/expand_record.d.ts.map +1 -1
- package/dist/types/src/interface/ui/initialize_block.d.ts +30 -0
- package/dist/types/src/interface/ui/initialize_block.d.ts.map +1 -1
- package/dist/types/src/interface/ui/ui.d.ts +1 -1
- package/dist/types/src/interface/ui/ui.d.ts.map +1 -1
- package/dist/types/src/interface/ui/use_custom_properties.d.ts +52 -5
- package/dist/types/src/interface/ui/use_custom_properties.d.ts.map +1 -1
- package/dist/types/src/shared/color_utils.d.ts +3 -3
- package/dist/types/src/shared/colors.d.ts +2 -2
- package/dist/types/src/shared/global_config.d.ts +45 -40
- package/dist/types/src/shared/global_config.d.ts.map +1 -1
- package/dist/types/src/shared/models/base_core.d.ts +34 -11
- package/dist/types/src/shared/models/base_core.d.ts.map +1 -1
- package/dist/types/src/shared/models/field_core.d.ts +1 -1
- package/dist/types/src/shared/models/session_core.d.ts +1 -1
- package/dist/types/src/shared/private_utils.d.ts +1 -1
- package/dist/types/src/shared/private_utils.d.ts.map +1 -1
- package/dist/types/src/shared/sdk_core.d.ts +4 -4
- package/dist/types/src/shared/types/field.d.ts +1 -1
- package/dist/types/src/shared/ui/remote_utils.d.ts +3 -3
- package/dist/types/src/shared/ui/use_global_config.d.ts +13 -8
- package/dist/types/src/shared/ui/use_global_config.d.ts.map +1 -1
- package/dist/types/src/shared/ui/use_synced.d.ts +1 -1
- package/dist/types/src/shared/ui/use_watchable.d.ts +3 -22
- package/dist/types/src/shared/ui/use_watchable.d.ts.map +1 -1
- package/dist/types/src/shared/ui/with_hooks.d.ts +3 -3
- package/dist/types/stories/collaborator_token.stories.d.ts.map +1 -1
- package/package.json +16 -12
- package/dist/types/src/shared/ui/use_loadable.d.ts.map +0 -1
- package/ui.d.ts +0 -1
- package/ui.js +0 -1
- package/unstable_private_utils.d.ts +0 -1
- package/unstable_private_utils.js +0 -1
- package/unstable_standalone_ui.d.ts +0 -1
- package/unstable_standalone_ui.js +0 -1
- package/unstable_testing_utils.d.ts +0 -1
- package/unstable_testing_utils.js +0 -1
|
@@ -21,10 +21,6 @@ type WatchableGlobalConfigKey = string;
|
|
|
21
21
|
* The maximum allowed size for a given GlobalConfig instance is 150kB.
|
|
22
22
|
* The maximum number of keys for a given GlobalConfig instance is 1000.
|
|
23
23
|
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```js
|
|
26
|
-
* import {globalConfig} from '@airtable/blocks';
|
|
27
|
-
* ```
|
|
28
24
|
* @docsPath models/GlobalConfig
|
|
29
25
|
*/
|
|
30
26
|
declare class GlobalConfig extends Watchable<WatchableGlobalConfigKey> {
|
|
@@ -36,10 +32,13 @@ declare class GlobalConfig extends Watchable<WatchableGlobalConfigKey> {
|
|
|
36
32
|
* @param key A string for the top-level key, or an array of strings describing the path to the value.
|
|
37
33
|
* @example
|
|
38
34
|
* ```js
|
|
39
|
-
* import {
|
|
35
|
+
* import {useGlobalConfig} from '@airtable/blocks/[placeholder-path]/ui';
|
|
40
36
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
37
|
+
* function MyApp() {
|
|
38
|
+
* const globalConfig = useGlobalConfig();
|
|
39
|
+
* const topLevelValue = globalConfig.get('topLevelKey');
|
|
40
|
+
* const nestedValue = globalConfig.get(['topLevelKey', 'nested', 'deeply']);
|
|
41
|
+
* }
|
|
43
42
|
* ```
|
|
44
43
|
*/
|
|
45
44
|
get(key: GlobalConfigKey): unknown;
|
|
@@ -115,23 +114,26 @@ declare class GlobalConfig extends Watchable<WatchableGlobalConfigKey> {
|
|
|
115
114
|
* @param value The value to set at the specified path. Use `undefined` to delete the value at the given path.
|
|
116
115
|
* @example
|
|
117
116
|
* ```js
|
|
118
|
-
* import {
|
|
119
|
-
*
|
|
120
|
-
* function
|
|
121
|
-
*
|
|
122
|
-
*
|
|
117
|
+
* import {useGlobalConfig} from '@airtable/blocks/[placeholder-path]/ui';
|
|
118
|
+
*
|
|
119
|
+
* function MyApp() {
|
|
120
|
+
* const globalConfig = useGlobalConfig();
|
|
121
|
+
* const updateFavoriteColorIfPossible = (color) => {
|
|
122
|
+
* if (globalConfig.hasPermissionToSet('favoriteColor', color)) {
|
|
123
|
+
* globalConfig.setAsync('favoriteColor', color);
|
|
124
|
+
* }
|
|
125
|
+
* // The update is now applied within your extension (eg will be
|
|
126
|
+
* // reflected in globalConfig) but are still being saved to
|
|
127
|
+
* // Airtable servers (e.g. may not be updated for other users yet)
|
|
123
128
|
* }
|
|
124
|
-
* // The update is now applied within your extension (eg will be
|
|
125
|
-
* // reflected in globalConfig) but are still being saved to
|
|
126
|
-
* // Airtable servers (e.g. may not be updated for other users yet)
|
|
127
|
-
* }
|
|
128
129
|
*
|
|
129
|
-
* async
|
|
130
|
-
*
|
|
131
|
-
*
|
|
130
|
+
* const updateFavoriteColorIfPossibleAsync = async (color) => {
|
|
131
|
+
* if (globalConfig.hasPermissionToSet('favoriteColor', color)) {
|
|
132
|
+
* await globalConfig.setAsync('favoriteColor', color);
|
|
133
|
+
* }
|
|
134
|
+
* // globalConfig updates have been saved to Airtable servers.
|
|
135
|
+
* alert('favoriteColor has been updated');
|
|
132
136
|
* }
|
|
133
|
-
* // globalConfig updates have been saved to Airtable servers.
|
|
134
|
-
* alert('favoriteColor has been updated');
|
|
135
137
|
* }
|
|
136
138
|
* ```
|
|
137
139
|
*/
|
|
@@ -204,28 +206,31 @@ declare class GlobalConfig extends Watchable<WatchableGlobalConfigKey> {
|
|
|
204
206
|
* @param updates The paths and values to set.
|
|
205
207
|
* @example
|
|
206
208
|
* ```js
|
|
207
|
-
* import {
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* ]
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
209
|
+
* import {useGlobalConfig} from '@airtable/blocks/[placeholder-path]/ui';
|
|
210
|
+
*
|
|
211
|
+
* function MyApp() {
|
|
212
|
+
* const globalConfig = useGlobalConfig();
|
|
213
|
+
* const updates = [
|
|
214
|
+
* {path: ['topLevelKey1', 'nestedKey1'], value: 'foo'},
|
|
215
|
+
* {path: ['topLevelKey2', 'nestedKey2'], value: 'bar'},
|
|
216
|
+
* ];
|
|
217
|
+
*
|
|
218
|
+
* const applyUpdatesIfPossible = () => {
|
|
219
|
+
* if (globalConfig.hasPermissionToSetPaths(updates)) {
|
|
220
|
+
* globalConfig.setPathsAsync(updates);
|
|
221
|
+
* }
|
|
222
|
+
* // The updates are now applied within your extension (eg will be reflected in
|
|
223
|
+
* // globalConfig) but are still being saved to Airtable servers (e.g. they
|
|
224
|
+
* // may not be updated for other users yet)
|
|
217
225
|
* }
|
|
218
|
-
* // The updates are now applied within your extension (eg will be reflected in
|
|
219
|
-
* // globalConfig) but are still being saved to Airtable servers (e.g. they
|
|
220
|
-
* // may not be updated for other users yet)
|
|
221
|
-
* }
|
|
222
226
|
*
|
|
223
|
-
* async
|
|
224
|
-
*
|
|
225
|
-
*
|
|
227
|
+
* const applyUpdatesIfPossibleAsync = async () => {
|
|
228
|
+
* if (globalConfig.hasPermissionToSetPaths(updates)) {
|
|
229
|
+
* await globalConfig.setPathsAsync(updates);
|
|
230
|
+
* }
|
|
231
|
+
* // globalConfig updates have been saved to Airtable servers.
|
|
232
|
+
* alert('globalConfig has been updated');
|
|
226
233
|
* }
|
|
227
|
-
* // globalConfig updates have been saved to Airtable servers.
|
|
228
|
-
* alert('globalConfig has been updated');
|
|
229
234
|
* }
|
|
230
235
|
* ```
|
|
231
236
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global_config.d.ts","sourceRoot":"","sources":["../../../../src/shared/global_config.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,OAAO,EAEH,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EAEjB,kBAAkB,EAClB,yBAAyB,EAE5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,qBAAqB,EAAoB,MAAM,wBAAwB,CAAC;AAKhF;;GAEG;AACH,KAAK,wBAAwB,GAAG,MAAM,CAAC;AASvC
|
|
1
|
+
{"version":3,"file":"global_config.d.ts","sourceRoot":"","sources":["../../../../src/shared/global_config.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,OAAO,EAEH,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EAEjB,kBAAkB,EAClB,yBAAyB,EAE5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,qBAAqB,EAAoB,MAAM,wBAAwB,CAAC;AAKhF;;GAEG;AACH,KAAK,wBAAwB,GAAG,MAAM,CAAC;AASvC;;;;;;;;;;;;;;;;;GAiBG;AACH,cAAM,YAAa,SAAQ,SAAS,CAAC,wBAAwB,CAAC;IA6D1D;;;;;;;;;;;;;;;;OAgBG;IACH,GAAG,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO;IAalC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,sBAAsB,CAClB,GAAG,CAAC,EAAE,sBAAsB,EAC5B,KAAK,CAAC,EAAE,iBAAiB,GAC1B,qBAAqB;IAKxB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,kBAAkB,CAAC,GAAG,CAAC,EAAE,sBAAsB,EAAE,KAAK,CAAC,EAAE,iBAAiB,GAAG,OAAO;IAGpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACG,QAAQ,CAAC,GAAG,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9E;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,2BAA2B,CACvB,OAAO,CAAC,EAAE,aAAa,CAAC,yBAAyB,CAAC,GACnD,qBAAqB;IAQxB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,uBAAuB,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,yBAAyB,CAAC,GAAG,OAAO;IAGpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACG,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAiDzE;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -25,8 +25,12 @@ export declare abstract class BaseCore<SdkModeT extends SdkMode> extends Abstrac
|
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
27
|
* ```js
|
|
28
|
-
* import {
|
|
29
|
-
*
|
|
28
|
+
* import {useBase} from '@airtable/blocks/[placeholder-path]/ui';
|
|
29
|
+
*
|
|
30
|
+
* function MyApp() {
|
|
31
|
+
* const base = useBase();
|
|
32
|
+
* console.log('The name of your base is', base.name);
|
|
33
|
+
* }
|
|
30
34
|
* ```
|
|
31
35
|
*/
|
|
32
36
|
get name(): string;
|
|
@@ -35,8 +39,12 @@ export declare abstract class BaseCore<SdkModeT extends SdkMode> extends Abstrac
|
|
|
35
39
|
*
|
|
36
40
|
* @example
|
|
37
41
|
* ```js
|
|
38
|
-
* import {
|
|
39
|
-
*
|
|
42
|
+
* import {useBase} from '@airtable/blocks/[placeholder-path]/ui';
|
|
43
|
+
*
|
|
44
|
+
* function MyApp() {
|
|
45
|
+
* const base = useBase();
|
|
46
|
+
* console.log('The workspace id of your base is', base.workspaceId);
|
|
47
|
+
* }
|
|
40
48
|
* ```
|
|
41
49
|
*/
|
|
42
50
|
get workspaceId(): string;
|
|
@@ -45,9 +53,16 @@ export declare abstract class BaseCore<SdkModeT extends SdkMode> extends Abstrac
|
|
|
45
53
|
*
|
|
46
54
|
* @example
|
|
47
55
|
* ```js
|
|
48
|
-
* import {
|
|
49
|
-
*
|
|
50
|
-
*
|
|
56
|
+
* import {colorUtils, useBase} from '@airtable/blocks/[placeholder-path]/ui';
|
|
57
|
+
*
|
|
58
|
+
* function MyApp() {
|
|
59
|
+
* const base = useBase();
|
|
60
|
+
* return (
|
|
61
|
+
* <div style={{backgroundColor: colorUtils.getHexForColor(base.color)}}>
|
|
62
|
+
* This div's background is the same color as the base background
|
|
63
|
+
* </div>
|
|
64
|
+
* );
|
|
65
|
+
* }
|
|
51
66
|
* ```
|
|
52
67
|
*/
|
|
53
68
|
get color(): string;
|
|
@@ -56,8 +71,12 @@ export declare abstract class BaseCore<SdkModeT extends SdkMode> extends Abstrac
|
|
|
56
71
|
*
|
|
57
72
|
* @example
|
|
58
73
|
* ```js
|
|
59
|
-
* import {
|
|
60
|
-
*
|
|
74
|
+
* import {useBase} from '@airtable/blocks/[placeholder-path]/ui';
|
|
75
|
+
*
|
|
76
|
+
* function MyApp() {
|
|
77
|
+
* const base = useBase();
|
|
78
|
+
* console.log(`You have ${base.tables.length} tables`);
|
|
79
|
+
* }
|
|
61
80
|
* ```
|
|
62
81
|
*/
|
|
63
82
|
get tables(): Array<SdkModeT['TableT']>;
|
|
@@ -66,8 +85,12 @@ export declare abstract class BaseCore<SdkModeT extends SdkMode> extends Abstrac
|
|
|
66
85
|
*
|
|
67
86
|
* @example
|
|
68
87
|
* ```js
|
|
69
|
-
* import {
|
|
70
|
-
*
|
|
88
|
+
* import {useBase} from '@airtable/blocks/[placeholder-path]/ui';
|
|
89
|
+
*
|
|
90
|
+
* function MyApp() {
|
|
91
|
+
* const base = useBase();
|
|
92
|
+
* console.log(base.activeCollaborators[0].email);
|
|
93
|
+
* }
|
|
71
94
|
* ```
|
|
72
95
|
*/
|
|
73
96
|
get activeCollaborators(): Array<CollaboratorData>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base_core.d.ts","sourceRoot":"","sources":["../../../../../src/shared/models/base_core.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,OAAO,EAAE,MAAM,EAAC,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAoC,YAAY,EAAiB,MAAM,kBAAkB,CAAC;AAEjG,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAgB7C,eAAO,MAAM,iBAAiB;;;;;;EAM5B,CAAC;AAEH;;;;;;GAMG;AACH,KAAK,gBAAgB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAa/D,cAAc;AACd,8BAAsB,QAAQ,CAAC,QAAQ,SAAS,OAAO,CAAE,SAAQ,aAAa,CAC1E,QAAQ,EACR,QAAQ,CAAC,WAAW,CAAC,EACrB,gBAAgB,CACnB;IAwCG
|
|
1
|
+
{"version":3,"file":"base_core.d.ts","sourceRoot":"","sources":["../../../../../src/shared/models/base_core.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,O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,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI;IAUhE;;;;;;OAMG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC;IAOjD;;;;OAIG;IACH,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI;IAQpE;;;;;;OAMG;IACH,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC;IAOrD;;;;;;;;;OASG;IACH,gBAAgB,CAAC,aAAa,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI;IAK5E;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,aAAa,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC;IAY7D;;OAEG;IACH,qBAAqB,IAAI,MAAM;CA4HlC"}
|
|
@@ -50,7 +50,7 @@ export declare abstract class FieldCore<SdkModeT extends SdkMode> extends Abstra
|
|
|
50
50
|
* @see {@link FieldType}
|
|
51
51
|
* @example
|
|
52
52
|
* ```js
|
|
53
|
-
* import {FieldType} from '@airtable/blocks/models';
|
|
53
|
+
* import {FieldType} from '@airtable/blocks/[placeholder-path]/models';
|
|
54
54
|
*
|
|
55
55
|
* if (myField.type === FieldType.CURRENCY) {
|
|
56
56
|
* console.log(myField.options.symbol);
|
|
@@ -27,7 +27,7 @@ export declare abstract class SessionCore<SdkModeT extends SdkMode> extends Abst
|
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* ```js
|
|
30
|
-
* import {useSession} from '@airtable/blocks/ui';
|
|
30
|
+
* import {useSession} from '@airtable/blocks/[placeholder-path]/ui';
|
|
31
31
|
*
|
|
32
32
|
* function CurrentUser() {
|
|
33
33
|
* const session = useSession();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_utils.d.ts","sourceRoot":"","sources":["../../../../src/shared/private_utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"private_utils.d.ts","sourceRoot":"","sources":["../../../../src/shared/private_utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAIjC,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAEvD,cAAc;AACd,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC;AAChC,cAAc;AACd,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC;AAClC,cAAc;AACd,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAExD,cAAc;AACd,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAEtD;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,SAAS,GACjD,CAAC,GACD,CAAC,SAAS,KAAK,KAAK,EAAE,GAAG,KAAK,KAAK,CAAC,SAAS,GAC7C,CAAC,GACD,CAAC,SAAS,KAAK,CAAC,sBAAsB,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GACpD,CAAC,GACD,CAAC,CAAC,SAAS,KAAK,CAAC,qBAAqB,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAA;CAAC,CAAC,GACnD,CAAC,GACD,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,GACrC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAC/B,OAAO,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,GAAG,SAAS,GAC5D,CAAC,GACD,OAAO,CAAC;AAEd;;;;;;;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,7 +5,7 @@ import { BlockInstallationId } from './types/hyper_ids';
|
|
|
5
5
|
* @hidden
|
|
6
6
|
* @example
|
|
7
7
|
* ```js
|
|
8
|
-
* import {runInfo} from '@airtable/blocks';
|
|
8
|
+
* import {runInfo} from '@airtable/blocks/base';
|
|
9
9
|
* if (runInfo.isFirstRun) {
|
|
10
10
|
* // The current user just installed this block.
|
|
11
11
|
* // Take the opportunity to show any onboarding and set
|
|
@@ -40,7 +40,7 @@ export declare abstract class BlockSdkCore<SdkModeT extends SdkMode> {
|
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
42
|
* ```js
|
|
43
|
-
* import {installationId} from '@airtable/blocks';
|
|
43
|
+
* import {installationId} from '@airtable/blocks/base';
|
|
44
44
|
* console.log(installationId);
|
|
45
45
|
* // => 'blifDutUr92OKwnUn'
|
|
46
46
|
* ```
|
|
@@ -56,8 +56,8 @@ export declare abstract class BlockSdkCore<SdkModeT extends SdkMode> {
|
|
|
56
56
|
* @example
|
|
57
57
|
* ```js
|
|
58
58
|
* import React from 'react';
|
|
59
|
-
* import {reload} from '@airtable/blocks';
|
|
60
|
-
* import {Button, initializeBlock} from '@airtable/blocks/ui';
|
|
59
|
+
* import {reload} from '@airtable/blocks/base';
|
|
60
|
+
* import {Button, initializeBlock} from '@airtable/blocks/base/ui';
|
|
61
61
|
* function MyBlock() {
|
|
62
62
|
* return <Button onClick={() => reload()}>Reload</Button>;
|
|
63
63
|
* }
|
|
@@ -8,7 +8,7 @@ export type PrivateColumnType = string;
|
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```js
|
|
11
|
-
* import {FieldType} from '@airtable/blocks/models';
|
|
11
|
+
* import {FieldType} from '@airtable/blocks/[placeholder-path]/models';
|
|
12
12
|
* const numberFields = myTable.fields.filter(field => (
|
|
13
13
|
* field.type === FieldType.NUMBER
|
|
14
14
|
* ));
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @param css The CSS string.
|
|
5
5
|
* @example
|
|
6
6
|
* ```js
|
|
7
|
-
* import {loadCSSFromString} from '@airtable/blocks/ui';
|
|
7
|
+
* import {loadCSSFromString} from '@airtable/blocks/[placeholder-path]/ui';
|
|
8
8
|
* loadCSSFromString('body { background: red; }');
|
|
9
9
|
* ```
|
|
10
10
|
* @docsPath UI/utils/loadCSSFromString
|
|
@@ -18,7 +18,7 @@ export declare function loadCSSFromString(css: string): HTMLStyleElement;
|
|
|
18
18
|
* @param url The URL of the stylesheet.
|
|
19
19
|
* @example
|
|
20
20
|
* ```js
|
|
21
|
-
* import {loadCSSFromURLAsync} from '@airtable/blocks/ui';
|
|
21
|
+
* import {loadCSSFromURLAsync} from '@airtable/blocks/[placeholder-path]/ui';
|
|
22
22
|
* loadCSSFromURLAsync('https://example.com/style.css');
|
|
23
23
|
* ```
|
|
24
24
|
* @docsPath UI/utils/loadCSSFromURLAsync
|
|
@@ -32,7 +32,7 @@ export declare function loadCSSFromURLAsync(url: string): Promise<HTMLLinkElemen
|
|
|
32
32
|
* @param url The URL of the script.
|
|
33
33
|
* @example
|
|
34
34
|
* ```js
|
|
35
|
-
* import {loadScriptFromURLAsync} from '@airtable/blocks/ui';
|
|
35
|
+
* import {loadScriptFromURLAsync} from '@airtable/blocks/[placeholder-path]/ui';
|
|
36
36
|
* loadScriptFromURLAsync('https://example.com/script.js');
|
|
37
37
|
* ```
|
|
38
38
|
* @docsPath UI/utils/loadScriptFromURLAsync
|
|
@@ -6,9 +6,10 @@ import GlobalConfig from '../global_config';
|
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```js
|
|
9
|
-
* import {
|
|
9
|
+
* import {useGlobalConfig, useRunInfo} from '@airtable/blocks/[placeholder-path]/ui';
|
|
10
10
|
*
|
|
11
11
|
* function SyncedCounter() {
|
|
12
|
+
* const runInfo = useRunInfo();
|
|
12
13
|
* const globalConfig = useGlobalConfig();
|
|
13
14
|
* const count = globalConfig.get('count');
|
|
14
15
|
*
|
|
@@ -16,13 +17,17 @@ import GlobalConfig from '../global_config';
|
|
|
16
17
|
* const decrement = () => globalConfig.setAsync('count', count - 1);
|
|
17
18
|
* const isEnabled = globalConfig.hasPermissionToSet('count');
|
|
18
19
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* <
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
20
|
+
* if (runInfo.isPageElementInEditMode) {
|
|
21
|
+
* return (
|
|
22
|
+
* <div>
|
|
23
|
+
* <button onClick={decrement} disabled={!isEnabled} ariaLabel="decrease">-</button>
|
|
24
|
+
* {count}
|
|
25
|
+
* <button onClick={increment} disabled={!isEnabled} ariaLabel="increase">+</button>
|
|
26
|
+
* </div>
|
|
27
|
+
* );
|
|
28
|
+
* } else {
|
|
29
|
+
* return <div>{count}</div>;
|
|
30
|
+
* }
|
|
26
31
|
* }
|
|
27
32
|
* ```
|
|
28
33
|
* @docsPath UI/hooks/useGlobalConfig
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_global_config.d.ts","sourceRoot":"","sources":["../../../../../src/shared/ui/use_global_config.ts"],"names":[],"mappings":"AAAA,mDAAmD,CAAC,MAAM;AAC1D,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAI5C
|
|
1
|
+
{"version":3,"file":"use_global_config.d.ts","sourceRoot":"","sources":["../../../../../src/shared/ui/use_global_config.ts"],"names":[],"mappings":"AAAA,mDAAmD,CAAC,MAAM;AAC1D,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,IAAI,YAAY,CAKtD"}
|
|
@@ -6,7 +6,7 @@ import { GlobalConfigKey, GlobalConfigValue } from '../types/global_config';
|
|
|
6
6
|
* @param globalConfigKey
|
|
7
7
|
* @example
|
|
8
8
|
* ```js
|
|
9
|
-
* import {useBase, useSynced} from '@airtable/blocks/ui';
|
|
9
|
+
* import {useBase, useSynced} from '@airtable/blocks/[placeholder-path]/ui';
|
|
10
10
|
*
|
|
11
11
|
* function CustomInputSynced() {
|
|
12
12
|
* const [value, setValue, canSetValue] = useSynced('myGlobalConfigKey');
|
|
@@ -21,39 +21,20 @@ import Watchable from '../watchable';
|
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```js
|
|
24
|
-
* import {useWatchable} from '@airtable/blocks/ui';
|
|
24
|
+
* import {useWatchable} from '@airtable/blocks/[placeholder-path]/ui';
|
|
25
25
|
*
|
|
26
26
|
* function TableName({table}) {
|
|
27
27
|
* useWatchable(table, 'name');
|
|
28
28
|
* return <span>The table name is {table.name}</span>;
|
|
29
29
|
* }
|
|
30
30
|
*
|
|
31
|
-
* function
|
|
32
|
-
* useWatchable(
|
|
33
|
-
* return <span>The view name is {view.name} and the type is {view.type}</span>;
|
|
34
|
-
* }
|
|
35
|
-
*
|
|
36
|
-
* function RecordValuesAndColorInViewIfExists({record, field, view}) {
|
|
37
|
-
* useWatchable(record, ['cellValues', view ? `colorInView:${view.id}` : null]);
|
|
31
|
+
* function RecordValues({record, field}) {
|
|
32
|
+
* useWatchable(record, ['cellValues']);
|
|
38
33
|
* return <span>
|
|
39
34
|
* The record has cell value {record.getCellValue(field)} in {field.name}.
|
|
40
|
-
* {view ? `The record has color ${record.getColorInView(view)} in ${view.name}.` : null}
|
|
41
35
|
* </span>
|
|
42
36
|
* }
|
|
43
37
|
* ```
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```js
|
|
47
|
-
* import {useWatchable} from '@airtable/blocks/ui';
|
|
48
|
-
*
|
|
49
|
-
* function ActiveView({cursor}) {
|
|
50
|
-
* useWatchable(cursor, 'activeViewId', () => {
|
|
51
|
-
* alert('active view changed!!!')
|
|
52
|
-
* });
|
|
53
|
-
*
|
|
54
|
-
* return <span>Active view id: {cursor.activeViewId}</span>;
|
|
55
|
-
* }
|
|
56
|
-
* ```
|
|
57
38
|
* @docsPath UI/hooks/useWatchable
|
|
58
39
|
* @hook
|
|
59
40
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_watchable.d.ts","sourceRoot":"","sources":["../../../../../src/shared/ui/use_watchable.ts"],"names":[],"mappings":"AAKA,OAAO,SAAS,MAAM,cAAc,CAAC;AAGrC
|
|
1
|
+
{"version":3,"file":"use_watchable.d.ts","sourceRoot":"","sources":["../../../../../src/shared/ui/use_watchable.ts"],"names":[],"mappings":"AAKA,OAAO,SAAS,MAAM,cAAc,CAAC;AAGrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,IAAI,SAAS,MAAM,EACpD,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,IAAI,GAAG,SAAS,EAC9F,IAAI,EAAE,IAAI,GAAG,aAAa,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,EAC9C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,OAAO,QA8EpF"}
|
|
@@ -15,7 +15,7 @@ import * as React from 'react';
|
|
|
15
15
|
* @example
|
|
16
16
|
* ```js
|
|
17
17
|
* import React from 'react';
|
|
18
|
-
* import {useRecords, withHooks} from '@airtable/blocks/ui';
|
|
18
|
+
* import {useRecords, withHooks} from '@airtable/blocks/base/ui';
|
|
19
19
|
*
|
|
20
20
|
* // RecordList takes a list of records and renders it
|
|
21
21
|
* class RecordList extends React.Component {
|
|
@@ -51,8 +51,8 @@ import * as React from 'react';
|
|
|
51
51
|
* @example
|
|
52
52
|
* ```js
|
|
53
53
|
* import React from 'react';
|
|
54
|
-
* import {Record, Table} from '@airtable/blocks/models';
|
|
55
|
-
* import {withHooks, useRecords} from '@airtable/blocks/ui';
|
|
54
|
+
* import {Record, Table} from '@airtable/blocks/[placeholder-path]/models';
|
|
55
|
+
* import {withHooks, useRecords} from '@airtable/blocks/[placeholder-path]/ui';
|
|
56
56
|
* // with typescript, things are a little more complex: we need to provide some type annotations to
|
|
57
57
|
* // indicate which props are injected:
|
|
58
58
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collaborator_token.stories.d.ts","sourceRoot":"","sources":["../../../stories/collaborator_token.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"collaborator_token.stories.d.ts","sourceRoot":"","sources":["../../../stories/collaborator_token.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;oBAqD0X,CAAC;;;;AA9CrZ,wBAEE;AAyCF,eAAO,MAAM,QAAQ;;CAEpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airtable/blocks",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-d5ee5e823-20250501",
|
|
4
4
|
"description": "Airtable Blocks SDK",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
"types": "./dist/types/src/shared/unstable_private_utils.d.ts",
|
|
13
13
|
"default": "./dist/cjs/shared/unstable_private_utils.js"
|
|
14
14
|
},
|
|
15
|
-
"./unstable_standalone_ui": {
|
|
16
|
-
"types": "./dist/types/src/base/ui/unstable_standalone_ui.d.ts",
|
|
17
|
-
"default": "./dist/cjs/base/ui/unstable_standalone_ui.js"
|
|
18
|
-
},
|
|
19
15
|
"./unstable_testing_utils": {
|
|
20
16
|
"types": "./dist/types/src/base/unstable_testing_utils.d.ts",
|
|
21
17
|
"default": "./dist/cjs/base/unstable_testing_utils.js"
|
|
22
18
|
},
|
|
23
|
-
"./
|
|
19
|
+
"./base/unstable_standalone_ui": {
|
|
20
|
+
"types": "./dist/types/src/base/ui/unstable_standalone_ui.d.ts",
|
|
21
|
+
"default": "./dist/cjs/base/ui/unstable_standalone_ui.js"
|
|
22
|
+
},
|
|
23
|
+
"./base/types": {
|
|
24
24
|
"types": "./types.d.ts",
|
|
25
25
|
"default": "./types.js"
|
|
26
26
|
},
|
|
@@ -36,6 +36,10 @@
|
|
|
36
36
|
"types": "./dist/types/src/base/index.d.ts",
|
|
37
37
|
"default": "./dist/cjs/base/index.js"
|
|
38
38
|
},
|
|
39
|
+
"./interface/models": {
|
|
40
|
+
"types": "./dist/types/src/interface/models/models.d.ts",
|
|
41
|
+
"default": "./dist/cjs/interface/models/models.js"
|
|
42
|
+
},
|
|
39
43
|
"./interface/ui": {
|
|
40
44
|
"types": "./dist/types/src/interface/ui/ui.d.ts",
|
|
41
45
|
"default": "./dist/cjs/interface/ui/ui.js"
|
|
@@ -112,9 +116,12 @@
|
|
|
112
116
|
"@types/lodash.capitalize": "^4.2.9",
|
|
113
117
|
"@types/lodash.clamp": "^4.0.9",
|
|
114
118
|
"@types/prettier": "^1.19.0",
|
|
115
|
-
"@types/
|
|
119
|
+
"@types/prop-types": "^15.7.12",
|
|
120
|
+
"@types/react": "^19.1.2",
|
|
121
|
+
"@types/react-dom": "^19.1.2",
|
|
116
122
|
"@types/react-window": "^1.8.8",
|
|
117
123
|
"@types/styled-system": "^5.1.4",
|
|
124
|
+
"@types/styled-system__core": "^5.1.6",
|
|
118
125
|
"@typescript-eslint/eslint-plugin": "^7.13.0",
|
|
119
126
|
"@typescript-eslint/parser": "^7.13.0",
|
|
120
127
|
"babel-eslint": "^11.0.0-beta.0",
|
|
@@ -141,9 +148,6 @@
|
|
|
141
148
|
"dependencies": {
|
|
142
149
|
"@babel/runtime": "^7.7.6",
|
|
143
150
|
"@styled-system/core": "^5.1.2",
|
|
144
|
-
"@types/prop-types": "^15.7.12",
|
|
145
|
-
"@types/react": "^16.14.60",
|
|
146
|
-
"@types/styled-system__core": "^5.1.6",
|
|
147
151
|
"core-js": "^3.4.8",
|
|
148
152
|
"emotion": "^10.0.23",
|
|
149
153
|
"fast-deep-equal": "^3.1.1",
|
|
@@ -153,8 +157,8 @@
|
|
|
153
157
|
"use-subscription": "^1.3.0"
|
|
154
158
|
},
|
|
155
159
|
"peerDependencies": {
|
|
156
|
-
"react": "^16.14.0 || ^17.0.0",
|
|
157
|
-
"react-dom": "^16.9.24 || ^17.0.0"
|
|
160
|
+
"react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
161
|
+
"react-dom": "^16.9.24 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
158
162
|
},
|
|
159
163
|
"jest": {
|
|
160
164
|
"setupFiles": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use_loadable.d.ts","sourceRoot":"","sources":["../../../../../src/shared/ui/use_loadable.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,UAAU,aAAa;IACnB,cAAc;IACd,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,cAAc;IACd,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,cAAc;IACd,UAAU,IAAI,IAAI,CAAC;IACnB,cAAc;IACd,KAAK,CAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5E,cAAc;IACd,OAAO,CAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;CACjF;AAID;;GAEG;AACH,UAAU,eAAe;IACrB,gKAAgK;IAChK,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAC/B,MAAM,EAAE,aAAa,CAAC,aAAa,GAAG,IAAI,CAAC,GAAG,aAAa,GAAG,IAAI,EAClE,IAAI,GAAE,eAAuC,QAiFhD"}
|
package/ui.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist/types/src/base/ui/ui';
|
package/ui.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./dist/cjs/base/ui/ui');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist/types/src/shared/unstable_private_utils';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./dist/cjs/shared/unstable_private_utils');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist/types/src/base/ui/unstable_standalone_ui';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./dist/cjs/base/ui/unstable_standalone_ui');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dist/types/src/base/unstable_testing_utils';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./dist/cjs/base/unstable_testing_utils');
|