@petercoxhatesbridges/extension-ui 0.2.1 → 0.2.3
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/README.md +1 -1
- package/dist/ExtensionFooter.d.ts.map +1 -1
- package/dist/ExtensionFooter.js +2 -1
- package/dist/ExtensionFooter.js.map +1 -1
- package/dist/authorAvatar.d.ts +2 -0
- package/dist/authorAvatar.d.ts.map +1 -0
- package/dist/authorAvatar.js +1 -0
- package/package.json +2 -2
- package/stories/ExtensionFooter.stories.tsx +6 -2
- package/dist/assets/author-avatar.png +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@petercoxhatesbridges/extension-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Shared React controls and preferences UI for Chrome extensions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"happy-dom": "^20.11.1"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
|
-
"build": "tsc -p tsconfig.build.json && cp src/styles.css dist/styles.css &&
|
|
48
|
+
"build": "tsc -p tsconfig.build.json && cp src/styles.css dist/styles.css && node scripts/bundle-avatar.mjs",
|
|
49
49
|
"typecheck": "tsc --noEmit",
|
|
50
50
|
"test": "bun test"
|
|
51
51
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
3
|
-
import { expect } from "storybook/test";
|
|
3
|
+
import { expect, waitFor } from "storybook/test";
|
|
4
4
|
import { ExtensionFooter } from "../dist/index.js";
|
|
5
5
|
import "../dist/styles.css";
|
|
6
6
|
|
|
@@ -36,8 +36,12 @@ export const Published: Story = {
|
|
|
36
36
|
const creator = canvas.getByRole("link", { name: "About me" });
|
|
37
37
|
await expect(creator.querySelector("img")).toHaveAttribute(
|
|
38
38
|
"src",
|
|
39
|
-
expect.
|
|
39
|
+
expect.stringMatching(/^data:image\/png;base64,/),
|
|
40
40
|
);
|
|
41
|
+
await waitFor(() => {
|
|
42
|
+
const image = creator.querySelector("img");
|
|
43
|
+
expect(image?.complete && image.naturalWidth > 0).toBe(true);
|
|
44
|
+
});
|
|
41
45
|
},
|
|
42
46
|
};
|
|
43
47
|
export const Unpublished: Story = {
|
|
Binary file
|