Skip to content

Commit 8b07d6c

Browse files
Format repo with Prettier
Apply prettier --write across the repo to clear pre-existing formatting violations that were previously masked by CRLF line endings. Pure formatting; no behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 02d70df commit 8b07d6c

10 files changed

Lines changed: 53 additions & 49 deletions

File tree

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -177,18 +177,18 @@ bubbleThemes.light.panelSurface; // "#ffffff"
177177

178178
Every token the library paints with:
179179

180-
| Token | Paints |
181-
| ---------------- | -------------------------------------------------------------------- |
182-
| `bubbleSurface` | Fill of the collapsed bubble circle |
180+
| Token | Paints |
181+
| ---------------- | ------------------------------------------------------------------------ |
182+
| `bubbleSurface` | Fill of the collapsed bubble circle |
183183
| `bubbleIcon` | Stroke of the built-in ellipsis glyph (only when a bubble has no `icon`) |
184-
| `bubbleShadow` | Drop shadow under each bubble |
185-
| `focusRing` | Ring marking the focused bubble |
186-
| `panelSurface` | Fill of the expanded panel and its caret |
187-
| `panelText` | Default text color inside the panel |
188-
| `panelShadow` | Drop shadow under the panel |
189-
| `dismissSurface` | Fill of the drag-to-dismiss target circle |
190-
| `dismissBorder` | Border of the dismiss target circle |
191-
| `dismissIcon` | Stroke of the X inside the dismiss target |
184+
| `bubbleShadow` | Drop shadow under each bubble |
185+
| `focusRing` | Ring marking the focused bubble |
186+
| `panelSurface` | Fill of the expanded panel and its caret |
187+
| `panelText` | Default text color inside the panel |
188+
| `panelShadow` | Drop shadow under the panel |
189+
| `dismissSurface` | Fill of the drag-to-dismiss target circle |
190+
| `dismissBorder` | Border of the dismiss target circle |
191+
| `dismissIcon` | Stroke of the X inside the dismiss target |
192192

193193
Inside the panel, `content` is your element — style it however you like; only `panelText` cascades in as a default.
194194

docs/RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Consequences:
3131
in it would bypass provenance.
3232
- The only capability needed to publish is the ability to **push tags and create a GitHub
3333
Release** (GitHub auth / the `gh` CLI).
34-
- Publishing fires **only** on a *published GitHub Release*. Pushing a tag alone does
34+
- Publishing fires **only** on a _published GitHub Release_. Pushing a tag alone does
3535
**not** publish.
3636

3737
## Release procedure

playground/components/cards.svelte

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@
4343
onclick={() => toggle(card)}
4444
aria-pressed={spawned[card.id] ? "true" : "false"}
4545
aria-label={card.title}
46-
class="focus-ring flex cursor-pointer items-center gap-2 {corners(i, cards.length)} px-3.5 py-2.5 text-sm font-medium transition-colors {spawned[
47-
card.id
48-
]
46+
class="focus-ring flex cursor-pointer items-center gap-2 {corners(
47+
i,
48+
cards.length
49+
)} px-3.5 py-2.5 text-sm font-medium transition-colors {spawned[card.id]
4950
? 'bg-zinc-800 text-white light:bg-zinc-200 light:text-zinc-900'
5051
: 'text-zinc-400 hover:bg-zinc-900 hover:text-white light:text-zinc-600 light:hover:bg-zinc-100 light:hover:text-zinc-900'}"
5152
>

playground/components/docs-panel.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
'href="https://github.com/githyperplexed/bubbles/blob/main/LICENSE"'
1414
)
1515
.replaceAll('<a href="http', '<a target="_blank" rel="noreferrer" href="http')
16-
.replace(
17-
/<a target="_blank" rel="noreferrer" href="http[^"]+">([\s\S]*?)<\/a>/g,
18-
(anchor) => anchor.replace("</a>", `${externalLinkNote}</a>`)
16+
.replace(/<a target="_blank" rel="noreferrer" href="http[^"]+">([\s\S]*?)<\/a>/g, (anchor) =>
17+
anchor.replace("</a>", `${externalLinkNote}</a>`)
1918
);
2019
</script>
2120

playground/options.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { describe, expect, test } from "vitest";
21
import { contrastIcon } from "$playground/options";
2+
import { describe, expect, test } from "vitest";
33

44
const swatches = [
55
["White", "ffffff"],
@@ -13,9 +13,7 @@ const swatches = [
1313

1414
const channelToLinear = (channel: number): number => {
1515
const normalized = channel / 255;
16-
return normalized <= 0.03928
17-
? normalized / 12.92
18-
: ((normalized + 0.055) / 1.055) ** 2.4;
16+
return normalized <= 0.03928 ? normalized / 12.92 : ((normalized + 0.055) / 1.055) ** 2.4;
1917
};
2018

2119
const luminance = (hex: string): number => {

playground/options.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ import { MediaQuery } from "svelte/reactivity";
99

1010
const channelToLinear = (channel: number): number => {
1111
const normalized = channel / 255;
12-
return normalized <= 0.03928
13-
? normalized / 12.92
14-
: ((normalized + 0.055) / 1.055) ** 2.4;
12+
return normalized <= 0.03928 ? normalized / 12.92 : ((normalized + 0.055) / 1.055) ** 2.4;
1513
};
1614

1715
const relativeLuminance = (hex: string): number => {

playground/url.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ export const writeConfig = (config: PlaygroundConfig): void => {
4949
const params = new URLSearchParams();
5050
if (config.theme !== defaults.theme) params.set("theme", config.theme);
5151
if (config.color) params.set("color", config.color);
52-
if (config.initialState !== defaults.initialState) params.set("initial-state", config.initialState);
52+
if (config.initialState !== defaults.initialState)
53+
params.set("initial-state", config.initialState);
5354
if (config.side !== defaults.side) params.set("side", config.side);
5455
if (config.vertical !== defaults.vertical) params.set("vertical", `${config.vertical}`);
5556
if (config.panelWidth !== defaults.panelWidth) params.set("panel-width", `${config.panelWidth}`);

tests/e2e/accessibility.spec.ts

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ test.describe("playground accessibility", () => {
77
test.beforeEach(async ({ page }, testInfo) => {
88
test.skip(testInfo.project.name !== "chromium", "Playground accessibility scans run once.");
99
await page.goto(playgroundUrl);
10-
await page.waitForFunction(() => document.querySelector('[role="dialog"][aria-label="Settings"]'));
10+
await page.waitForFunction(() =>
11+
document.querySelector('[role="dialog"][aria-label="Settings"]')
12+
);
1113
});
1214

1315
test("has no automatically detectable axe violations", async ({ page }) => {
@@ -16,31 +18,37 @@ test.describe("playground accessibility", () => {
1618
});
1719

1820
test("has named controls and valid aria-controls references", async ({ page }) => {
19-
const unnamed = await page.locator("a[href], button, input, [role='button']").evaluateAll((els) =>
20-
els
21-
.filter((el) => {
22-
const style = getComputedStyle(el);
23-
return style.display !== "none" && el.getAttribute("aria-hidden") !== "true";
24-
})
25-
.filter((el) => {
26-
if (el.getAttribute("aria-label")) return false;
27-
if (el instanceof HTMLInputElement && el.labels && el.labels.length > 0) return false;
28-
return (el.textContent ?? "").trim() === "";
29-
})
30-
.map((el) => el.outerHTML)
31-
);
21+
const unnamed = await page
22+
.locator("a[href], button, input, [role='button']")
23+
.evaluateAll((els) =>
24+
els
25+
.filter((el) => {
26+
const style = getComputedStyle(el);
27+
return style.display !== "none" && el.getAttribute("aria-hidden") !== "true";
28+
})
29+
.filter((el) => {
30+
if (el.getAttribute("aria-label")) return false;
31+
if (el instanceof HTMLInputElement && el.labels && el.labels.length > 0) return false;
32+
return (el.textContent ?? "").trim() === "";
33+
})
34+
.map((el) => el.outerHTML)
35+
);
3236
expect(unnamed).toEqual([]);
3337

34-
const brokenControls = await page.locator("[aria-controls]").evaluateAll((els) =>
35-
els
36-
.map((el) => el.getAttribute("aria-controls"))
37-
.filter((id): id is string => id !== null && document.getElementById(id) === null)
38-
);
38+
const brokenControls = await page
39+
.locator("[aria-controls]")
40+
.evaluateAll((els) =>
41+
els
42+
.map((el) => el.getAttribute("aria-controls"))
43+
.filter((id): id is string => id !== null && document.getElementById(id) === null)
44+
);
3945
expect(brokenControls).toEqual([]);
4046
});
4147

4248
test("announces generated docs links that open a new tab", async ({ page }) => {
43-
await page.locator('[role="button"][aria-label="Docs"][aria-controls="bubble-panel-docs"]').click();
49+
await page
50+
.locator('[role="button"][aria-label="Docs"][aria-controls="bubble-panel-docs"]')
51+
.click();
4452
const externalLinks = page.locator("[role='dialog'][aria-label='Docs'] a[target='_blank']");
4553
await expect(externalLinks.first()).toContainText("opens in new tab");
4654
});

tests/e2e/helpers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export const settled = async (page: Page, timeout = 4000): Promise<void> => {
3838
});
3939
await page.waitForFunction(
4040
() => {
41-
const state = (window as unknown as { __settle: { prev: string; stable: number } })
42-
.__settle;
41+
const state = (window as unknown as { __settle: { prev: string; stable: number } }).__settle;
4342
const snapshot = [...document.querySelectorAll('[role="button"][aria-label]')]
4443
.map((el) => {
4544
const r = el.getBoundingClientRect();

tests/e2e/mobile.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type Page, expect, test } from "@playwright/test";
1+
import { expect, test, type Page } from "@playwright/test";
22
import { bubble } from "./helpers";
33

44
// Touch + small-viewport coverage on real mobile devices (Pixel 7 /

0 commit comments

Comments
 (0)