Skip to content

Commit

Permalink
b976e4a
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 10, 2024
1 parent de11349 commit 0a59a9c
Show file tree
Hide file tree
Showing 6 changed files with 506 additions and 2,978 deletions.
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog for Weavy

## v24.2.0

<time>2024-09-10</time>

* Added export of ConversationTypes and AppTypes in uikit-react.
* Fixed an issue where the pdf viewer was only loading when cached.

## v24.1.0

<time>2024-08-29</time>
Expand Down
4 changes: 2 additions & 2 deletions dev/tools/tanstack-dev-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { type WeavyContextType, weavyContextDefinition } from "../../lib/context

import { onlineManager } from "@tanstack/query-core";
import * as TanstackQueryDevtools from "@tanstack/query-devtools";
import type { DevToolsErrorType, DevtoolsButtonPosition, DevtoolsPosition } from "@tanstack/query-devtools";
import type { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition } from "@tanstack/query-devtools";
import { whenParentsDefined } from "../../lib/utils/dom";

@customElement("tanstack-dev-tools")
Expand Down Expand Up @@ -46,7 +46,7 @@ export default class TanstackDevTools extends LitElement {
* Use this so you can define custom errors that can be shown in the devtools.
*/
@property({ attribute: false })
errorTypes: Array<DevToolsErrorType> = [];
errorTypes: Array<DevtoolsErrorType> = [];

private containerRef: Ref<HTMLElement> = createRef();

Expand Down
5 changes: 5 additions & 0 deletions dev/vite.plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ export function weavyChunkNames(chunkInfo) {
if (name?.endsWith(".js")) {
name = name.slice(0, -1 * ".js".length);
}

/*if (name?.endsWith(".mjs")) {
name = name.slice(0, -1 * ".mjs".length);
}*/

//return `esm/${chunkInfo.isDynamicEntry ? "dynamic/" : ""}${name}.js`;
return `[format]/${name}.${chunkInfo.format === "cjs" ? "cjs" : "js"}`;
}
Expand Down
8 changes: 4 additions & 4 deletions lib/components/wy-pdf-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,14 +314,14 @@ export default class WyPdfViewer extends LitElement {
if (changedProperties.has("weavyContext") && this.weavyContext) {
if (!this.pdfjsLib) {
await this.weavyContext.whenUrl();
const pdfjsLibImport = import("pdfjs-dist");
const pdfjsViewerImport = import("pdfjs-dist/web/pdf_viewer.mjs");
this.pdfjsLib = await pdfjsLibImport;
this.pdfjsViewer = await pdfjsViewerImport;

this.pdfjsLib = await import("pdfjs-dist");
// Assign to globalThis, otherwise it breaks
(globalThis as typeof globalThis & { pdfjsLib: pdfjsLibType }).pdfjsLib = this.pdfjsLib;

// Must await after globalThis.pdfjsLib, otherwise it breaks
this.pdfjsViewer = await import("pdfjs-dist/web/pdf_viewer.mjs");

this.whenPdfjsResolve?.({
pdfjsLib: this.pdfjsLib,
pdfjsViewer: this.pdfjsViewer
Expand Down
Loading

0 comments on commit 0a59a9c

Please sign in to comment.