Skip to content

Commit

Permalink
fix: always add link tag for prefetch even when prerendering
Browse files Browse the repository at this point in the history
  • Loading branch information
rossrobino committed Mar 1, 2024
1 parent 4320137 commit c927c2d
Show file tree
Hide file tree
Showing 23 changed files with 352 additions and 343 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ dist
!.vscode/extensions.json
.DS_Store
/package
.vercel
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "drab",
"description": "A headless custom element library",
"version": "5.3.3",
"version": "5.3.4",
"homepage": "https://drab.robino.dev",
"license": "MIT",
"author": {
Expand Down
8 changes: 6 additions & 2 deletions src/docs/breakpoint/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<script type="module" src="/package/breakpoint/define.ts"></script>

<drab-breakpoint class="mb-4 block">
<div data-content class="card inline-block px-3 py-2 font-mono text-sm"></div>
<div data-content class="card inline-block px-3 py-2 font-mono text-sm">
Loading
</div>
</drab-breakpoint>

<drab-breakpoint breakpoint-custom="400" breakpoint-custom-2="700">
<div data-content class="card inline-block px-3 py-2 font-mono text-sm"></div>
<div data-content class="card inline-block px-3 py-2 font-mono text-sm">
Loading
</div>
</drab-breakpoint>
2 changes: 1 addition & 1 deletion src/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="/style.postcss" />
<title>drab</title>
<meta name="description" content="A headless custom element library." />
<script type="module" src="/layout.client.ts"></script>
<script type="module" src="/layout.ts"></script>
</head>
<body
class="prose prose-neutral max-w-none bg-background font-serif text-foreground prose-a:link selection:bg-foreground selection:text-background prose-headings:font-antique prose-h1:text-balance hover:prose-a:decoration-dotted prose-pre:-mx-6 prose-pre:rounded-none prose-pre:px-6 sm:prose-pre:mx-0 sm:prose-pre:rounded-md sm:prose-pre:px-4"
Expand Down
File renamed without changes.
32 changes: 16 additions & 16 deletions src/lib/docs/classes/animate.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Animations `options` can be set:

#### Defined in

[src/package/animate/index.ts:39](https://github.com/rossrobino/components/blob/0ffb081/src/package/animate/index.ts#L39)
[src/package/animate/index.ts:39](https://github.com/rossrobino/components/blob/4320137/src/package/animate/index.ts#L39)

---

Expand All @@ -75,7 +75,7 @@ To clean up event listeners added to `document` when the element is removed.

#### Defined in

[src/package/base/index.ts:17](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L17)
[src/package/base/index.ts:17](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L17)

---

Expand All @@ -93,7 +93,7 @@ An object containing the values of each `animation-option` attribute

#### Defined in

[src/package/animate/index.ts:46](https://github.com/rossrobino/components/blob/0ffb081/src/package/animate/index.ts#L46)
[src/package/animate/index.ts:46](https://github.com/rossrobino/components/blob/4320137/src/package/animate/index.ts#L46)

### event

Expand All @@ -119,7 +119,7 @@ Base.event

#### Defined in

[src/package/base/index.ts:30](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L30)
[src/package/base/index.ts:30](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L30)

`set` **event**(`value`): `void`

Expand All @@ -139,7 +139,7 @@ Base.event

#### Defined in

[src/package/base/index.ts:34](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L34)
[src/package/base/index.ts:34](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L34)

### keyframes

Expand All @@ -151,7 +151,7 @@ Base.event

#### Defined in

[src/package/animate/index.ts:128](https://github.com/rossrobino/components/blob/0ffb081/src/package/animate/index.ts#L128)
[src/package/animate/index.ts:128](https://github.com/rossrobino/components/blob/4320137/src/package/animate/index.ts#L128)

---

Expand Down Expand Up @@ -185,7 +185,7 @@ Animates a particular element using the web animations API.

#### Defined in

[src/package/animate/index.ts:76](https://github.com/rossrobino/components/blob/0ffb081/src/package/animate/index.ts#L76)
[src/package/animate/index.ts:76](https://github.com/rossrobino/components/blob/4320137/src/package/animate/index.ts#L76)

### connectedCallback

Expand All @@ -201,7 +201,7 @@ Animates a particular element using the web animations API.

#### Defined in

[src/package/base/index.ts:152](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L152)
[src/package/base/index.ts:152](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L152)

### destroy

Expand All @@ -219,7 +219,7 @@ Passed into `disconnectedCallback`, since `Base` needs to run `disconnectedCallb

#### Defined in

[src/package/base/index.ts:159](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L159)
[src/package/base/index.ts:159](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L159)

### disconnectedCallback

Expand All @@ -235,7 +235,7 @@ Passed into `disconnectedCallback`, since `Base` needs to run `disconnectedCallb

#### Defined in

[src/package/base/index.ts:161](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L161)
[src/package/base/index.ts:161](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L161)

### getContent

Expand Down Expand Up @@ -271,7 +271,7 @@ this.querySelector("[data-content]");

#### Defined in

[src/package/base/index.ts:55](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L55)
[src/package/base/index.ts:55](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L55)

### getTrigger

Expand Down Expand Up @@ -301,7 +301,7 @@ this.querySelectorAll("[data-trigger]");

#### Defined in

[src/package/base/index.ts:42](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L42)
[src/package/base/index.ts:42](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L42)

### mount

Expand All @@ -321,7 +321,7 @@ The reason for this is to make these elements work better with frameworks like S

#### Defined in

[src/package/base/index.ts:150](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L150)
[src/package/base/index.ts:150](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L150)

### safeListener

Expand Down Expand Up @@ -356,7 +356,7 @@ element is removed from the DOM, these event listeners are cleaned up.

#### Defined in

[src/package/base/index.ts:118](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L118)
[src/package/base/index.ts:118](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L118)

### swapContent

Expand All @@ -382,7 +382,7 @@ swaps `this.content()` with the content of the element found.

#### Defined in

[src/package/base/index.ts:72](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L72)
[src/package/base/index.ts:72](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L72)

### triggerListener

Expand Down Expand Up @@ -413,4 +413,4 @@ swaps `this.content()` with the content of the element found.

#### Defined in

[src/package/base/index.ts:135](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L135)
[src/package/base/index.ts:135](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L135)
26 changes: 13 additions & 13 deletions src/lib/docs/classes/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ HTMLElement.constructor

#### Defined in

[src/package/base/index.ts:19](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L19)
[src/package/base/index.ts:19](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L19)

---

Expand All @@ -67,7 +67,7 @@ To clean up event listeners added to `document` when the element is removed.

#### Defined in

[src/package/base/index.ts:17](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L17)
[src/package/base/index.ts:17](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L17)

---

Expand All @@ -93,7 +93,7 @@ keyof `HTMLElementEventMap`

#### Defined in

[src/package/base/index.ts:30](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L30)
[src/package/base/index.ts:30](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L30)

`set` **event**(`value`): `void`

Expand All @@ -109,7 +109,7 @@ keyof `HTMLElementEventMap`

#### Defined in

[src/package/base/index.ts:34](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L34)
[src/package/base/index.ts:34](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L34)

---

Expand All @@ -125,7 +125,7 @@ keyof `HTMLElementEventMap`

#### Defined in

[src/package/base/index.ts:152](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L152)
[src/package/base/index.ts:152](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L152)

### destroy

Expand All @@ -139,7 +139,7 @@ Passed into `disconnectedCallback`, since `Base` needs to run `disconnectedCallb

#### Defined in

[src/package/base/index.ts:159](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L159)
[src/package/base/index.ts:159](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L159)

### disconnectedCallback

Expand All @@ -151,7 +151,7 @@ Passed into `disconnectedCallback`, since `Base` needs to run `disconnectedCallb

#### Defined in

[src/package/base/index.ts:161](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L161)
[src/package/base/index.ts:161](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L161)

### getContent

Expand Down Expand Up @@ -183,7 +183,7 @@ this.querySelector("[data-content]");

#### Defined in

[src/package/base/index.ts:55](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L55)
[src/package/base/index.ts:55](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L55)

### getTrigger

Expand All @@ -209,7 +209,7 @@ this.querySelectorAll("[data-trigger]");

#### Defined in

[src/package/base/index.ts:42](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L42)
[src/package/base/index.ts:42](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L42)

### mount

Expand All @@ -225,7 +225,7 @@ The reason for this is to make these elements work better with frameworks like S

#### Defined in

[src/package/base/index.ts:150](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L150)
[src/package/base/index.ts:150](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L150)

### safeListener

Expand Down Expand Up @@ -256,7 +256,7 @@ element is removed from the DOM, these event listeners are cleaned up.

#### Defined in

[src/package/base/index.ts:118](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L118)
[src/package/base/index.ts:118](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L118)

### swapContent

Expand All @@ -278,7 +278,7 @@ swaps `this.content()` with the content of the element found.

#### Defined in

[src/package/base/index.ts:72](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L72)
[src/package/base/index.ts:72](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L72)

### triggerListener

Expand All @@ -305,4 +305,4 @@ swaps `this.content()` with the content of the element found.

#### Defined in

[src/package/base/index.ts:135](https://github.com/rossrobino/components/blob/0ffb081/src/package/base/index.ts#L135)
[src/package/base/index.ts:135](https://github.com/rossrobino/components/blob/4320137/src/package/base/index.ts#L135)
Loading

0 comments on commit c927c2d

Please sign in to comment.