Skip to content

Commit

Permalink
feat: WIP: new UI
Browse files Browse the repository at this point in the history
Signed-off-by: James Chien <james@numbersprotocol.io>
  • Loading branch information
shc261392 committed Jun 14, 2024
1 parent 1c8614b commit a7f9089
Show file tree
Hide file tree
Showing 45 changed files with 2,850 additions and 454 deletions.
82 changes: 82 additions & 0 deletions capture-eye.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import { LitElement } from 'lit';
interface TooltipState {
show: boolean;
top: number;
left: number;
}
interface TooltipStates {
[key: string]: TooltipState;
}
export declare class CaptureEye extends LitElement {
static styles: import("lit").CSSResult;
/**
* Whether to display inspector panel or not.
*/
showPanel: boolean;
/**
* If yes, start fetching asset data when the Capture Eye is loaded.
* Otherwise the data will only be fetched when the panel is opened.
*/
prefetch: boolean;
/**
* Nid of the asset.
*/
nid: string;
/**
* Optional Capture token for accessing data from private assets.
*/
capture_token: string;
metadata: ({
label: string;
value: string;
link: string;
helpText?: undefined;
} | {
label: string;
value: string;
link?: undefined;
helpText?: undefined;
} | {
label: string;
value: string;
helpText: string;
link?: undefined;
})[];
private asset;
tooltipStates: TooltipStates;
assetDataFetched: boolean;
assetDataNotFound: boolean;
imageError: boolean;
private readonly apiBaseUrl;
private readonly ipfsGatewayBaseUrl;
private readonly explorerBaseUrl;
private readonly profileBaseUrl;
private readonly captureEyeIcon;
private readonly closeIcon;
private readonly contentCopyIcon;
private readonly helpIcon;
get assetUrl(): string;
get assetProfileUrl(): string;
constructor();
buttonTemplate(): import("lit-html").TemplateResult<1>;
tooltipTemplate(label: string, helpText: string): import("lit-html").TemplateResult<1>;
metadataTemplate(): import("lit-html").TemplateResult<1>;
render(): import("lit-html").TemplateResult<1>;
connectedCallback(): Promise<void>;
private toggleShowPanel;
private fetchAssetData;
private showTooltip;
private hideTooltip;
private copyToClipboard;
private collect;
private setMetadata;
private getExplorerUrl;
private getIpfsUrl;
}
declare global {
interface HTMLElementTagNameMap {
'capture-eye': CaptureEye;
}
}
export {};
//# sourceMappingURL=capture-eye.d.ts.map
1 change: 1 addition & 0 deletions capture-eye.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a7f9089

Please sign in to comment.