astro-md-editor 0.0.6 → 0.0.8

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 (53) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/index-CstiJsWh.js +378 -0
  3. package/.output/public/assets/{main-DzXOjsqg.js → main-Cc9C-tdG.js} +1 -1
  4. package/.output/public/assets/styles-DCSwPMSs.css +1 -0
  5. package/.output/server/{__root-CL_tq3ov.mjs → __root-Bv3dTvZ5.mjs} +1 -1
  6. package/.output/server/_libs/@radix-ui/react-dismissable-layer+[...].mjs +210 -0
  7. package/.output/server/_libs/@radix-ui/react-use-callback-ref+[...].mjs +11 -0
  8. package/.output/server/_libs/@radix-ui/react-use-controllable-state+[...].mjs +69 -0
  9. package/.output/server/_libs/@radix-ui/react-use-effect-event+[...].mjs +1 -0
  10. package/.output/server/_libs/@radix-ui/react-use-escape-keydown+[...].mjs +17 -0
  11. package/.output/server/_libs/@radix-ui/react-use-layout-effect+[...].mjs +6 -0
  12. package/.output/server/_libs/ajv.mjs +640 -42
  13. package/.output/server/_libs/aria-hidden.mjs +122 -0
  14. package/.output/server/_libs/base-ui__react.mjs +2548 -2548
  15. package/.output/server/_libs/base-ui__utils.mjs +2 -2
  16. package/.output/server/_libs/cmdk.mjs +315 -0
  17. package/.output/server/_libs/detect-node-es.mjs +1 -0
  18. package/.output/server/_libs/get-nonce.mjs +9 -0
  19. package/.output/server/_libs/lucide-react.mjs +25 -17
  20. package/.output/server/_libs/radix-ui__primitive.mjs +11 -0
  21. package/.output/server/_libs/radix-ui__react-compose-refs.mjs +39 -0
  22. package/.output/server/_libs/radix-ui__react-context.mjs +78 -0
  23. package/.output/server/_libs/radix-ui__react-dialog.mjs +319 -0
  24. package/.output/server/_libs/radix-ui__react-focus-guards.mjs +29 -0
  25. package/.output/server/_libs/radix-ui__react-focus-scope.mjs +206 -0
  26. package/.output/server/_libs/radix-ui__react-id.mjs +14 -0
  27. package/.output/server/_libs/radix-ui__react-portal.mjs +16 -0
  28. package/.output/server/_libs/radix-ui__react-presence.mjs +128 -0
  29. package/.output/server/_libs/radix-ui__react-primitive.mjs +75 -0
  30. package/.output/server/_libs/radix-ui__react-slot.mjs +184 -0
  31. package/.output/server/_libs/react-remove-scroll-bar.mjs +82 -0
  32. package/.output/server/_libs/react-remove-scroll.mjs +328 -0
  33. package/.output/server/_libs/react-style-singleton.mjs +69 -0
  34. package/.output/server/_libs/react.mjs +2 -0
  35. package/.output/server/_libs/tslib.mjs +576 -0
  36. package/.output/server/_libs/use-callback-ref.mjs +66 -0
  37. package/.output/server/_libs/use-sidecar.mjs +106 -0
  38. package/.output/server/_ssr/{ImageAssetBrowser-DNDdTqtf.mjs → ImageAssetBrowser-DuPVChYO.mjs} +2 -2
  39. package/.output/server/_ssr/{collections.server-s12asITg.mjs → collections.server-DjgohZR7.mjs} +2 -1
  40. package/.output/server/_ssr/{file-history.api-oydnxFVV.mjs → file-history.api-JMkTXrYq.mjs} +1 -1
  41. package/.output/server/_ssr/{image-assets.server-Ci2E1_Tm.mjs → image-assets.server-2-0DgxSb.mjs} +1 -1
  42. package/.output/server/_ssr/{image-preview.api-pcN5PQhH.mjs → image-preview.api-V_Q-MBx9.mjs} +2 -2
  43. package/.output/server/_ssr/{index-BjQuGIib.mjs → index-ByW88Uz2.mjs} +3 -2
  44. package/.output/server/_ssr/{index-Bn1uKwTu.mjs → index-C6Fb3DjG.mjs} +806 -408
  45. package/.output/server/_ssr/index.mjs +15 -15
  46. package/.output/server/_ssr/{router-dPC3iVPs.mjs → router-DbnWNAi_.mjs} +2 -2
  47. package/.output/server/{_tanstack-start-manifest_v-Da8tuNDH.mjs → _tanstack-start-manifest_v-BDWWBEf1.mjs} +1 -1
  48. package/.output/server/index.mjs +46 -46
  49. package/LICENSE.md +1 -1
  50. package/package.json +2 -1
  51. package/scripts/bootstrap-collections.mjs +50 -2
  52. package/.output/public/assets/index-UQt6zCrS.js +0 -334
  53. package/.output/public/assets/styles-CezfLgHY.css +0 -1
@@ -0,0 +1,106 @@
1
+ import { _ as __assign, a as __rest } from "./tslib.mjs";
2
+ import { r as reactExports } from "./react.mjs";
3
+ function ItoI(a) {
4
+ return a;
5
+ }
6
+ function innerCreateMedium(defaults, middleware) {
7
+ if (middleware === void 0) {
8
+ middleware = ItoI;
9
+ }
10
+ var buffer = [];
11
+ var assigned = false;
12
+ var medium = {
13
+ read: function() {
14
+ if (assigned) {
15
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
16
+ }
17
+ if (buffer.length) {
18
+ return buffer[buffer.length - 1];
19
+ }
20
+ return defaults;
21
+ },
22
+ useMedium: function(data) {
23
+ var item = middleware(data, assigned);
24
+ buffer.push(item);
25
+ return function() {
26
+ buffer = buffer.filter(function(x) {
27
+ return x !== item;
28
+ });
29
+ };
30
+ },
31
+ assignSyncMedium: function(cb) {
32
+ assigned = true;
33
+ while (buffer.length) {
34
+ var cbs = buffer;
35
+ buffer = [];
36
+ cbs.forEach(cb);
37
+ }
38
+ buffer = {
39
+ push: function(x) {
40
+ return cb(x);
41
+ },
42
+ filter: function() {
43
+ return buffer;
44
+ }
45
+ };
46
+ },
47
+ assignMedium: function(cb) {
48
+ assigned = true;
49
+ var pendingQueue = [];
50
+ if (buffer.length) {
51
+ var cbs = buffer;
52
+ buffer = [];
53
+ cbs.forEach(cb);
54
+ pendingQueue = buffer;
55
+ }
56
+ var executeQueue = function() {
57
+ var cbs2 = pendingQueue;
58
+ pendingQueue = [];
59
+ cbs2.forEach(cb);
60
+ };
61
+ var cycle = function() {
62
+ return Promise.resolve().then(executeQueue);
63
+ };
64
+ cycle();
65
+ buffer = {
66
+ push: function(x) {
67
+ pendingQueue.push(x);
68
+ cycle();
69
+ },
70
+ filter: function(filter) {
71
+ pendingQueue = pendingQueue.filter(filter);
72
+ return buffer;
73
+ }
74
+ };
75
+ }
76
+ };
77
+ return medium;
78
+ }
79
+ function createSidecarMedium(options) {
80
+ if (options === void 0) {
81
+ options = {};
82
+ }
83
+ var medium = innerCreateMedium(null);
84
+ medium.options = __assign({ async: true, ssr: false }, options);
85
+ return medium;
86
+ }
87
+ var SideCar = function(_a) {
88
+ var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
89
+ if (!sideCar) {
90
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
91
+ }
92
+ var Target = sideCar.read();
93
+ if (!Target) {
94
+ throw new Error("Sidecar medium not found");
95
+ }
96
+ return reactExports.createElement(Target, __assign({}, rest));
97
+ };
98
+ SideCar.isSideCarExport = true;
99
+ function exportSidecar(medium, exported) {
100
+ medium.useMedium(exported);
101
+ return SideCar;
102
+ }
103
+ export {
104
+ createSidecarMedium as c,
105
+ exportSidecar as e
106
+ };
@@ -1,9 +1,9 @@
1
1
  import { c as createServerRpc } from "./createServerRpc-29xaFZcb.mjs";
2
- import { l as listImageAssetsForFile, r as readImageAssetPreviewById } from "./image-assets.server-Ci2E1_Tm.mjs";
2
+ import { l as listImageAssetsForFile, r as readImageAssetPreviewById } from "./image-assets.server-2-0DgxSb.mjs";
3
3
  import { c as createServerFn } from "./index.mjs";
4
4
  import "node:fs/promises";
5
5
  import "node:path";
6
- import "./collections.server-s12asITg.mjs";
6
+ import "./collections.server-DjgohZR7.mjs";
7
7
  import "../_libs/tanstack__history.mjs";
8
8
  import "../_libs/tanstack__router-core.mjs";
9
9
  import "../_libs/cookie-es.mjs";
@@ -167,7 +167,8 @@ function appendCollectionsFileCache(params) {
167
167
  id: params.file.id,
168
168
  filePath: params.file.filePath,
169
169
  data: cloneObjectRecord(params.file.data),
170
- content: params.file.content
170
+ content: params.file.content,
171
+ createdAt: params.file.createdAt
171
172
  });
172
173
  cachedCollectionsRaw = JSON.stringify(parsed);
173
174
  cachedCollectionsData = parsed;
@@ -3,7 +3,7 @@ import { execFile as execFile$1 } from "node:child_process";
3
3
  import { isAbsolute, resolve, relative } from "node:path";
4
4
  import { promisify } from "node:util";
5
5
  import { m as matter } from "../_libs/gray-matter.mjs";
6
- import { getCollectionsRootPath } from "./collections.server-s12asITg.mjs";
6
+ import { getCollectionsRootPath } from "./collections.server-DjgohZR7.mjs";
7
7
  import { c as createServerFn } from "./index.mjs";
8
8
  import "../_libs/react.mjs";
9
9
  import "fs";
@@ -1,6 +1,6 @@
1
1
  import { readdir, readFile } from "node:fs/promises";
2
2
  import { dirname, resolve, relative, join, extname } from "node:path";
3
- import { getCollectionsRootPath } from "./collections.server-s12asITg.mjs";
3
+ import { getCollectionsRootPath } from "./collections.server-DjgohZR7.mjs";
4
4
  const IMAGE_MIME_TYPES = {
5
5
  ".png": "image/png",
6
6
  ".jpg": "image/jpeg",
@@ -1,9 +1,9 @@
1
1
  import { c as createServerRpc } from "./createServerRpc-29xaFZcb.mjs";
2
- import { a as readImagePreviewBySourcePath } from "./image-assets.server-Ci2E1_Tm.mjs";
2
+ import { a as readImagePreviewBySourcePath } from "./image-assets.server-2-0DgxSb.mjs";
3
3
  import { c as createServerFn } from "./index.mjs";
4
4
  import "node:fs/promises";
5
5
  import "node:path";
6
- import "./collections.server-s12asITg.mjs";
6
+ import "./collections.server-DjgohZR7.mjs";
7
7
  import "../_libs/tanstack__history.mjs";
8
8
  import "../_libs/tanstack__router-core.mjs";
9
9
  import "../_libs/cookie-es.mjs";
@@ -2,7 +2,7 @@ import { c as createServerRpc } from "./createServerRpc-29xaFZcb.mjs";
2
2
  import { writeFile, unlink, access, mkdir } from "node:fs/promises";
3
3
  import { resolve } from "node:path";
4
4
  import { m as matter } from "../_libs/gray-matter.mjs";
5
- import { getCollectionsData, updateCollectionsFileCache, removeCollectionsFileCache, getCollectionsRootPath, appendCollectionsFileCache } from "./collections.server-s12asITg.mjs";
5
+ import { getCollectionsData, updateCollectionsFileCache, removeCollectionsFileCache, getCollectionsRootPath, appendCollectionsFileCache } from "./collections.server-DjgohZR7.mjs";
6
6
  import { c as createServerFn } from "./index.mjs";
7
7
  import "../_libs/react.mjs";
8
8
  import "fs";
@@ -156,7 +156,8 @@ async function createEditorSelection(input) {
156
156
  id: normalizedSlug,
157
157
  filePath: nextFilePath,
158
158
  data: {},
159
- content: nextContent
159
+ content: nextContent,
160
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
160
161
  }
161
162
  });
162
163
  return {