Skip to content

Commit

Permalink
feat: edgeless-attachment & card views
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushAgrawal-A2 committed Jan 22, 2024
1 parent 8582157 commit cc29578
Show file tree
Hide file tree
Showing 28 changed files with 1,986 additions and 789 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ export class EmbedCardCaption extends WithDisposable(ShadowlessElement) {
@input=${this._onInputChange}
@blur=${this._onInputBlur}
@pointerdown=${stopPropagation}
@pointerup=${stopPropagation}
@click=${stopPropagation}
@dblclick=${stopPropagation}
/>`;
}
}
Expand Down
2 changes: 2 additions & 0 deletions packages/blocks/src/_common/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const EMBED_CARD_WIDTH: Record<EmbedCardStyle, number> = {
list: 752,
vertical: 364,
cube: 170,
cubeThick: 170,
video: 752,
figma: 752,
};
Expand All @@ -27,6 +28,7 @@ export const EMBED_CARD_HEIGHT: Record<EmbedCardStyle, number> = {
list: 46,
vertical: 390,
cube: 114,
cubeThick: 132,
video: 544,
figma: 544,
};
Expand Down
1,135 changes: 1,135 additions & 0 deletions packages/blocks/src/_common/icons/file-icons.ts

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/blocks/src/_common/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from './database.js';
export * from './edgeless.js';
export * from './file-icons.js';
export * from './import-export.js';
export * from './tags.js';
export * from './text.js';
Expand Down
1 change: 1 addition & 0 deletions packages/blocks/src/_common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,5 +256,6 @@ export type EmbedCardStyle =
| 'list'
| 'vertical'
| 'cube'
| 'cubeThick'
| 'video'
| 'figma';
4 changes: 2 additions & 2 deletions packages/blocks/src/_common/utils/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export function isUrlInClipboard(clipboardData: DataTransfer) {
return isValidUrl(url);
}

type EmbedCardImages = {
type EmbedCardIcons = {
LoadingIcon: TemplateResult<1>;
EmbedCardBannerIcon: TemplateResult<1>;
EmbedCardHorizontalIcon: TemplateResult<1>;
Expand All @@ -172,7 +172,7 @@ type EmbedCardImages = {
EmbedCardCubeIcon: TemplateResult<1>;
};

export function getEmbedCardIcons(): EmbedCardImages {
export function getEmbedCardIcons(): EmbedCardIcons {
const theme = getThemeMode();
if (theme === 'light') {
return {
Expand Down
Loading

0 comments on commit cc29578

Please sign in to comment.