@stacksjs/defaults 0.74.42 → 0.74.43

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: stacks-actions
3
- description: Use when working with Stacks server actions - creating actions in app/Actions/, auto-generated API actions from the useApi model trait, the 80+ default framework actions (auth, dashboard, commerce, content, deployment, jobs), action request/response handling, or action registration. Covers @stacksjs/actions and storage/framework/defaults/app/Actions/.
3
+ description: Use when working with Stacks server actions - creating actions in app/Actions/, auto-generated API actions from the useApi model trait, the 634 default framework actions (auth, dashboard, commerce, content, deployment, jobs), action request/response handling, or action registration. Covers @stacksjs/actions and storage/framework/defaults/app/Actions/.
4
4
  license: MIT
5
5
  compatibility: Bun >= 1.3.0, TypeScript
6
6
  allowed-tools: Read Edit Write Bash Grep Glob
@@ -8,7 +8,54 @@ allowed-tools: Read Edit Write Bash Grep Glob
8
8
 
9
9
  # Stacks Composables
10
10
 
11
- 90+ reactive composables for STX templates. All are auto-imported in STX templates.
11
+ 154 reactive composables for STX templates. **27 of them are auto-imported**;
12
+ the rest need an explicit import from `@stacksjs/composables`.
13
+
14
+ `storage/framework/browser-auto-imports.json` is the authority, and it declares
15
+ 83 names in total, 27 of which are `use*`. This page said "All are auto-imported
16
+ in STX templates", which is the same mistake `AGENTS.md` carries a scar about
17
+ under "200+ composables": an agent reaching for a name on that authority writes
18
+ a template that does not run, and reads the failure as a framework bug.
19
+
20
+ ## The 27 you can write bare in a template
21
+
22
+ Everything else on this page needs an explicit import, and that is most of what
23
+ the sections below list - `useCounter`, `useLocalStorage`, `useMouse`,
24
+ `useScroll`, `useIntersectionObserver` and `usePreferredReducedMotion` among
25
+ them, which are exactly the names `AGENTS.md` calls out for having been wrongly
26
+ listed as free.
27
+
28
+ No count of how many fall on each side, deliberately. That number is
29
+ maintained by hand and moves whenever a name is added to any section on this
30
+ page - it was wrong within one edit of being written. The list below is the
31
+ whole of the free side; anything not on it is on the other.
32
+
33
+ <!-- auto-imported:begin - checked against browser-auto-imports.json by
34
+ core/server/tests/composables-skill-auto-imports.test.ts. Both directions:
35
+ every name here must be in the manifest, and every `use*` in the manifest
36
+ must be here. Edit the manifest, not this list. -->
37
+
38
+ `useAbs`, `useAuth`, `useAverage`, `useCeil`, `useClamp`, `useDark`,
39
+ `useDateFormat`, `useFetch`, `useFloor`, `useForm`, `useGitStore`, `useMax`,
40
+ `useMin`, `useNow`, `useOnline`, `usePaymentStore`, `usePrecision`,
41
+ `usePreferredDark`, `useQueueStore`, `useRound`, `useScrollLock`, `useStorage`,
42
+ `useSum`, `useTimeoutFn`, `useToggle`, `useTrunc`, `useUserStore`.
43
+
44
+ <!-- auto-imported:end -->
45
+
46
+ A name not on that list is imported:
47
+
48
+ ```ts
49
+ import { useCounter } from '@stacksjs/composables'
50
+ ```
51
+
52
+ **And the 27 are free only in the STX script entry.** The injection does not
53
+ reach a TypeScript module that entry imports - bindings there do not leak into
54
+ bundled module scope - so a `.ts` file beside your template imports every one
55
+ of these explicitly, same as any other name. `AGENTS.md` states the same limit
56
+ under Auto-imports. Referencing an uninjected name is a ReferenceError thrown
57
+ before any binding applies, which takes the whole page down rather than
58
+ degrading the one call.
12
59
 
13
60
  ## Key Path
14
61
  - Core package: `storage/framework/core/composables/src/`
@@ -153,7 +200,9 @@ isRef(val) // type guard
153
200
  - `and`, `or`, `logicNot`, `logicOr`
154
201
 
155
202
  ## Gotchas
156
- - All composables are auto-imported in STX templates — no import needed
203
+ - Only 27 of the 154 composables are auto-imported in STX templates. Check
204
+ `storage/framework/browser-auto-imports.json` before relying on a bare name;
205
+ everything else needs `import { … } from '@stacksjs/composables'`
157
206
  - NEVER use vanilla JS (`var`, `document.*`, `window.*`) in STX `<script>` tags
158
207
  - Only use stx-compatible code: signals, composables, directives
159
208
  - Auto-imports defined in `storage/framework/browser-auto-imports.json`
@@ -8,7 +8,7 @@ allowed-tools: Read Edit Write Bash Grep Glob
8
8
 
9
9
  # Stacks Dashboard
10
10
 
11
- The Stacks admin dashboard provides a full-featured admin panel with 100+ route views, 399 components, and a multi-section layout.
11
+ The Stacks admin dashboard provides a full-featured admin panel with 100+ route views, 400 components, and a multi-section layout.
12
12
 
13
13
  ## Key Paths
14
14
  - Dashboard components: `storage/framework/defaults/resources/components/Dashboard/`
@@ -12,7 +12,7 @@ allowed-tools: Read Edit Write Bash Grep Glob
12
12
  - Database package: `storage/framework/core/database/src/`
13
13
  - Configuration: `config/database.ts`
14
14
  - QB config: `config/query-builder.ts`
15
- - Migrations: `database/migrations/` (96+ migration files, `.sql` format)
15
+ - Migrations: `database/migrations/` (228 migration files, `.sql` format)
16
16
  - QB state: `.qb/`
17
17
  - ORM: `storage/framework/orm/`
18
18
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: stacks-migrations
3
- description: Use when working with database migrations in a Stacks application - creating migration files, running migrations, fresh migration (drop + recreate), seeding after migration, migration file naming conventions, or the 96+ built-in migration files. For the database API itself (queries, connections, SQL helpers), see stacks-database.
3
+ description: Use when working with database migrations in a Stacks application - creating migration files, running migrations, fresh migration (drop + recreate), seeding after migration, migration file naming conventions, or the 228 built-in migration files. For the database API itself (queries, connections, SQL helpers), see stacks-database.
4
4
  license: MIT
5
5
  compatibility: Bun >= 1.3.0, TypeScript, SQLite >= 3.47.2
6
6
  allowed-tools: Read Edit Write Bash Grep Glob
@@ -119,6 +119,6 @@ The framework includes migrations for all built-in models:
119
119
  - Do not commit a second snapshot under `.qb/`; that indicates a missing `snapshotDir` configuration
120
120
  - If a generated SQLite migration rebuilds tables, test it against a copy of the current database and run `PRAGMA integrity_check` plus `PRAGMA foreign_key_check`
121
121
  - `--seed` flag after `migrate:fresh` seeds the database with factory data
122
- - 96+ migration files exist by default for all framework models
122
+ - 228 migration files exist by default for all framework models
123
123
  - SQLite >= 3.47.2 is required (system requirement)
124
124
  - For the database API (queries, connections), see the `stacks-database` skill
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: stacks-models
3
- description: Use when working with data models in Stacks - the defineModel() API, model attributes with validation and factories, relationships (hasOne/hasMany/belongsTo/belongsToMany), traits (useAuth, useUuid, useTimestamps, useSearch, useApi, billable, taggable, categorizable, commentable, likeable, observe), computed properties (get/set), model generation, and the 50+ built-in framework models. Covers model definitions and storage/framework/defaults/app/Models/.
3
+ description: Use when working with data models in Stacks - the defineModel() API, model attributes with validation and factories, relationships (hasOne/hasMany/belongsTo/belongsToMany), traits (useAuth, useUuid, useTimestamps, useSearch, useApi, billable, taggable, categorizable, commentable, likeable, observe), computed properties (get/set), model generation, and the 102 built-in framework models. Covers model definitions and storage/framework/defaults/app/Models/.
4
4
  license: MIT
5
5
  compatibility: Bun >= 1.3.0, TypeScript, SQLite >= 3.47.2
6
6
  allowed-tools: Read Edit Write Bash Grep Glob
@@ -262,7 +262,21 @@ A model with no `useSeeder` trait is never seeded. Auth and OAuth models are
262
262
  skipped on a non-fresh database so re-seeding cannot invalidate live sessions -
263
263
  pass `--allow-protected` to override.
264
264
 
265
- ## All 62 built-in models by category
265
+ ## Built-in models by category
266
+
267
+ The ones below are worth knowing by name. They are a selection, not the set:
268
+ `storage/framework/defaults/app/Models/` holds 102, and that directory is the
269
+ authority. This section said "All 62 built-in models by category" while
270
+ listing fewer than that against 102 on disk, so an agent reading to the end
271
+ had no way to tell it was short.
272
+
273
+ No count of what this section itself lists, deliberately - that number is
274
+ maintained by hand, drifts the moment anyone adds a bullet, and is the same
275
+ habit that produced the "All 62". The total above is pinned by
276
+ `buddy docs:agent-counts`.
277
+
278
+ Run `find storage/framework/defaults/app/Models -name '*.ts'` for the full
279
+ list, or `buddy list` for what a given project resolves.
266
280
 
267
281
  ### Users & Auth
268
282
  - **User** — name, email, password | traits: useAuth(passkey), useUuid, useTimestamps, useSocials(github) | hasOne: Subscriber, Driver, Author | hasMany: PersonalAccessToken, Customer
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: stacks-orm
3
- description: Use when working with the Stacks ORM - defining models with defineModel(), model relationships (hasOne, hasMany, belongsTo, belongsToMany, morphOne, hasManyThrough), attributes, traits, factories, computed properties, query building, transactions, or the 50+ built-in models. Covers @stacksjs/orm, storage/framework/orm/, and storage/framework/defaults/app/Models/.
3
+ description: Use when working with the Stacks ORM - defining models with defineModel(), model relationships (hasOne, hasMany, belongsTo, belongsToMany, morphOne, hasManyThrough), attributes, traits, factories, computed properties, query building, transactions, or the 102 built-in models. Covers @stacksjs/orm, storage/framework/orm/, and storage/framework/defaults/app/Models/.
4
4
  license: MIT
5
5
  compatibility: Bun >= 1.3.0, TypeScript, SQLite >= 3.47.2
6
6
  allowed-tools: Read Edit Write Bash Grep Glob
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.74.42",
5
+ "version": "0.74.43",
6
6
  "description": "A modern Stacks development environment.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.74.42",
5
+ "version": "0.74.43",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -55,7 +55,7 @@
55
55
  "dependencies": {
56
56
  "@iconify-json/f7": "^1.2.2",
57
57
  "@iconify-json/hugeicons": "^1.2.27",
58
- "@stacksjs/mobile": "^0.74.42",
58
+ "@stacksjs/mobile": "^0.74.43",
59
59
  "@stacksjs/sanitizer": "^0.2.113",
60
60
  "ts-qr-codes": "^0.1.8"
61
61
  }