@cardstack/boxel-cli 0.3.0-unstable.58 → 0.3.0-unstable.87
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/bundled-types/base/card-api.d.ts +2 -2
- package/bundled-types/base/field-support.d.ts +6 -0
- package/bundled-types/host-app/components/operator-mode/stack-item.gts +9 -1
- package/bundled-types/host-app/router.ts +1 -0
- package/dist/index.js +37 -37
- package/package.json +2 -2
- package/src/commands/realm/sync.ts +28 -2
|
@@ -7,7 +7,7 @@ import { ensureQueryFieldSearchResource } from './query-field-support';
|
|
|
7
7
|
import { isSavedInstance } from './-private';
|
|
8
8
|
import type { ComponentLike } from '@glint/template';
|
|
9
9
|
import { deserialize, serialize, serializeCard, serializeFileDef, type DeserializeOpts, type JSONAPIResource, type JSONAPISingleResourceDocument, type SerializeOpts, getCardMeta } from './card-serialization';
|
|
10
|
-
import { getDataBucket, getFieldDescription, getFields, isCard, peekAtField, realmContext, relationshipMeta } from './field-support';
|
|
10
|
+
import { beginComputePass, endComputePass, getDataBucket, getFieldDescription, getFields, isCard, peekAtField, realmContext, relationshipMeta, type ComputePassSnapshot } from './field-support';
|
|
11
11
|
import { type GetMenuItemParams } from './menu-items';
|
|
12
12
|
import { LinkableDocument, SingleFileMetaDocument } from '@cardstack/runtime-common/document-types';
|
|
13
13
|
import type { FileMetaResource } from '@cardstack/runtime-common';
|
|
@@ -16,7 +16,7 @@ interface CardOrFieldTypeIconSignature {
|
|
|
16
16
|
Element: SVGSVGElement;
|
|
17
17
|
}
|
|
18
18
|
export type CardOrFieldTypeIcon = ComponentLike<CardOrFieldTypeIconSignature>;
|
|
19
|
-
export { deserialize, getCardMeta, getDataBucket, getFieldDescription, getFields, peekAtField, isCard, isField, isFileDef, localId, meta, primitive, realmURL, relativeTo, relationshipMeta, serialize, serializeCard, serializeFileDef, ensureQueryFieldSearchResource, getStore, type BoxComponent, type DeserializeOpts, type GetMenuItemParams, type JSONAPISingleResourceDocument, type ResourceID, type SerializeOpts };
|
|
19
|
+
export { beginComputePass, endComputePass, deserialize, getCardMeta, getDataBucket, getFieldDescription, getFields, peekAtField, isCard, isField, isFileDef, localId, meta, primitive, realmURL, relativeTo, relationshipMeta, serialize, serializeCard, serializeFileDef, ensureQueryFieldSearchResource, getStore, type BoxComponent, type ComputePassSnapshot, type DeserializeOpts, type GetMenuItemParams, type JSONAPISingleResourceDocument, type ResourceID, type SerializeOpts };
|
|
20
20
|
export declare const useIndexBasedKey: unique symbol;
|
|
21
21
|
export declare const fieldDecorator: unique symbol;
|
|
22
22
|
export declare const queryableValue: unique symbol;
|
|
@@ -6,6 +6,12 @@ export interface NotLoadedValue {
|
|
|
6
6
|
reference: string;
|
|
7
7
|
}
|
|
8
8
|
export declare const realmContext: unique symbol;
|
|
9
|
+
export interface ComputePassSnapshot {
|
|
10
|
+
calls: number;
|
|
11
|
+
cacheHits: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function beginComputePass(): void;
|
|
14
|
+
export declare function endComputePass(): ComputePassSnapshot;
|
|
9
15
|
export declare function getter<CardT extends BaseDefConstructor>(instance: BaseDef, field: Field<CardT>): BaseInstanceType<CardT>;
|
|
10
16
|
export declare function entangleWithCardTracking(instance: BaseDef): void;
|
|
11
17
|
export declare function notifyCardTracking(instance: BaseDef): void;
|
|
@@ -32,12 +32,13 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
MenuDivider,
|
|
34
34
|
MenuItem,
|
|
35
|
+
copyCardURLToClipboard,
|
|
35
36
|
getContrastColor,
|
|
36
37
|
toMenuItems,
|
|
37
38
|
} from '@cardstack/boxel-ui/helpers';
|
|
38
39
|
import { cn, cssVar, optional, not } from '@cardstack/boxel-ui/helpers';
|
|
39
40
|
|
|
40
|
-
import { IconTrash } from '@cardstack/boxel-ui/icons';
|
|
41
|
+
import { IconLink, IconTrash } from '@cardstack/boxel-ui/icons';
|
|
41
42
|
|
|
42
43
|
import type { CommandContext } from '@cardstack/runtime-common';
|
|
43
44
|
import {
|
|
@@ -619,6 +620,13 @@ export default class OperatorModeStackItem extends Component<Signature> {
|
|
|
619
620
|
return undefined;
|
|
620
621
|
}
|
|
621
622
|
return [
|
|
623
|
+
new MenuItem({
|
|
624
|
+
label: 'Copy Card URL',
|
|
625
|
+
action: () =>
|
|
626
|
+
this.cardIdentifier && copyCardURLToClipboard(this.cardIdentifier),
|
|
627
|
+
icon: IconLink,
|
|
628
|
+
disabled: !this.cardIdentifier,
|
|
629
|
+
}),
|
|
622
630
|
new MenuItem({
|
|
623
631
|
label: 'Delete Card',
|
|
624
632
|
action: () =>
|