@skhema/embed 0.1.8 → 0.1.10

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 (40) hide show
  1. package/README.md +55 -0
  2. package/dist/components/SkhemaComponent.d.ts +0 -1
  3. package/dist/components/SkhemaComponent.d.ts.map +1 -1
  4. package/dist/components/SkhemaElement.d.ts.map +1 -1
  5. package/dist/embed.min.js +1 -1
  6. package/dist/embed.min.js.map +1 -1
  7. package/dist/index-DBeyneZT.cjs +215 -0
  8. package/dist/index-DBeyneZT.cjs.map +1 -0
  9. package/dist/index-jwx5CXLB.js +216 -0
  10. package/dist/index-jwx5CXLB.js.map +1 -0
  11. package/dist/index.cjs +113 -668
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.es.js +83 -637
  14. package/dist/index.es.js.map +1 -1
  15. package/dist/render/index.d.ts +55 -0
  16. package/dist/render/index.d.ts.map +1 -0
  17. package/dist/render.cjs +7 -0
  18. package/dist/render.cjs.map +1 -0
  19. package/dist/render.d.ts +2 -0
  20. package/dist/render.es.js +7 -0
  21. package/dist/render.es.js.map +1 -0
  22. package/dist/styles/design-tokens.d.ts +32 -4
  23. package/dist/styles/design-tokens.d.ts.map +1 -1
  24. package/dist/tokens.cjs +16 -0
  25. package/dist/tokens.cjs.map +1 -0
  26. package/dist/tokens.d.ts +17 -0
  27. package/dist/tokens.d.ts.map +1 -0
  28. package/dist/tokens.es.js +16 -0
  29. package/dist/tokens.es.js.map +1 -0
  30. package/dist/utils/color.d.ts +25 -0
  31. package/dist/utils/color.d.ts.map +1 -0
  32. package/dist/utils/sanitization.d.ts +7 -1
  33. package/dist/utils/sanitization.d.ts.map +1 -1
  34. package/dist/validation-DCw9rQeH.cjs +176 -0
  35. package/dist/validation-DCw9rQeH.cjs.map +1 -0
  36. package/dist/validation-Dt4L_df8.js +177 -0
  37. package/dist/validation-Dt4L_df8.js.map +1 -0
  38. package/package.json +20 -7
  39. package/dist/utils/author-attribution.d.ts +0 -16
  40. package/dist/utils/author-attribution.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skhema/embed",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "Embeddable component for integrating strategic elements with Skhema.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.es.js",
@@ -20,6 +20,18 @@
20
20
  "require": "./dist/index.cjs",
21
21
  "default": "./dist/index.es.js"
22
22
  },
23
+ "./tokens": {
24
+ "types": "./dist/tokens.d.ts",
25
+ "import": "./dist/tokens.es.js",
26
+ "require": "./dist/tokens.cjs",
27
+ "default": "./dist/tokens.es.js"
28
+ },
29
+ "./render": {
30
+ "types": "./dist/render.d.ts",
31
+ "import": "./dist/render.es.js",
32
+ "require": "./dist/render.cjs",
33
+ "default": "./dist/render.es.js"
34
+ },
23
35
  "./cdn": {
24
36
  "types": "./dist/cdn.d.ts",
25
37
  "import": "./dist/embed.min.js"
@@ -39,8 +51,8 @@
39
51
  "lint:fix": "eslint . --fix",
40
52
  "format": "prettier --write .",
41
53
  "format:check": "prettier --check .",
42
- "test": "echo \"No tests configured yet\"",
43
- "test:watch": "echo \"No tests configured yet\"",
54
+ "test": "vitest run",
55
+ "test:watch": "vitest",
44
56
  "check": "npm run typecheck && npm run lint && npm run format:check",
45
57
  "check:fix": "npm run format && npm run lint:fix",
46
58
  "preview": "vite preview",
@@ -58,11 +70,11 @@
58
70
  "author": "Skhema Team",
59
71
  "license": "MIT",
60
72
  "dependencies": {
61
- "@skhema/types": "1.2.2"
73
+ "@skhema/types": "2.5.0"
62
74
  },
63
75
  "devDependencies": {
64
- "@skhema/eslint-config": "^1.0.1",
65
- "@skhema/prettier-config": "^1.0.0",
76
+ "@skhema/linter": "2.2.0",
77
+ "@skhema/prettier-config": "1.0.0",
66
78
  "@types/node": "^20.0.0",
67
79
  "eslint": "^9.29.0",
68
80
  "prettier": "^3.3.3",
@@ -70,7 +82,8 @@
70
82
  "terser": "^5.0.0",
71
83
  "typescript": "^5.0.0",
72
84
  "vite": "^7.0.0",
73
- "vite-plugin-dts": "^4.0.0"
85
+ "vite-plugin-dts": "^4.0.0",
86
+ "vitest": "^4.0.17"
74
87
  },
75
88
  "publishConfig": {
76
89
  "registry": "https://registry.npmjs.org/"
@@ -1,16 +0,0 @@
1
- /**
2
- * Resolve author display from element attributes.
3
- * Prefer author-name; contributor-name is deprecated.
4
- */
5
- export interface AuthorAttribution {
6
- authorName: string;
7
- authorSlug?: string;
8
- }
9
- export declare function readAuthorAttribution(element: HTMLElement): AuthorAttribution | null;
10
- /**
11
- * Footer HTML: "By {authorName}", linked when authorSlug is set.
12
- */
13
- export declare function formatAuthorAttributionHtml(authorName: string, authorSlug?: string): string;
14
- export declare function formatContributorIdFallback(contributorId: string): string;
15
- export declare function resolveAuthorFooterHtml(element: HTMLElement, contributorId: string): string;
16
- //# sourceMappingURL=author-attribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"author-attribution.d.ts","sourceRoot":"","sources":["../../src/utils/author-attribution.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,GACnB,iBAAiB,GAAG,IAAI,CAY1B;AAUD;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAMR;AAED,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAKzE;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,MAAM,GACpB,MAAM,CASR"}