opentwig 1.1.0 → 1.1.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.
Files changed (46) hide show
  1. package/AGENTS.md +49 -200
  2. package/package.json +2 -3
  3. package/src/live-ui/editor.js +1 -0
  4. package/src/live-ui/sidebar.js +2 -0
  5. package/src/utils/favicon.js +20 -0
  6. package/src/utils/loadConfig.js +3 -1
  7. package/src/utils/setupWatcher.js +2 -2
  8. package/src/utils/startLiveServer.js +11 -8
  9. package/theme/default/index.js +2 -0
  10. package/vitest.config.js +19 -10
  11. package/website/README.md +42 -0
  12. package/website/components.json +16 -0
  13. package/website/eslint.config.js +36 -0
  14. package/website/package-lock.json +4136 -0
  15. package/website/package.json +41 -0
  16. package/website/shadcn-svelte.md +118 -0
  17. package/website/src/app.d.ts +13 -0
  18. package/website/src/lib/components/ui/badge/badge.svelte +50 -0
  19. package/website/src/lib/components/ui/badge/index.ts +2 -0
  20. package/website/src/lib/components/ui/button/button.svelte +82 -0
  21. package/website/src/lib/components/ui/button/index.ts +17 -0
  22. package/website/src/lib/components/ui/card/card-action.svelte +20 -0
  23. package/website/src/lib/components/ui/card/card-content.svelte +15 -0
  24. package/website/src/lib/components/ui/card/card-description.svelte +20 -0
  25. package/website/src/lib/components/ui/card/card-footer.svelte +20 -0
  26. package/website/src/lib/components/ui/card/card-header.svelte +23 -0
  27. package/website/src/lib/components/ui/card/card-title.svelte +20 -0
  28. package/website/src/lib/components/ui/card/card.svelte +23 -0
  29. package/website/src/lib/components/ui/card/index.ts +25 -0
  30. package/website/src/lib/components/ui/separator/index.ts +7 -0
  31. package/website/src/lib/components/ui/separator/separator.svelte +21 -0
  32. package/website/src/lib/components/ui/tooltip/index.ts +19 -0
  33. package/website/src/lib/components/ui/tooltip/tooltip-content.svelte +52 -0
  34. package/website/src/lib/components/ui/tooltip/tooltip-portal.svelte +7 -0
  35. package/website/src/lib/components/ui/tooltip/tooltip-provider.svelte +7 -0
  36. package/website/src/lib/components/ui/tooltip/tooltip-trigger.svelte +7 -0
  37. package/website/src/lib/components/ui/tooltip/tooltip.svelte +7 -0
  38. package/website/src/lib/index.ts +1 -0
  39. package/website/src/lib/utils.ts +13 -0
  40. package/website/src/routes/+layout.svelte +23 -0
  41. package/website/src/routes/+page.server.ts +82 -0
  42. package/website/src/routes/+page.svelte +892 -0
  43. package/website/static/robots.txt +3 -0
  44. package/website/svelte.config.js +31 -0
  45. package/website/vite.config.ts +5 -0
  46. package/test-og.js +0 -40
@@ -0,0 +1,3 @@
1
+ # allow crawling everything by default
2
+ User-agent: *
3
+ Disallow:
@@ -0,0 +1,31 @@
1
+ import adapter from '@sveltejs/adapter-static';
2
+ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
3
+
4
+ /** @type {import('@sveltejs/kit').Config} */
5
+ const config = {
6
+ preprocess: vitePreprocess(),
7
+ kit: {
8
+ adapter: adapter({
9
+ pages: 'build',
10
+ assets: 'build',
11
+ precompress: false,
12
+ strict: true
13
+ }),
14
+ paths: {
15
+ base: ''
16
+ },
17
+ prerender: {
18
+ entries: ['*'],
19
+ handleHttpError: ({ path, referrer, message }) => {
20
+ // Ignore warnings about external links
21
+ if (message.includes('Not found')) {
22
+ console.warn(`Warning: ${path} not found (referrer: ${referrer})`);
23
+ return;
24
+ }
25
+ throw new Error(message);
26
+ }
27
+ }
28
+ }
29
+ };
30
+
31
+ export default config;
@@ -0,0 +1,5 @@
1
+ import tailwindcss from '@tailwindcss/vite';
2
+ import { sveltekit } from '@sveltejs/kit/vite';
3
+ import { defineConfig } from 'vite';
4
+
5
+ export default defineConfig({ plugins: [tailwindcss(), sveltekit()] });
package/test-og.js DELETED
@@ -1,40 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- const render = require('./theme/default');
5
-
6
- const sample = {
7
- title: 'A <Title> & Test "Quote"',
8
- url: 'https://example.com/page?arg=1&other=<bad>',
9
- name: "O'Connor & Co <dev>",
10
- content: 'This is a description with <tags> & special "characters" and \'quotes\'.',
11
- avatar: null,
12
- links: [],
13
- footerLinks: [],
14
- share: {}
15
- };
16
-
17
- const out = render(sample);
18
- const outPath = path.join(__dirname, 'test-output.html');
19
- fs.writeFileSync(outPath, out);
20
- console.log('Wrote', outPath);
21
-
22
- // Basic assertions
23
- function assertContainsEscaped(haystack, raw, escaped) {
24
- if (haystack.includes(raw)) {
25
- throw new Error(`Found unescaped string: ${raw}`);
26
- }
27
- if (!haystack.includes(escaped)) {
28
- throw new Error(`Did not find escaped string: ${escaped}`);
29
- }
30
- }
31
-
32
- // Check several values
33
- assertContainsEscaped(out, '<Title>', '&lt;Title&gt;');
34
- // URL should have ampersand escaped and angle brackets escaped
35
- assertContainsEscaped(out, '&other=<bad>', '&amp;other=&lt;bad&gt;');
36
- assertContainsEscaped(out, "O'Connor", "O&#39;Connor");
37
- assertContainsEscaped(out, '"Quote"', '&quot;Quote&quot;');
38
- assertContainsEscaped(out, "<tags>", '&lt;tags&gt;');
39
-
40
- console.log('All assertions passed.');