@alpinejs/docs 3.13.4-revision.1 → 3.13.6-revision.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpinejs/docs",
3
- "version": "3.13.4-revision.1",
3
+ "version": "3.13.6-revision.1",
4
4
  "description": "The documentation for Alpine",
5
5
  "author": "Caleb Porzio",
6
6
  "license": "MIT"
@@ -13,7 +13,7 @@ Here's a simple example of using `x-model` to bind the value of a text field to
13
13
  <div x-data="{ message: '' }">
14
14
  <input type="text" x-model="message">
15
15
 
16
- <span x-text="message">
16
+ <span x-text="message"></span>
17
17
  </div>
18
18
  ```
19
19
 
@@ -11,8 +11,6 @@ The `x-teleport` directive allows you to transport part of your Alpine template
11
11
 
12
12
  This is useful for things like modals (especially nesting them), where it's helpful to break out of the z-index of the current Alpine component.
13
13
 
14
- > Warning: if you are a [Livewire](https://laravel-livewire.com) user, this functionality does not currently work inside Livewire components. Support for this is on the roadmap.
15
-
16
14
  <a name="x-teleport"></a>
17
15
  ## x-teleport
18
16
 
@@ -115,7 +113,7 @@ Teleporting is especially helpful if you are trying to nest one modal within ano
115
113
  <template x-teleport="body">
116
114
  <div x-show="open">
117
115
  Modal contents...
118
-
116
+
119
117
  <div x-data="{ open: false }">
120
118
  <button @click="open = ! open">Toggle Nested Modal</button>
121
119
 
@@ -138,7 +136,7 @@ Teleporting is especially helpful if you are trying to nest one modal within ano
138
136
  <template x-teleport="#modal4">
139
137
  <div x-show="open">
140
138
  <div class="py-4">Modal contents...</div>
141
-
139
+
142
140
  <div x-data="{ open: false }">
143
141
  <button @click="open = ! open">Toggle Nested Modal</button>
144
142
 
@@ -33,7 +33,7 @@ This is by far the simplest way to get started with Alpine. Include the followin
33
33
  Notice the `@3.x.x` in the provided CDN link. This will pull the latest version of Alpine version 3. For stability in production, it's recommended that you hardcode the latest version in the CDN link.
34
34
 
35
35
  ```alpine
36
- <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.13.4/dist/cdn.min.js"></script>
36
+ <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.13.6/dist/cdn.min.js"></script>
37
37
  ```
38
38
 
39
39
  That's it! Alpine is now available for use inside your page.
@@ -304,7 +304,7 @@ For example:
304
304
  <a name="noautofocus"></a>
305
305
  #### .noautofocus
306
306
 
307
- By default, when `x-trap` traps focous within an element, it focuses the first focussable element within that element. This is a sensible default, however there are times where you may want to disable this behavior and not automatically focus any elements when `x-trap` engages.
307
+ By default, when `x-trap` traps focus within an element, it focuses the first focussable element within that element. This is a sensible default, however there are times where you may want to disable this behavior and not automatically focus any elements when `x-trap` engages.
308
308
 
309
309
  By adding `.noautofocus`, Alpine will not automatically focus any elements when trapping focus.
310
310
 
@@ -89,11 +89,14 @@ You may choose to use this for clarity when also using the `:leave` suffix.
89
89
  <a name="x-intersect-leave"></a>
90
90
  ### x-intersect:leave
91
91
 
92
- Appending `:leave` runs your expression when the element leaves the viewport:
92
+ Appending `:leave` runs your expression when the element leaves the viewport.
93
93
 
94
94
  ```alpine
95
95
  <div x-intersect:leave="shown = true">...</div>
96
96
  ```
97
+ > By default, this means the *whole element* is not in the viewport. Use `x-intersect:leave.full` to run your expression when only *parts of the element* are not in the viewport.
98
+
99
+ [→ Read more about the underlying `IntersectionObserver` API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)
97
100
 
98
101
  <a name="modifiers"></a>
99
102
  ## Modifiers