@plutocms/supabase 0.8.6 → 0.9.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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.1](https://github.com/plutocms/supabase/compare/v0.9.0...v0.9.1) (2026-10-18)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **deps:** use @plutocms/pluto 0.13 ([#77](https://github.com/plutocms/supabase/issues/77)) ([d0ca79b](https://github.com/plutocms/supabase/commit/d0ca79b58faebcb263caaa0c29a5d5cd72023f37))
9
+
10
+ ## [0.9.0](https://github.com/plutocms/supabase/compare/v0.8.6...v0.9.0) (2026-10-17)
11
+
12
+
13
+ ### ⚠ BREAKING CHANGES
14
+
15
+ * **content:** This layer no longer adds a Tailwind entry. The app's CSS entry must start with:
16
+
17
+ ### Features
18
+
19
+ * **content:** count created items, use the admin theme, and drop the Tailwind entry ([#75](https://github.com/plutocms/supabase/issues/75)) ([ae4665a](https://github.com/plutocms/supabase/commit/ae4665aa050564ad6fa36362add604e52828097c))
20
+
3
21
  ## [0.8.6](https://github.com/plutocms/supabase/compare/v0.8.5...v0.8.6) (2026-10-17)
4
22
 
5
23
 
@@ -55,9 +55,9 @@ const items = computed<DropdownItems>(() => [
55
55
  label: userMenuLabel.value,
56
56
  avatar: {
57
57
  icon: 'lucide:user',
58
- class: 'bg-green-600',
58
+ class: 'bg-primary',
59
59
  ui: {
60
- icon: 'text-white text-sm',
60
+ icon: 'text-inverted text-sm',
61
61
  },
62
62
  },
63
63
  type: 'label',
@@ -155,7 +155,7 @@ defineShortcuts(extractShortcuts(items.value))
155
155
  <template #fallback>
156
156
  <li class="h-full">
157
157
  <div
158
- class="light:text-zinc-800/50 flex h-full items-center gap-x-2 rounded-sm px-2 text-white/50"
158
+ class="text-dimmed flex h-full items-center gap-x-2 rounded-sm px-2"
159
159
  >
160
160
  <Icon name="svg-spinners:ring-resize" />
161
161
  </div>
@@ -185,21 +185,21 @@ defineShortcuts(extractShortcuts(items.value))
185
185
  type="button"
186
186
  >
187
187
  <div
188
- class="flex h-full items-center gap-x-2 rounded-sm rounded-l-xl pr-2 pl-0.5 group-hover:bg-white/20"
188
+ class="flex h-full items-center gap-x-2 rounded-sm rounded-l-xl pr-2 pl-0.5 group-hover:bg-elevated"
189
189
  >
190
190
  <UAvatar
191
191
  :ui="{
192
192
  root: 'rounded-xl',
193
- icon: 'text-white text-lg',
193
+ icon: 'text-inverted text-lg',
194
194
  }"
195
195
  :alt="displayName"
196
196
  size="sm"
197
197
  icon="lucide:user"
198
- class="bg-green-600"
198
+ class="bg-primary"
199
199
  />
200
200
 
201
201
  <span
202
- class="light:text-zinc-800 hidden text-sm font-bold dark:text-white lg:inline"
202
+ class="text-highlighted hidden text-sm font-semibold lg:inline"
203
203
  >
204
204
  {{ shortDisplayName }}
205
205
  </span>
package/nuxt.config.ts CHANGED
@@ -14,7 +14,8 @@ export default defineNuxtConfig({
14
14
  name: 'supabase',
15
15
  },
16
16
 
17
- css: ['#layers/supabase/app/assets/css/tailwind.css'],
17
+ // No `css` entry: the app owns the one Tailwind build, and Nuxt UI scans
18
+ // this layer's app/ dir. See the single-tailwind-build skill in pluto.
18
19
 
19
20
  runtimeConfig: {
20
21
  supabaseUrl: process.env.SUPABASE_URL,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@plutocms/supabase",
3
3
  "type": "module",
4
- "version": "0.8.6",
4
+ "version": "0.9.1",
5
5
  "trustedDependencies": [
6
6
  "@parcel/watcher",
7
7
  "@plutocms/pluto",
@@ -39,7 +39,7 @@
39
39
  "@nuxt/eslint": "^1.17.0",
40
40
  "@nuxt/ui": "^4.12.0",
41
41
  "@nuxtjs/supabase": "^2.1.0",
42
- "@plutocms/pluto": "^0.11.0",
42
+ "@plutocms/pluto": "^0.13.0",
43
43
  "@plutocms/utils": "^0.2.1",
44
44
  "postgres": "^3.4.9",
45
45
  "supabase": "^2.121.0",
@@ -331,6 +331,35 @@ async function remove(ctx: PlutoContentContext, id: string | number): Promise<vo
331
331
  }
332
332
  }
333
333
 
334
+ /**
335
+ * Counts the rows created in `[range.from, range.to)` with one exact-count
336
+ * HEAD query: no rows come back, so it is not capped by the PostgREST row
337
+ * limit. Row Level Security applies as usual. Returns `null` when the type
338
+ * has no created timestamp column.
339
+ */
340
+ async function countCreated(
341
+ ctx: PlutoContentContext,
342
+ range: { from: string, to: string }
343
+ ): Promise<number | null> {
344
+ const createdColumn = resolveTimestampColumn(ctx.type, 'created')
345
+ if (!createdColumn) {
346
+ return null
347
+ }
348
+
349
+ const client = await getClient(ctx.event)
350
+ const { count, error } = await client
351
+ .from(ctx.type.source)
352
+ .select('*', { count: 'exact', head: true })
353
+ .gte(createdColumn, range.from)
354
+ .lt(createdColumn, range.to)
355
+
356
+ if (error) {
357
+ throw toContentError(error)
358
+ }
359
+
360
+ return count ?? 0
361
+ }
362
+
334
363
  /** Delegates straight to `requireCapability`, unchanged. */
335
364
  async function authorize(event: H3Event, capability: string): Promise<void> {
336
365
  await requireCapability(event, capability)
@@ -346,5 +375,6 @@ export function createSupabaseContentAdapter(): PlutoContentAdapter {
346
375
  update,
347
376
  remove,
348
377
  authorize,
378
+ countCreated,
349
379
  }
350
380
  }
@@ -1,6 +0,0 @@
1
- @import '@nuxt/ui';
2
- @import 'tailwindcss';
3
-
4
- @source '../..';
5
- @source '../../../node_modules/.c12/*/app/**';
6
- @source '@plutocms/pluto/app/**/*';