@blogmcp/sdk 0.6.0 → 0.7.0

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 (208) hide show
  1. package/dist/consultations/channel-text.d.ts +118 -0
  2. package/dist/consultations/channel-text.js +40 -0
  3. package/dist/consultations/index.d.ts +28 -0
  4. package/dist/consultations/index.js +60 -0
  5. package/dist/consultations/messages.cs.d.ts +149 -0
  6. package/dist/consultations/messages.cs.js +143 -0
  7. package/dist/consultations/messages.d.ts +34 -0
  8. package/dist/consultations/messages.en.d.ts +143 -0
  9. package/dist/consultations/messages.en.js +141 -0
  10. package/dist/consultations/messages.js +48 -0
  11. package/dist/consultations/outcome.d.ts +121 -0
  12. package/dist/consultations/outcome.js +161 -0
  13. package/dist/consultations/public-config.d.ts +71 -0
  14. package/dist/consultations/public-config.js +104 -0
  15. package/dist/consultations/reader.d.ts +83 -0
  16. package/dist/consultations/reader.js +128 -0
  17. package/dist/consultations/routes.d.ts +214 -0
  18. package/dist/consultations/routes.js +149 -0
  19. package/dist/consultations/server/client-ip.d.ts +50 -0
  20. package/dist/consultations/server/client-ip.js +44 -0
  21. package/dist/consultations/server/contact.d.ts +23 -0
  22. package/dist/consultations/server/contact.js +138 -0
  23. package/dist/consultations/server/context.d.ts +246 -0
  24. package/dist/consultations/server/context.js +152 -0
  25. package/dist/consultations/server/cookie.d.ts +60 -0
  26. package/dist/consultations/server/cookie.js +57 -0
  27. package/dist/consultations/server/env.d.ts +20 -0
  28. package/dist/consultations/server/env.js +35 -0
  29. package/dist/consultations/server/http.d.ts +59 -0
  30. package/dist/consultations/server/http.js +64 -0
  31. package/dist/consultations/server/index.d.ts +37 -0
  32. package/dist/consultations/server/index.js +19 -0
  33. package/dist/consultations/server/origin.d.ts +39 -0
  34. package/dist/consultations/server/origin.js +31 -0
  35. package/dist/consultations/server/server.d.ts +106 -0
  36. package/dist/consultations/server/server.js +122 -0
  37. package/dist/consultations/server/session.d.ts +38 -0
  38. package/dist/consultations/server/session.js +210 -0
  39. package/dist/consultations/server/transport.d.ts +69 -0
  40. package/dist/consultations/server/transport.js +117 -0
  41. package/dist/consultations/server/turnstile.d.ts +44 -0
  42. package/dist/consultations/server/turnstile.js +31 -0
  43. package/dist/consultations/site.d.ts +100 -0
  44. package/dist/consultations/site.js +60 -0
  45. package/dist/consultations/submit-new.d.ts +103 -0
  46. package/dist/consultations/submit-new.js +72 -0
  47. package/dist/core/auth.d.ts +2 -2
  48. package/dist/core/client.d.ts +25 -4
  49. package/dist/core/client.js +35 -30
  50. package/dist/core/consultation-adapter.d.ts +2 -2
  51. package/dist/core/consultations.d.ts +1 -1
  52. package/dist/core/errors.d.ts +1 -1
  53. package/dist/core/errors.js +16 -15
  54. package/dist/core/index.d.ts +31 -31
  55. package/dist/core/index.js +35 -34
  56. package/dist/core/markdown.d.ts +1 -1
  57. package/dist/core/queries.d.ts +4 -1
  58. package/dist/core/queries.js +131 -86
  59. package/dist/core/review/format.d.ts +1 -1
  60. package/dist/core/review/index.d.ts +2 -2
  61. package/dist/core/seo.d.ts +1 -1
  62. package/dist/core/translations/cs.json.js +1 -1
  63. package/dist/core/translations/en.json.js +1 -1
  64. package/dist/core/types.d.ts +50 -1
  65. package/dist/core/view-model.d.ts +12 -2
  66. package/dist/core/view-model.js +40 -34
  67. package/dist/{packages/tripmap-core/node_modules → node_modules}/pmtiles/dist/esm/index.js +1 -1
  68. package/dist/nuxt/composables/useAsyncKb.d.ts +4 -4
  69. package/dist/nuxt/index.d.ts +1 -1
  70. package/dist/packages/mdx-render-vue/dist/composables/useGallery.js +12 -11
  71. package/dist/packages/mdx-render-vue/dist/composables/useTripMap.js +16 -16
  72. package/dist/packages/mdx-render-vue/dist/edit/TripMapEdit.vue.js +1 -1
  73. package/dist/packages/mdx-render-vue/dist/registry.js +21 -22
  74. package/dist/packages/mdx-render-vue/dist/render/alert/Alert.vue2.js +1 -1
  75. package/dist/packages/mdx-render-vue/dist/render/badge/Badge.vue2.js +1 -1
  76. package/dist/packages/mdx-render-vue/dist/render/button/Button.vue2.js +1 -1
  77. package/dist/packages/mdx-render-vue/dist/render/callout/CalloutDefault.vue.js +1 -1
  78. package/dist/packages/mdx-render-vue/dist/render/callout/CalloutMinimal.vue.js +1 -1
  79. package/dist/packages/mdx-render-vue/dist/render/tripmap/TripMapDefault.vue.js +2 -2
  80. package/dist/packages/tripmap-core/dist/engine.js +3 -3
  81. package/dist/packages/tripmap-core/dist/generated/maplibre-worker.bundle.js +1 -1
  82. package/dist/react/KbMdxContent.d.ts +1 -1
  83. package/dist/react/KbMdxContent.js +7 -8
  84. package/dist/react/context.d.ts +4 -4
  85. package/dist/react/hooks/useImageRenderer.d.ts +1 -1
  86. package/dist/react/hooks/useKbClient.d.ts +1 -1
  87. package/dist/react/hooks/useKbContext.d.ts +1 -1
  88. package/dist/react/hooks/useKbI18n.d.ts +1 -1
  89. package/dist/react/hooks/useKbLanguage.d.ts +1 -1
  90. package/dist/react/hooks/useKbSearch.d.ts +1 -1
  91. package/dist/react/hooks/useMdxContent.d.ts +1 -1
  92. package/dist/react/index.d.ts +15 -15
  93. package/dist/react/provider.d.ts +2 -2
  94. package/dist/react/server/index.d.ts +2 -2
  95. package/dist/vue/components/KbAccessGate.vue.d.ts +4 -1
  96. package/dist/vue/components/KbAccessGate.vue.js +42 -32
  97. package/dist/vue/components/KbArticleCard.vue.d.ts +3 -1
  98. package/dist/vue/components/KbArticleCard.vue.js +67 -39
  99. package/dist/vue/components/KbMdxContent.vue2.js +6 -7
  100. package/dist/vue/composables/useArticles.d.ts +1 -1
  101. package/dist/vue/composables/useImageRenderer.d.ts +1 -1
  102. package/dist/vue/composables/useKbAuth.d.ts +1 -1
  103. package/dist/vue/composables/useKbClient.d.ts +1 -1
  104. package/dist/vue/composables/useKbComments.d.ts +1 -1
  105. package/dist/vue/composables/useKbI18n.d.ts +1 -1
  106. package/dist/vue/composables/useKbLanguage.d.ts +1 -1
  107. package/dist/vue/composables/useNavigation.d.ts +1 -1
  108. package/dist/vue/composables/useSearch.d.ts +1 -1
  109. package/dist/vue/composables/useTags.d.ts +1 -1
  110. package/dist/vue/index.d.ts +19 -19
  111. package/dist/vue/plugin.d.ts +4 -4
  112. package/package.json +15 -5
  113. package/src/consultations/channel-text.ts +168 -0
  114. package/src/consultations/index.ts +87 -0
  115. package/src/consultations/messages.cs.ts +175 -0
  116. package/src/consultations/messages.en.ts +171 -0
  117. package/src/consultations/messages.ts +91 -0
  118. package/src/consultations/outcome.ts +278 -0
  119. package/src/consultations/public-config.ts +246 -0
  120. package/src/consultations/reader.ts +281 -0
  121. package/src/consultations/routes.ts +341 -0
  122. package/src/consultations/server/client-ip.ts +106 -0
  123. package/src/consultations/server/contact.ts +267 -0
  124. package/src/consultations/server/context.ts +403 -0
  125. package/src/consultations/server/cookie.ts +129 -0
  126. package/src/consultations/server/env.ts +66 -0
  127. package/src/consultations/server/http.ts +148 -0
  128. package/src/consultations/server/index.ts +55 -0
  129. package/src/consultations/server/origin.ts +71 -0
  130. package/src/consultations/server/server.ts +322 -0
  131. package/src/consultations/server/session.ts +414 -0
  132. package/src/consultations/server/transport.ts +196 -0
  133. package/src/consultations/server/turnstile.ts +98 -0
  134. package/src/consultations/site.ts +183 -0
  135. package/src/consultations/submit-new.ts +266 -0
  136. package/src/core/auth.ts +1 -1
  137. package/src/core/client.ts +32 -1
  138. package/src/core/errors.ts +5 -2
  139. package/src/core/index.ts +3 -0
  140. package/src/core/queries.ts +56 -0
  141. package/src/core/translations/cs.json +2 -1
  142. package/src/core/translations/en.json +2 -1
  143. package/src/core/types.ts +51 -0
  144. package/src/core/view-model.ts +18 -0
  145. package/src/vue/components/KbAccessGate.vue +14 -1
  146. package/src/vue/components/KbArticleCard.vue +25 -0
  147. package/dist/_virtual/constants.js +0 -4
  148. package/dist/_virtual/index.js +0 -2
  149. package/dist/_virtual/index2.js +0 -4
  150. package/dist/_virtual/index3.js +0 -2
  151. package/dist/_virtual/re.js +0 -4
  152. package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +0 -8
  153. package/dist/node_modules/@braintree/sanitize-url/dist/index.js +0 -60
  154. package/dist/node_modules/dompurify/dist/purify.es.js +0 -662
  155. package/dist/node_modules/semver/classes/comparator.js +0 -56
  156. package/dist/node_modules/semver/classes/range.js +0 -148
  157. package/dist/node_modules/semver/classes/semver.js +0 -169
  158. package/dist/node_modules/semver/functions/clean.js +0 -14
  159. package/dist/node_modules/semver/functions/cmp.js +0 -39
  160. package/dist/node_modules/semver/functions/coerce.js +0 -33
  161. package/dist/node_modules/semver/functions/compare-build.js +0 -14
  162. package/dist/node_modules/semver/functions/compare-loose.js +0 -11
  163. package/dist/node_modules/semver/functions/compare.js +0 -11
  164. package/dist/node_modules/semver/functions/diff.js +0 -24
  165. package/dist/node_modules/semver/functions/eq.js +0 -11
  166. package/dist/node_modules/semver/functions/gt.js +0 -11
  167. package/dist/node_modules/semver/functions/gte.js +0 -11
  168. package/dist/node_modules/semver/functions/inc.js +0 -21
  169. package/dist/node_modules/semver/functions/lt.js +0 -11
  170. package/dist/node_modules/semver/functions/lte.js +0 -11
  171. package/dist/node_modules/semver/functions/major.js +0 -11
  172. package/dist/node_modules/semver/functions/minor.js +0 -11
  173. package/dist/node_modules/semver/functions/neq.js +0 -11
  174. package/dist/node_modules/semver/functions/parse.js +0 -21
  175. package/dist/node_modules/semver/functions/patch.js +0 -11
  176. package/dist/node_modules/semver/functions/prerelease.js +0 -14
  177. package/dist/node_modules/semver/functions/rcompare.js +0 -11
  178. package/dist/node_modules/semver/functions/rsort.js +0 -11
  179. package/dist/node_modules/semver/functions/satisfies.js +0 -18
  180. package/dist/node_modules/semver/functions/sort.js +0 -11
  181. package/dist/node_modules/semver/functions/valid.js +0 -14
  182. package/dist/node_modules/semver/index.js +0 -97
  183. package/dist/node_modules/semver/internal/constants.js +0 -28
  184. package/dist/node_modules/semver/internal/debug.js +0 -8
  185. package/dist/node_modules/semver/internal/identifiers.js +0 -18
  186. package/dist/node_modules/semver/internal/lrucache.js +0 -32
  187. package/dist/node_modules/semver/internal/parse-options.js +0 -10
  188. package/dist/node_modules/semver/internal/re.js +0 -32
  189. package/dist/node_modules/semver/ranges/gtr.js +0 -11
  190. package/dist/node_modules/semver/ranges/intersects.js +0 -11
  191. package/dist/node_modules/semver/ranges/ltr.js +0 -11
  192. package/dist/node_modules/semver/ranges/max-satisfying.js +0 -22
  193. package/dist/node_modules/semver/ranges/min-satisfying.js +0 -22
  194. package/dist/node_modules/semver/ranges/min-version.js +0 -42
  195. package/dist/node_modules/semver/ranges/outside.js +0 -44
  196. package/dist/node_modules/semver/ranges/simplify.js +0 -24
  197. package/dist/node_modules/semver/ranges/subset.js +0 -94
  198. package/dist/node_modules/semver/ranges/to-comparators.js +0 -11
  199. package/dist/node_modules/semver/ranges/valid.js +0 -17
  200. package/dist/packages/mdx-schema/dist/composables/useMdxParsing.js +0 -389
  201. package/dist/packages/mdx-schema/dist/metadata/index.js +0 -526
  202. package/dist/packages/mdx-schema/dist/prepareProps.js +0 -46
  203. package/dist/packages/mdx-schema/dist/styles/index.js +0 -147
  204. package/dist/packages/mdx-schema/dist/tripmap.js +0 -101
  205. package/dist/packages/mdx-schema/dist/types/index.js +0 -26
  206. package/dist/packages/sanitize/dist/html.js +0 -89
  207. /package/dist/{packages/tripmap-core/node_modules → node_modules}/maplibre-gl/dist/maplibre-gl-shared.js +0 -0
  208. /package/dist/{packages/tripmap-core/node_modules → node_modules}/maplibre-gl/dist/maplibre-gl.js +0 -0
@@ -1,147 +0,0 @@
1
- const t = {
2
- /**
3
- * `not-prose` is load-bearing: every host puts the article inside Tailwind Typography's
4
- * `.prose` (both blogs, md-editor, the article-review MCP app), whose `img { margin: 2em 0 }`
5
- * / `li` / `ol` rules would otherwise leak into the facade strip — an 80 px thumb pushed
6
- * 32 px down inside an overflow-hidden 80 px tile (seen in the claude.ai preview, 2026-09-06).
7
- */
8
- container: "not-prose my-6 flex flex-col gap-3 rounded-xl border border-gray-200 bg-white p-3",
9
- head: "text-sm font-medium text-gray-700 m-0",
10
- /**
11
- * Sized wrapper that hosts BOTH the engine div and the facade overlay.
12
- * The engine host must be a plain absolutely-positioned child that the
13
- * framework never re-patches (a reactive class binding on the engine's
14
- * own container would clobber the classes the engine adds to it).
15
- */
16
- mapWrap: "relative w-full overflow-hidden rounded-lg",
17
- /** detail="panel": engine-owned photo panel host below the map box (empty until a photo is picked). */
18
- detailHost: "w-full",
19
- mapOverlay: "absolute inset-0",
20
- mapBox: "flex h-full w-full items-center justify-center overflow-hidden rounded-lg bg-gray-100",
21
- mapHint: "text-sm text-gray-500",
22
- strip: "flex gap-2 overflow-x-auto pb-1 m-0 p-0 list-none",
23
- stripItem: "h-20 w-20 flex-none overflow-hidden rounded-lg bg-gray-100",
24
- stripImg: "block h-full w-full object-cover",
25
- stopList: "flex flex-col gap-0.5 text-sm text-gray-700 m-0 p-0 list-none",
26
- stopTime: "mr-2 tabular-nums text-gray-500",
27
- note: "text-xs text-gray-400 m-0"
28
- }, a = {
29
- base: "inline-flex items-center justify-center font-medium border transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
30
- size: {
31
- sm: "px-2.5 py-1 text-sm rounded",
32
- md: "px-4 py-2 text-sm rounded-md",
33
- lg: "px-5 py-2.5 text-base rounded-md"
34
- },
35
- variantColor: {
36
- solid: {
37
- primary: "bg-blue-600 text-white hover:bg-blue-700 border-transparent",
38
- neutral: "bg-gray-800 text-white hover:bg-gray-900 border-transparent",
39
- success: "bg-emerald-600 text-white hover:bg-emerald-700 border-transparent",
40
- warning: "bg-amber-500 text-white hover:bg-amber-600 border-transparent",
41
- error: "bg-red-600 text-white hover:bg-red-700 border-transparent"
42
- },
43
- outline: {
44
- primary: "border-blue-600 text-blue-700 hover:bg-blue-50",
45
- neutral: "border-gray-400 text-gray-800 hover:bg-gray-50",
46
- success: "border-emerald-600 text-emerald-700 hover:bg-emerald-50",
47
- warning: "border-amber-500 text-amber-700 hover:bg-amber-50",
48
- error: "border-red-600 text-red-700 hover:bg-red-50"
49
- },
50
- soft: {
51
- primary: "bg-blue-50 text-blue-700 hover:bg-blue-100 border-transparent",
52
- neutral: "bg-gray-100 text-gray-800 hover:bg-gray-200 border-transparent",
53
- success: "bg-emerald-50 text-emerald-700 hover:bg-emerald-100 border-transparent",
54
- warning: "bg-amber-50 text-amber-700 hover:bg-amber-100 border-transparent",
55
- error: "bg-red-50 text-red-700 hover:bg-red-100 border-transparent"
56
- },
57
- ghost: {
58
- primary: "text-blue-700 hover:bg-blue-50 border-transparent",
59
- neutral: "text-gray-800 hover:bg-gray-100 border-transparent",
60
- success: "text-emerald-700 hover:bg-emerald-50 border-transparent",
61
- warning: "text-amber-700 hover:bg-amber-50 border-transparent",
62
- error: "text-red-700 hover:bg-red-50 border-transparent"
63
- },
64
- link: {
65
- primary: "text-blue-700 hover:underline border-transparent bg-transparent",
66
- neutral: "text-gray-800 hover:underline border-transparent bg-transparent",
67
- success: "text-emerald-700 hover:underline border-transparent bg-transparent",
68
- warning: "text-amber-700 hover:underline border-transparent bg-transparent",
69
- error: "text-red-700 hover:underline border-transparent bg-transparent"
70
- }
71
- }
72
- }, o = {
73
- base: "inline-flex items-center px-2 py-0.5 text-xs font-medium border rounded-full",
74
- variantColor: {
75
- solid: {
76
- primary: "bg-blue-600 text-white border-transparent",
77
- neutral: "bg-gray-700 text-white border-transparent",
78
- success: "bg-emerald-600 text-white border-transparent",
79
- warning: "bg-amber-500 text-white border-transparent",
80
- error: "bg-red-600 text-white border-transparent"
81
- },
82
- soft: {
83
- primary: "bg-blue-100 text-blue-800 border-transparent",
84
- neutral: "bg-gray-100 text-gray-700 border-transparent",
85
- success: "bg-emerald-100 text-emerald-800 border-transparent",
86
- warning: "bg-amber-100 text-amber-800 border-transparent",
87
- error: "bg-red-100 text-red-800 border-transparent"
88
- },
89
- outline: {
90
- primary: "border-blue-500 text-blue-700",
91
- neutral: "border-gray-400 text-gray-700",
92
- success: "border-emerald-500 text-emerald-700",
93
- warning: "border-amber-500 text-amber-700",
94
- error: "border-red-500 text-red-700"
95
- }
96
- }
97
- }, n = {
98
- base: "mdx-alert flex gap-3 rounded-md border px-4 py-3 text-sm",
99
- severity: {
100
- info: { wrap: "bg-blue-50 border-blue-200 text-blue-900", icon: "lucide:info", iconClass: "text-blue-600" },
101
- success: { wrap: "bg-emerald-50 border-emerald-200 text-emerald-900", icon: "lucide:check-circle-2", iconClass: "text-emerald-600" },
102
- warning: { wrap: "bg-amber-50 border-amber-200 text-amber-900", icon: "lucide:alert-triangle", iconClass: "text-amber-600" },
103
- error: { wrap: "bg-red-50 border-red-200 text-red-900", icon: "lucide:alert-octagon", iconClass: "text-red-600" }
104
- }
105
- }, b = {
106
- default: {
107
- base: "callout my-6 p-4 rounded-lg border-l-4",
108
- type: {
109
- info: { bg: "bg-blue-50", border: "border-blue-500", text: "text-blue-900", iconColor: "text-blue-500" },
110
- warning: { bg: "bg-yellow-50", border: "border-yellow-500", text: "text-yellow-900", iconColor: "text-yellow-500" },
111
- tip: { bg: "bg-green-50", border: "border-green-500", text: "text-green-900", iconColor: "text-green-500" },
112
- danger: { bg: "bg-red-50", border: "border-red-500", text: "text-red-900", iconColor: "text-red-500" }
113
- }
114
- },
115
- minimal: {
116
- base: "callout my-6 p-4 rounded border",
117
- type: {
118
- info: { bg: "bg-blue-50", border: "border-blue-200", text: "text-blue-800" },
119
- warning: { bg: "bg-yellow-50", border: "border-yellow-200", text: "text-yellow-800" },
120
- tip: { bg: "bg-green-50", border: "border-green-200", text: "text-green-800" },
121
- danger: { bg: "bg-red-50", border: "border-red-200", text: "text-red-800" }
122
- }
123
- },
124
- /** SVG path data for the `default` variant icon, keyed by callout type. */
125
- iconPaths: {
126
- info: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
127
- warning: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",
128
- tip: "M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z",
129
- danger: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
130
- }
131
- };
132
- function l(e) {
133
- const r = e.aspectRatio || "1";
134
- return r === "auto" ? { tileStyle: {}, mediaStyle: {}, mediaSizeClass: "w-full h-auto" } : {
135
- tileStyle: { aspectRatio: r },
136
- mediaStyle: { objectFit: e.fit || "cover", objectPosition: e.position || "center" },
137
- mediaSizeClass: "w-full h-full"
138
- };
139
- }
140
- export {
141
- n as alertStyles,
142
- o as badgeStyles,
143
- a as buttonStyles,
144
- b as calloutStyles,
145
- l as galleryTileLayout,
146
- t as tripMapStyles
147
- };
@@ -1,101 +0,0 @@
1
- const b = "420px";
2
- function u(o) {
3
- return (o ?? "").split(",").map((t) => t.trim()).filter(Boolean);
4
- }
5
- function f(o) {
6
- let t = o;
7
- if (typeof t == "string")
8
- try {
9
- t = JSON.parse(t);
10
- } catch {
11
- return typeof console < "u" && console.warn('[TripMap] `nodes` prop is not valid JSON — use quoted keys: [{"lat":49.3,"lng":16.3}]'), [];
12
- }
13
- return Array.isArray(t) ? t.filter((n) => !!n && typeof n == "object" && typeof n.lat == "number" && typeof n.lng == "number") : [];
14
- }
15
- function v(o) {
16
- const t = /T(\d{2}):(\d{2})/.exec(o);
17
- return t ? `${t[1]}:${t[2]}` : "";
18
- }
19
- function x(o, t) {
20
- const n = new URLSearchParams();
21
- t?.language && n.set("lang", t.language);
22
- const a = u(o.slugs);
23
- if (a.length > 0)
24
- return n.set("slugs", a.join(",")), `/api/media/geo?${n.toString()}`;
25
- if (t?.filename) {
26
- n.set("article", t.filename);
27
- const r = u(o.exclude);
28
- return r.length > 0 && n.set("exclude", r.join(",")), t.previewToken && n.set("preview", t.previewToken), `/api/media/geo?${n.toString()}`;
29
- }
30
- const i = n.toString();
31
- return i ? `/api/media/geo?${i}` : "/api/media/geo";
32
- }
33
- function y(o) {
34
- return (o ?? "").toLowerCase().startsWith("cs") ? {
35
- hint: "Interaktivní mapa výletu",
36
- empty: "Žádná z fotek nemá zveřejněnou polohu.",
37
- unavailable: "Mapa se zobrazí na publikovaném webu."
38
- } : {
39
- hint: "Interactive trip map",
40
- empty: "No photos with public location data.",
41
- unavailable: "The map is shown on the published page."
42
- };
43
- }
44
- function T(o) {
45
- return (o ?? "").toLowerCase().startsWith("cs") ? {
46
- play: "Přehrát trasu",
47
- stop: "Zastavit",
48
- fullscreen: "Celá obrazovka",
49
- exitFullscreen: "Ukončit celou obrazovku",
50
- export: "Export trasy",
51
- exportGpx: "Stáhnout GPX",
52
- exportGpxHint: "hodinky, Garmin, Strava, Komoot",
53
- openInMapy: "Otevřít v Mapy.com",
54
- openInGoogleMaps: "Otevřít v Google Maps",
55
- lightboxClose: "Zavřít",
56
- lightboxPrev: "Předchozí fotka",
57
- lightboxNext: "Další fotka",
58
- zoomImage: "Zobrazit na celou obrazovku"
59
- } : void 0;
60
- }
61
- const c = (o) => `/api/media/thumb/${encodeURIComponent(o)}?width=192`, g = /^(\d{4}-\d{2}-\d{2})[Tt ](\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)$/, h = (o) => {
62
- if (typeof o != "string" || !o)
63
- return null;
64
- const t = g.exec(o.trim()), n = Date.parse(t ? `${t[1]}T${t[2]}Z` : o);
65
- return Number.isNaN(n) ? null : n;
66
- };
67
- function m(o) {
68
- const t = [], n = [];
69
- for (const a of o) {
70
- const i = h(a.capturedAt);
71
- i === null ? n.push(a) : t.push({ item: a, t: i });
72
- }
73
- return t.sort((a, i) => a.t - i.t), [...t.map((a) => a.item), ...n];
74
- }
75
- function M(o, t) {
76
- const n = (t?.media ?? []).filter((e) => !!e.slug), a = new Map(n.map((e) => [e.slug, e])), i = u(o.slugs), r = new Set(u(o.exclude));
77
- let s, p;
78
- i.length > 0 ? (p = i.map((e) => {
79
- const l = a.get(e);
80
- return { slug: e, src: l?.thumbnailUrl || c(e), alt: l?.altText ?? "" };
81
- }), s = i.map((e) => a.get(e)).filter((e) => !!e)) : (s = m(n.filter((e) => !r.has(e.slug))), p = s.map((e) => ({ slug: e.slug, src: e.thumbnailUrl || c(e.slug), alt: e.altText ?? "" })));
82
- const d = m([
83
- ...s.filter((e) => e.placeName).map((e) => ({ key: `m:${e.slug}`, title: e.placeName, capturedAt: e.capturedAt ?? void 0 })),
84
- ...f(o.nodes).map((e, l) => ({
85
- key: `n:${e.id || l}`,
86
- title: e.title || `${e.lat}, ${e.lng}`,
87
- capturedAt: e.capturedAt
88
- }))
89
- ]);
90
- return { thumbs: p, stops: d };
91
- }
92
- export {
93
- b as TRIPMAP_DEFAULT_HEIGHT,
94
- x as buildTripMapGeoUrl,
95
- f as parseTripMapHandNodes,
96
- u as splitTripMapList,
97
- M as tripMapFacade,
98
- v as tripMapFormatTime,
99
- T as tripMapPlaybackLabels,
100
- y as tripMapUiTexts
101
- };
@@ -1,26 +0,0 @@
1
- function n(e) {
2
- return e.kind === "propRename";
3
- }
4
- function r(e) {
5
- return e.kind === "enumValueRename";
6
- }
7
- function t(e) {
8
- return e.kind === "propRemoved";
9
- }
10
- function u(e) {
11
- return e.kind === "propBecameRequired";
12
- }
13
- function i(e) {
14
- return e.kind === "defaultChangeAccepted";
15
- }
16
- function o(e) {
17
- return e.kind === "componentStructureChange";
18
- }
19
- export {
20
- o as isComponentStructureChangeEntry,
21
- i as isDefaultChangeAcceptedEntry,
22
- r as isEnumValueRenameEntry,
23
- u as isPropBecameRequiredEntry,
24
- t as isPropRemovedEntry,
25
- n as isPropRenameEntry
26
- };
@@ -1,89 +0,0 @@
1
- import u from "../../../node_modules/dompurify/dist/purify.es.js";
2
- let n, r, s = 0;
3
- const a = Number(process.env.SANITIZE_RECYCLE_AFTER_CALLS ?? 500);
4
- function A() {
5
- const t = r;
6
- n = void 0, r = void 0, s = 0;
7
- try {
8
- t?.close?.();
9
- } catch {
10
- }
11
- }
12
- function d() {
13
- if (n)
14
- return n;
15
- if (typeof window < "u" && typeof window.document < "u")
16
- n = u;
17
- else {
18
- const { JSDOM: t } = require("jsdom"), e = new t("");
19
- r = e.window, n = u(e.window);
20
- }
21
- return S(n), _(n), n;
22
- }
23
- function S(t) {
24
- t.addHook("afterSanitizeAttributes", (e) => {
25
- e.tagName === "A" && e.getAttribute("target") === "_blank" && e.setAttribute("rel", "noopener noreferrer");
26
- });
27
- }
28
- const m = /* @__PURE__ */ new Set([
29
- "width",
30
- "height",
31
- "min-width",
32
- "min-height",
33
- "max-width",
34
- "max-height",
35
- "aspect-ratio",
36
- "object-fit"
37
- ]);
38
- function p(t) {
39
- return t.length > 0 && t.length <= 40 && /^[a-z0-9.%/\s-]+$/i.test(t) && !/url|expression|\\/i.test(t);
40
- }
41
- function w(t) {
42
- const e = [];
43
- for (const i of t.split(";")) {
44
- const o = i.indexOf(":");
45
- if (o < 0)
46
- continue;
47
- const l = i.slice(0, o).trim().toLowerCase(), f = i.slice(o + 1).trim();
48
- m.has(l) && p(f) && e.push(`${l}:${f}`);
49
- }
50
- return e.join(";");
51
- }
52
- function _(t) {
53
- t.addHook("afterSanitizeAttributes", (e) => {
54
- if (!e.hasAttribute("style"))
55
- return;
56
- const i = w(e.getAttribute("style") || "");
57
- i ? e.setAttribute("style", i) : e.removeAttribute("style");
58
- });
59
- }
60
- const c = {
61
- USE_PROFILES: { html: !0 },
62
- ADD_ATTR: ["target", "rel"],
63
- FORBID_TAGS: ["style", "form", "input", "iframe"],
64
- FORBID_ATTR: ["style", "formaction"],
65
- SANITIZE_NAMED_PROPS: !0,
66
- ALLOW_DATA_ATTR: !1
67
- };
68
- function T(t, e = c) {
69
- r && s >= a && A();
70
- const i = d();
71
- return s++, i.sanitize(t, e);
72
- }
73
- ({
74
- // Derive from STRICT_CONFIG so its security posture — and any FUTURE hardening (a new
75
- // FORBID_TAGS/FORBID_ATTR entry) — propagates to this higher-risk host boundary automatically.
76
- // ADD_ATTR is overridden outright (it restates STRICT_CONFIG's target/rel + adds the two
77
- // structural attrs the overlay anchors on). FORBID_ATTR is overridden to DROP `style` from
78
- // the forbid list (keeping only `formaction`): DOMPurify then lets `style` through, and the
79
- // shared `installStyleAllowlistHook` narrows it to the SIZING-only allowlist — so a customer
80
- // renderer's intrinsic sizing (icon width/height) survives, while nothing that can overlay or
81
- // reflow the contained host does, and customer JS still cannot run. STRICT_CONFIG (blog
82
- // content) keeps `style` forbidden, so this exception is scoped to the embed host only.
83
- ...c
84
- });
85
- export {
86
- c as STRICT_CONFIG,
87
- d as getPurifier,
88
- T as sanitizeHtml
89
- };