@axium/notes 0.3.4 → 0.3.6

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.
Files changed (2) hide show
  1. package/lib/Note.svelte +7 -11
  2. package/package.json +2 -2
package/lib/Note.svelte CHANGED
@@ -1,10 +1,11 @@
1
1
  <script lang="ts">
2
2
  import { goto } from '$app/navigation';
3
- import { fetchAPI } from '@axium/client/requests';
4
- import { AccessControlDialog, Icon, Popover } from '@axium/client/components';
5
- import type { Note } from '@axium/notes/common';
6
3
  import { page } from '$app/state';
4
+ import { dynamicRows } from '@axium/client/attachments';
7
5
  import { copy } from '@axium/client/clipboard';
6
+ import { AccessControlDialog, Icon, Popover } from '@axium/client/components';
7
+ import { fetchAPI } from '@axium/client/requests';
8
+ import type { Note } from '@axium/notes/common';
8
9
  import { download } from 'utilium/dom.js';
9
10
 
10
11
  let { note = $bindable(), notes = $bindable(), pageMode = false }: { note: Note; notes?: Note[]; pageMode?: boolean } = $props();
@@ -65,17 +66,12 @@
65
66
  <AccessControlDialog bind:dialog={acl} item={note} itemType="notes" editable />
66
67
  </div>
67
68
  <textarea
69
+ bind:value={note.content}
68
70
  name="content"
69
71
  class="editable-text"
70
72
  placeholder="It's a beautiful day outside..."
71
- onchange={e => {
72
- note.content = e.currentTarget.value;
73
- fetchAPI('PATCH', 'notes/:id', note, note.id);
74
- }}
75
- onkeyup={e => {
76
- if (!navigator.userAgent.includes('Firefox')) return;
77
- e.currentTarget.rows = Math.min(e.currentTarget.value.split('\n').length, 40);
78
- }}>{note.content}</textarea
73
+ onchange={() => fetchAPI('PATCH', 'notes/:id', note, note.id)}
74
+ {@attach dynamicRows()}>{note.content}</textarea
79
75
  >
80
76
  </div>
81
77
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/notes",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "description": "Notes for Axium",
6
6
  "funding": {
@@ -35,7 +35,7 @@
35
35
  "build": "tsc"
36
36
  },
37
37
  "peerDependencies": {
38
- "@axium/client": ">=0.13.0",
38
+ "@axium/client": ">=0.14.4",
39
39
  "@axium/core": ">=0.19.0",
40
40
  "@axium/server": ">=0.35.0",
41
41
  "@sveltejs/kit": "^2.27.3",