@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
|
@@ -54,8 +54,8 @@ export declare const serialize: (mode: RecordColorMode) => string;
|
|
|
54
54
|
* @alias recordColoring.modes
|
|
55
55
|
* @example
|
|
56
56
|
* ```js
|
|
57
|
-
* import {recordColoring} from '@airtable/blocks/models';
|
|
58
|
-
* import {useRecords} from '@airtable/blocks/ui';
|
|
57
|
+
* import {recordColoring} from '@airtable/blocks/base/models';
|
|
58
|
+
* import {useRecords} from '@airtable/blocks/base/ui';
|
|
59
59
|
*
|
|
60
60
|
* // no record coloring:
|
|
61
61
|
* const recordColorMode = recordColoring.modes.none();
|
|
@@ -108,7 +108,7 @@ export interface ViewMetadataForUpdate {
|
|
|
108
108
|
* supported record color modes: none, by a view, and by a select field.
|
|
109
109
|
*
|
|
110
110
|
* ```js
|
|
111
|
-
* import {recordColoring} from '@airtable/blocks/models';
|
|
111
|
+
* import {recordColoring} from '@airtable/blocks/base/models';
|
|
112
112
|
* // No record coloring:
|
|
113
113
|
* const opts = {
|
|
114
114
|
* recordColorMode: recordColoring.modes.none(),
|
|
@@ -6,7 +6,7 @@ import { PermissionCheckResult } from '../../shared/types/mutations_core';
|
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```js
|
|
9
|
-
* import {useSession} from '@airtable/blocks/ui';
|
|
9
|
+
* import {useSession} from '@airtable/blocks/base/ui';
|
|
10
10
|
*
|
|
11
11
|
* function Username() {
|
|
12
12
|
* const session = useSession();
|
|
@@ -31,7 +31,7 @@ declare class Session extends SessionCore<BaseSdkMode> {
|
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
33
|
* ```js
|
|
34
|
-
* import {useSession} from '@airtable/blocks/ui';
|
|
34
|
+
* import {useSession} from '@airtable/blocks/base/ui';
|
|
35
35
|
*
|
|
36
36
|
* function UpdateButton({onClick}) {
|
|
37
37
|
* const session = useSession();
|
|
@@ -64,7 +64,7 @@ declare class Session extends SessionCore<BaseSdkMode> {
|
|
|
64
64
|
*
|
|
65
65
|
* @example
|
|
66
66
|
* ```js
|
|
67
|
-
* import {useSession} from '@airtable/blocks/ui';
|
|
67
|
+
* import {useSession} from '@airtable/blocks/base/ui';
|
|
68
68
|
*
|
|
69
69
|
* function CreateButton({onClick}) {
|
|
70
70
|
* const session = useSession();
|
|
@@ -97,7 +97,7 @@ declare class Session extends SessionCore<BaseSdkMode> {
|
|
|
97
97
|
*
|
|
98
98
|
* @example
|
|
99
99
|
* ```js
|
|
100
|
-
* import {useSession} from '@airtable/blocks/ui';
|
|
100
|
+
* import {useSession} from '@airtable/blocks/base/ui';
|
|
101
101
|
*
|
|
102
102
|
* function DeleteButton({onClick}) {
|
|
103
103
|
* const session = useSession();
|
|
@@ -146,7 +146,7 @@ declare class Table extends TableCore<BaseSdkMode, WatchableTableKey> {
|
|
|
146
146
|
* @param opts Options for the query, such as sorts and fields.
|
|
147
147
|
* @example
|
|
148
148
|
* ```js
|
|
149
|
-
* import {useBase, useRecords} from '@airtable/blocks/ui';
|
|
149
|
+
* import {useBase, useRecords} from '@airtable/blocks/base/ui';
|
|
150
150
|
* import React from 'react';
|
|
151
151
|
*
|
|
152
152
|
* function TodoList() {
|
|
@@ -200,7 +200,7 @@ declare class Table extends TableCore<BaseSdkMode, WatchableTableKey> {
|
|
|
200
200
|
* correct type, that view will be returned before checking the other views in the table.
|
|
201
201
|
* @example
|
|
202
202
|
* ```js
|
|
203
|
-
* import {ViewType} from '@airtable/blocks/models';
|
|
203
|
+
* import {ViewType} from '@airtable/blocks/base/models';
|
|
204
204
|
* const firstCalendarView = myTable.getFirstViewOfType(ViewType.CALENDAR);
|
|
205
205
|
* if (firstCalendarView !== null) {
|
|
206
206
|
* console.log(firstCalendarView.name);
|
|
@@ -73,7 +73,7 @@ declare class View extends AbstractModel<BaseSdkMode, ViewData, WatchableViewKey
|
|
|
73
73
|
* default, records will be coloured according to the view.
|
|
74
74
|
* @example
|
|
75
75
|
* ```js
|
|
76
|
-
* import {useBase, useRecords} from '@airtable/blocks/
|
|
76
|
+
* import {useBase, useRecords} from '@airtable/blocks/base/ui';
|
|
77
77
|
* import React from 'react';
|
|
78
78
|
*
|
|
79
79
|
* function TodoList() {
|
|
@@ -36,7 +36,7 @@ type UnsubscribeFunction = () => void;
|
|
|
36
36
|
* @example
|
|
37
37
|
* ```js
|
|
38
38
|
* import React, {useEffect, useState} from 'react';
|
|
39
|
-
* import {registerRecordActionDataCallback} from '@airtable/blocks/ui';
|
|
39
|
+
* import {registerRecordActionDataCallback} from '@airtable/blocks/base/ui';
|
|
40
40
|
*
|
|
41
41
|
* function LatestRecordAction() {
|
|
42
42
|
* const [recordActionData, setRecordActionData] = useState(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../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Aa,SAAQ,YAAY,CAAC,WAAW,CAAC;IAC/D;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IAEnB,qFAAqF;IACrF,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,cAAc,EAAE,cAAc,CAAC;IAE/B,cAAc;IACd,QAAQ,EAAE,QAAQ,CAAC;IAuBnB,cAAc;gBACF,iBAAiB,EAAE,iBAAiB;IAsGhD,cAAc;IACR,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAI1E,cAAc;IACd,kBAAkB,IAAI,eAAe;CAGxC"}
|
|
@@ -21,8 +21,8 @@ type WatchableSettingsButtonKey = ObjectValues<typeof WatchableSettingsButtonKey
|
|
|
21
21
|
* @alias settingsButton
|
|
22
22
|
* @example
|
|
23
23
|
* ```js
|
|
24
|
-
* import {settingsButton} from '@airtable/blocks';
|
|
25
|
-
* import {useWatchable} from '@airtable/blocks/ui';
|
|
24
|
+
* import {settingsButton} from '@airtable/blocks/base';
|
|
25
|
+
* import {useWatchable} from '@airtable/blocks/base/ui';
|
|
26
26
|
*
|
|
27
27
|
* function AppWithSettings({shouldShowSettingsButton}) {
|
|
28
28
|
* useEffect(() => {
|
|
@@ -7,7 +7,7 @@ import { FieldId, RecordId, ViewId } from '../../shared/types/hyper_ids';
|
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```js
|
|
10
|
-
* import {ViewType} from '@airtable/blocks/models';
|
|
10
|
+
* import {ViewType} from '@airtable/blocks/base/models';
|
|
11
11
|
* const gridViews = myTable.views.filter(view => (
|
|
12
12
|
* view.type === ViewType.GRID
|
|
13
13
|
* ));
|
|
@@ -19,7 +19,7 @@ interface BaseProviderProps {
|
|
|
19
19
|
* ```js
|
|
20
20
|
* import React from 'react';
|
|
21
21
|
* import ReactDOM from 'react-dom';
|
|
22
|
-
* import {BaseProvider} from '@airtable/blocks/ui';
|
|
22
|
+
* import {BaseProvider} from '@airtable/blocks/base/ui';
|
|
23
23
|
*
|
|
24
24
|
* function getHtmlStringForRecordCard(base, record) {
|
|
25
25
|
* return ReactDOM.renderToStaticMarkup(
|
|
@@ -15,7 +15,7 @@ export interface ExpandRecordOpts {
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```js
|
|
18
|
-
* import {expandRecord} from '@airtable/blocks/ui';
|
|
18
|
+
* import {expandRecord} from '@airtable/blocks/base/ui';
|
|
19
19
|
* expandRecord(record1, {
|
|
20
20
|
* records: [record1, record2, record3],
|
|
21
21
|
* });
|
|
@@ -15,7 +15,7 @@ interface ExpandRecordListOpts {
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```js
|
|
18
|
-
* import {expandRecordList} from '@airtable/blocks/ui';
|
|
18
|
+
* import {expandRecordList} from '@airtable/blocks/base/ui';
|
|
19
19
|
* expandRecordList([record1, record2, record3]);
|
|
20
20
|
*
|
|
21
21
|
* expandRecordList([record1, record2], {
|
|
@@ -23,7 +23,7 @@ interface ExpandRecordPickerOpts {
|
|
|
23
23
|
* @param opts An optional options object.
|
|
24
24
|
* @example
|
|
25
25
|
* ```js
|
|
26
|
-
* import {expandRecordPickerAsync} from '@airtable/blocks/ui';
|
|
26
|
+
* import {expandRecordPickerAsync} from '@airtable/blocks/base/ui';
|
|
27
27
|
*
|
|
28
28
|
* async function pickRecordsAsync() {
|
|
29
29
|
* const recordA = await expandRecordPickerAsync([record1, record2, record3]);
|
|
@@ -9,7 +9,7 @@ type WatchableGlobalAlertKey = ObjectValues<typeof WatchableGlobalAlertKeys>;
|
|
|
9
9
|
* @hidden
|
|
10
10
|
* @example
|
|
11
11
|
* ```js
|
|
12
|
-
* import {globalAlert} from '@airtable/blocks/ui';
|
|
12
|
+
* import {globalAlert} from '@airtable/blocks/base/ui';
|
|
13
13
|
* globalAlert.showReloadPrompt();
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
@@ -24,7 +24,7 @@ type DashboardOrEntryPoints = DashboardEntryElementFunction | EntryPoints;
|
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* ```js
|
|
27
|
-
* import {initializeBlock} from '@airtable/blocks/ui';
|
|
27
|
+
* import {initializeBlock} from '@airtable/blocks/base/ui';
|
|
28
28
|
* import React from 'react';
|
|
29
29
|
*
|
|
30
30
|
* function App() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialize_block.d.ts","sourceRoot":"","sources":["../../../../../src/base/ui/initialize_block.tsx"],"names":[],"mappings":"AAAA,mDAAmD,CAAC,MAAM;AAC1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,GAAG,MAAM,QAAQ,CAAC;AAGzB,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAKlC,MAAM;AACN,KAAK,6BAA6B,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC;AAC3D,cAAc;AACd,KAAK,wBAAwB,GAAG,CAAC,EAAC,KAAK,EAAE,IAAI,EAAC,EAAE;IAAC,KAAK,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;AAC/F,cAAc;AACd,UAAU,WAAW;IACjB,SAAS,CAAC,EAAE,6BAA6B,CAAC;IAC1C,IAAI,CAAC,EAAE,wBAAwB,CAAC;CACnC;AAED,cAAc;AACd,KAAK,sBAAsB,GAAG,6BAA6B,GAAG,WAAW,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,eAAe,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"initialize_block.d.ts","sourceRoot":"","sources":["../../../../../src/base/ui/initialize_block.tsx"],"names":[],"mappings":"AAAA,mDAAmD,CAAC,MAAM;AAC1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,GAAG,MAAM,QAAQ,CAAC;AAGzB,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAKlC,MAAM;AACN,KAAK,6BAA6B,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC;AAC3D,cAAc;AACd,KAAK,wBAAwB,GAAG,CAAC,EAAC,KAAK,EAAE,IAAI,EAAC,EAAE;IAAC,KAAK,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;AAC/F,cAAc;AACd,UAAU,WAAW;IACjB,SAAS,CAAC,EAAE,6BAA6B,CAAC;IAC1C,IAAI,CAAC,EAAE,wBAAwB,CAAC;CACnC;AAED,cAAc;AACd,KAAK,sBAAsB,GAAG,6BAA6B,GAAG,WAAW,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,eAAe,EAAE,sBAAsB,QA8EtE;AAMD,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,GAAG,QAEvD;AAGD,wBAAgB,yBAAyB,SAExC"}
|
|
@@ -46,7 +46,7 @@ export interface ProgressBarProps extends ProgressBarStyleProps, TooltipAnchorPr
|
|
|
46
46
|
*
|
|
47
47
|
* @example
|
|
48
48
|
* ```js
|
|
49
|
-
* import {ProgressBar} from '@airtable/blocks/ui';
|
|
49
|
+
* import {ProgressBar} from '@airtable/blocks/base/ui';
|
|
50
50
|
*
|
|
51
51
|
* function MyComponent() {
|
|
52
52
|
* return (
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip_anchor_props.d.ts","sourceRoot":"","sources":["../../../../../../src/base/ui/types/tooltip_anchor_props.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,cAAc;AACd,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,WAAW;IAC/C,cAAc;IACd,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;IACnD,cAAc;IACd,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;IAKnD,cAAc;IACd,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;IAC9C,cAAc;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,sBAAsB;;;;;CAKlC,CAAC"}
|
|
1
|
+
{"version":3,"file":"tooltip_anchor_props.d.ts","sourceRoot":"","sources":["../../../../../../src/base/ui/types/tooltip_anchor_props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,cAAc;AACd,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,WAAW;IAC/C,cAAc;IACd,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;IACnD,cAAc;IACd,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;IAKnD,cAAc;IACd,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;IAC9C,cAAc;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,sBAAsB;;;;;CAKlC,CAAC"}
|
|
@@ -28,7 +28,7 @@ export { default as SwitchSynced } from './switch_synced';
|
|
|
28
28
|
export { default as ViewportConstraint } from './viewport_constraint';
|
|
29
29
|
export { initializeBlock } from './initialize_block';
|
|
30
30
|
export { default as withHooks } from '../../shared/ui/with_hooks';
|
|
31
|
-
export { default as useLoadable } from '
|
|
31
|
+
export { default as useLoadable } from './use_loadable';
|
|
32
32
|
export { useRecordIds, useRecords, useRecordById, useRecordQueryResult } from './use_records';
|
|
33
33
|
export { default as useBase } from './use_base';
|
|
34
34
|
export { default as useCursor } from './use_cursor';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../../../src/base/ui/ui.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAMzC,OAAO,IAAI,CAAC;AAEZ,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAC,OAAO,IA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Cursor} from '@airtable/blocks/ui';
|
|
16
|
+
* import {useBase, useCursor} from '@airtable/blocks/base/ui';
|
|
17
17
|
*
|
|
18
18
|
* // renders a list of tables and automatically updates
|
|
19
19
|
* function TableList() {
|
|
@@ -48,7 +48,7 @@ interface UseLoadableOpts {
|
|
|
48
48
|
*
|
|
49
49
|
* @example
|
|
50
50
|
* ```js
|
|
51
|
-
* import {useCursor, useLoadable, useWatchable} from '@airtable/blocks/ui';
|
|
51
|
+
* import {useCursor, useLoadable, useWatchable} from '@airtable/blocks/base/ui';
|
|
52
52
|
*
|
|
53
53
|
* function SelectedRecordIds() {
|
|
54
54
|
* const cursor = useCursor();
|
|
@@ -65,7 +65,7 @@ interface UseLoadableOpts {
|
|
|
65
65
|
*
|
|
66
66
|
* @example
|
|
67
67
|
* ```js
|
|
68
|
-
* import {useLoadable} from '@airtable/blocks/ui';
|
|
68
|
+
* import {useLoadable} from '@airtable/blocks/base/ui';
|
|
69
69
|
*
|
|
70
70
|
* function LoadTwoQueryResults({queryResultA, queryResultB}) {
|
|
71
71
|
* // load the queryResults:
|
|
@@ -78,7 +78,7 @@ interface UseLoadableOpts {
|
|
|
78
78
|
*
|
|
79
79
|
* @example
|
|
80
80
|
* ```js
|
|
81
|
-
* import {useLoadable, useBase} from '@airtable/blocks/ui';
|
|
81
|
+
* import {useLoadable, useBase} from '@airtable/blocks/base/ui';
|
|
82
82
|
*
|
|
83
83
|
* function LoadAllRecords() {
|
|
84
84
|
* const base = useBase();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_loadable.d.ts","sourceRoot":"","sources":["../../../../../src/base/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"}
|
|
@@ -28,7 +28,7 @@ import { RecordActionData } from '../types/record_action_data';
|
|
|
28
28
|
* @example
|
|
29
29
|
* ```js
|
|
30
30
|
* import React from 'react';
|
|
31
|
-
* import {useRecordActionData} from '@airtable/blocks/ui';
|
|
31
|
+
* import {useRecordActionData} from '@airtable/blocks/base/ui';
|
|
32
32
|
*
|
|
33
33
|
* function LatestRecordAction() {
|
|
34
34
|
* const recordActionData = useRecordActionData();
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* ```js
|
|
12
|
-
* import {CollaboratorToken, useSession} from '@airtable/blocks/ui';
|
|
12
|
+
* import {CollaboratorToken, useSession} from '@airtable/blocks/base/ui';
|
|
13
13
|
*
|
|
14
14
|
* // Says hello to the current user and updates in realtime if the current user's
|
|
15
15
|
* // name or profile pic changes.
|
|
@@ -8,7 +8,7 @@ import { FlowAnyFunction } from '../../shared/private_utils';
|
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```js
|
|
11
|
-
* import {useSettingsButton} from '@airtable/blocks/ui';
|
|
11
|
+
* import {useSettingsButton} from '@airtable/blocks/base/ui';
|
|
12
12
|
* import {useState} from 'react';
|
|
13
13
|
*
|
|
14
14
|
* function ComponentWithSettings() {
|
|
@@ -27,13 +27,13 @@ interface ViewportConstraintProps {
|
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* ```js
|
|
30
|
-
* import {ViewportConstraint} from '@airtable/blocks/ui';
|
|
30
|
+
* import {ViewportConstraint} from '@airtable/blocks/base/ui';
|
|
31
31
|
* <ViewportConstraint minSize={{width: 400}} />
|
|
32
32
|
* ```
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
35
|
* ```js
|
|
36
|
-
* import {ViewportConstraint} from '@airtable/blocks/ui';
|
|
36
|
+
* import {ViewportConstraint} from '@airtable/blocks/base/ui';
|
|
37
37
|
* <ViewportConstraint maxFullScreenSize={{width: 600, height: 400}}>
|
|
38
38
|
* <div>I need a max fullscreen size!</div>
|
|
39
39
|
* </ViewportConstraint>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @ignore */ /** */
|
|
2
|
+
export { FieldType, FieldConfig } from '../../shared/types/field';
|
|
3
|
+
export { Base } from './base';
|
|
4
|
+
export { Table } from './table';
|
|
5
|
+
export { Field } from './field';
|
|
6
|
+
export { Record } from './record';
|
|
7
|
+
export { Session } from './session';
|
|
8
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../src/interface/models/models.ts"],"names":[],"mappings":"AACA,cAAc,CAAC,MAAM;AACrB,OAAO,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../../src/interface/sdk.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAK7C,OAAO,EAEH,eAAe,EAClB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../../src/interface/sdk.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAK7C,OAAO,EAEH,eAAe,EAClB,MAAM,4BAA4B,CAAC;AAEpC,cAAc;AACd,qBAAa,iBAAkB,SAAQ,YAAY,CAAC,gBAAgB,CAAC;gBACrD,iBAAiB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAsDrE,cAAc;IACd,kBAAkB,IAAI,eAAe;CAYxC"}
|
|
@@ -8,7 +8,8 @@ import { Record } from '../models/record';
|
|
|
8
8
|
* @example
|
|
9
9
|
* ```js
|
|
10
10
|
* import {expandRecord} from '@airtable/blocks/interface/ui';
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
|
+
* <button onClick={() => expandRecord(record)}>{record.name}</button>
|
|
12
13
|
* ```
|
|
13
14
|
* @docsPath UI/utils/expandRecord
|
|
14
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expand_record.d.ts","sourceRoot":"","sources":["../../../../../src/interface/ui/expand_record.ts"],"names":[],"mappings":"AAAA,0DAA0D,CAAC,MAAM;AACjE,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAExC
|
|
1
|
+
{"version":3,"file":"expand_record.d.ts","sourceRoot":"","sources":["../../../../../src/interface/ui/expand_record.ts"],"names":[],"mappings":"AAAA,0DAA0D,CAAC,MAAM;AACjE,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAExC;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAQjD"}
|
|
@@ -1,4 +1,34 @@
|
|
|
1
|
+
/** @module @airtable/blocks/ui: initializeBlock */ /** */
|
|
2
|
+
import * as React from 'react';
|
|
1
3
|
import { InterfaceBlockSdk } from '../sdk';
|
|
4
|
+
/** */
|
|
5
|
+
type EntryElementFunction = () => React.ReactNode;
|
|
6
|
+
/** @hidden */
|
|
7
|
+
interface EntryPoints {
|
|
8
|
+
interface?: EntryElementFunction;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* `initializeBlock` takes the top-level React component in your tree and renders it. It is conceptually similar to `ReactDOM.render`, but takes care of some Extensions-specific things.
|
|
12
|
+
*
|
|
13
|
+
* @param entryPoints An object with an `interface` property which is a function that returns your React Node.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```js
|
|
17
|
+
* import {initializeBlock} from '@airtable/blocks/interface/ui';
|
|
18
|
+
* import React from 'react';
|
|
19
|
+
*
|
|
20
|
+
* function App() {
|
|
21
|
+
* return (
|
|
22
|
+
* <div>Hello world 🚀</div>
|
|
23
|
+
* );
|
|
24
|
+
* }
|
|
25
|
+
*
|
|
26
|
+
* initializeBlock({interface: () => <App />});
|
|
27
|
+
* ```
|
|
28
|
+
* @docsPath UI/utils/initializeBlock
|
|
29
|
+
*/
|
|
30
|
+
export declare function initializeBlock(entryPoints: EntryPoints): void;
|
|
2
31
|
export declare function __injectSdkIntoInitializeBlock(_sdk: InterfaceBlockSdk): void;
|
|
3
32
|
export declare function __resetHasBeenInitialized(): void;
|
|
33
|
+
export {};
|
|
4
34
|
//# sourceMappingURL=initialize_block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialize_block.d.ts","sourceRoot":"","sources":["../../../../../src/interface/ui/initialize_block.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"initialize_block.d.ts","sourceRoot":"","sources":["../../../../../src/interface/ui/initialize_block.tsx"],"names":[],"mappings":"AAAA,mDAAmD,CAAC,MAAM;AAC1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,iBAAiB,EAAC,MAAM,QAAQ,CAAC;AAOzC,MAAM;AACN,KAAK,oBAAoB,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC;AAClD,cAAc;AACd,UAAU,WAAW;IACjB,SAAS,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,WAAW,QAkDvD;AAMD,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,iBAAiB,QAErE;AAGD,wBAAgB,yBAAyB,SAExC"}
|
|
@@ -7,10 +7,10 @@ export { useRecords } from './use_records';
|
|
|
7
7
|
export { useRunInfo } from './use_run_info';
|
|
8
8
|
export { useSession } from './use_session';
|
|
9
9
|
export { default as useGlobalConfig } from '../../shared/ui/use_global_config';
|
|
10
|
-
export { default as useLoadable } from '../../shared/ui/use_loadable';
|
|
11
10
|
export { default as useSynced } from '../../shared/ui/use_synced';
|
|
12
11
|
export { default as useWatchable } from '../../shared/ui/use_watchable';
|
|
13
12
|
export { default as withHooks } from '../../shared/ui/with_hooks';
|
|
14
13
|
export { default as colors } from '../../shared/colors';
|
|
15
14
|
export { default as colorUtils } from '../../shared/color_utils';
|
|
15
|
+
export { loadCSSFromString, loadCSSFromURLAsync, loadScriptFromURLAsync, } from '../../shared/ui/remote_utils';
|
|
16
16
|
//# sourceMappingURL=ui.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../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O,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACH,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,GACzB,MAAM,8BAA8B,CAAC"}
|
|
@@ -2,8 +2,25 @@ import { Table } from '../models/table';
|
|
|
2
2
|
import { Base } from '../models/base';
|
|
3
3
|
import { Field } from '../models/field';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* An object that represents a custom property that a block can set.
|
|
6
|
+
*
|
|
7
|
+
* ```
|
|
8
|
+
* type BlockPageElementCustomProperty = {key: string; label: string} & (
|
|
9
|
+
* | {type: 'boolean'; defaultValue: boolean}
|
|
10
|
+
* | {type: 'string'; defaultValue?: string}
|
|
11
|
+
* | {
|
|
12
|
+
* type: 'enum';
|
|
13
|
+
* possibleValues: Array<{value: string; label: string}>;
|
|
14
|
+
* defaultValue?: string;
|
|
15
|
+
* }
|
|
16
|
+
* | {
|
|
17
|
+
* type: 'field';
|
|
18
|
+
* table: Table;
|
|
19
|
+
* possibleValues?: Array<Field>; // If not provided, all visible fields in the table will be shown in the dropdown.
|
|
20
|
+
* defaultValue?: Field;
|
|
21
|
+
* }
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
7
24
|
*/
|
|
8
25
|
type BlockPageElementCustomProperty = {
|
|
9
26
|
key: string;
|
|
@@ -29,9 +46,39 @@ type BlockPageElementCustomProperty = {
|
|
|
29
46
|
defaultValue?: Field;
|
|
30
47
|
});
|
|
31
48
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
49
|
+
* A hook for integrating configuration settings for your block with the Interface Designer properties
|
|
50
|
+
* panel. Under the hood, this uses {@link GlobalConfig} to store the custom property values.
|
|
51
|
+
*
|
|
52
|
+
* Returns an object with:
|
|
53
|
+
* - `customPropertyValueByKey`: an object mapping custom property keys to their current value.
|
|
54
|
+
* - `errorState`: an object with an `error` property if there was an error setting the custom properties
|
|
55
|
+
*
|
|
56
|
+
* @param getCustomProperties A function that returns an array of {@link BlockPageElementCustomProperty}.
|
|
57
|
+
* This function should have a stable identity, so it should either be defined at the top level of the
|
|
58
|
+
* file or wrapped in useCallback. It will receive an instance of {@link Base} as an argument.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```js
|
|
62
|
+
* import {useCustomProperties} from '@airtable/blocks/interface/ui';
|
|
63
|
+
*
|
|
64
|
+
* function getCustomProperties(base: Base) {
|
|
65
|
+
* const table = base.tables[0];
|
|
66
|
+
* const numberFields = table.fields.filter(field => field.type === FieldType.NUMBER);
|
|
67
|
+
* return [
|
|
68
|
+
* {key: 'title', label: 'Title', type: 'string', defaultValue: 'Chart'},
|
|
69
|
+
* {key: 'xAxis', label: 'X-axis', type: 'field', table, possibleValues: numberFields},
|
|
70
|
+
* {key: 'yAxis', label: 'Y-axis', type: 'field', table, possibleValues: numberFields},
|
|
71
|
+
* {key: 'color', label: 'Color', type: 'enum', possibleValues: ['red', 'blue', 'green'], defaultValue: 'red'},
|
|
72
|
+
* {key: 'showLegend', label: 'Show Legend', type: 'boolean', defaultValue: true},
|
|
73
|
+
* ];
|
|
74
|
+
* }
|
|
75
|
+
*
|
|
76
|
+
* function MyApp() {
|
|
77
|
+
* const {customPropertyValueByKey, errorState} = useCustomProperties(getCustomProperties);
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
* @docsPath UI/hooks/useCustomProperties
|
|
81
|
+
* @hook
|
|
35
82
|
*/
|
|
36
83
|
export declare function useCustomProperties(getCustomProperties: (base: Base) => Array<BlockPageElementCustomProperty>): {
|
|
37
84
|
customPropertyValueByKey: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_custom_properties.d.ts","sourceRoot":"","sources":["../../../../../src/interface/ui/use_custom_properties.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,KAAK,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AAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,CAAC;IAAC,UAAU,EAAE;QAAC,KAAK,EAAE,KAAK,CAAA;KAAC,GAAG,IAAI,CAAA;CAAC,CAkDzF"}
|
|
@@ -20,7 +20,7 @@ interface ColorUtils {
|
|
|
20
20
|
* @param colorString
|
|
21
21
|
* @example
|
|
22
22
|
* ```js
|
|
23
|
-
* import {colorUtils, colors} from '@airtable/blocks/ui';
|
|
23
|
+
* import {colorUtils, colors} from '@airtable/blocks/[placeholder-path]/ui';
|
|
24
24
|
*
|
|
25
25
|
* colorUtils.getHexForColor(colors.RED);
|
|
26
26
|
* // => '#ef3061'
|
|
@@ -38,7 +38,7 @@ interface ColorUtils {
|
|
|
38
38
|
* @param colorString
|
|
39
39
|
* @example
|
|
40
40
|
* ```js
|
|
41
|
-
* import {colorUtils, colors} from '@airtable/blocks/ui';
|
|
41
|
+
* import {colorUtils, colors} from '@airtable/blocks/[placeholder-path]/ui';
|
|
42
42
|
*
|
|
43
43
|
* colorUtils.getRgbForColor(colors.PURPLE_DARK_1);
|
|
44
44
|
* // => {r: 107, g: 28, b: 176}
|
|
@@ -56,7 +56,7 @@ interface ColorUtils {
|
|
|
56
56
|
* @param colorString
|
|
57
57
|
* @example
|
|
58
58
|
* ```js
|
|
59
|
-
* import {colorUtils, colors} from '@airtable/blocks/ui';
|
|
59
|
+
* import {colorUtils, colors} from '@airtable/blocks/[placeholder-path]/ui';
|
|
60
60
|
*
|
|
61
61
|
* colorUtils.shouldUseLightTextOnColor(colors.PINK_LIGHT_1);
|
|
62
62
|
* // => false
|
|
@@ -10,9 +10,9 @@ import { ObjectValues } from './private_utils';
|
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```js
|
|
13
|
-
* import {
|
|
13
|
+
* import {colors, colorUtils} from '@airtable/blocks/[placeholder-path]/ui';
|
|
14
14
|
*
|
|
15
|
-
* <
|
|
15
|
+
* <div style={{backgroundColor: colorUtils.getHexForColor(colors.BLUE)}}>Hello world</div>
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
18
|
* @docsPath UI/utils/colors
|