mdzjs 0.0.1 → 0.0.2

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 (52) hide show
  1. package/README.md +70 -56
  2. package/__src__/index.js +2 -0
  3. package/__src__/test.js +21 -0
  4. package/{v2/test.js → __v2__/_test.js} +1 -1
  5. package/__v2__/clean.js +67 -0
  6. package/__v2__/hast.js +70 -0
  7. package/__v2__/html2js.js +59 -0
  8. package/__v2__/pre-parse/clean-md.js +93 -0
  9. package/__v2__/test.js +19 -0
  10. package/{v2 → __v2__}/transpiler/index.js +17 -12
  11. package/__v2__/utils/is-object.js +11 -0
  12. package/__v2__/utils/split-between.js +47 -0
  13. package/package.json +12 -6
  14. package/preview/Components/Dom.js +6 -0
  15. package/preview/index.html +10 -1
  16. package/preview/main.js +8 -17
  17. package/preview/package-lock.json +712 -8
  18. package/preview/package.json +6 -2
  19. package/preview/test.mdz +27 -49
  20. package/preview/vite.config.js +1 -1
  21. package/src/bundlers/vite.js +15 -0
  22. package/src/example.md +3 -0
  23. package/src/index.js +1 -2
  24. package/src/test.js +45 -17
  25. package/src/transpiler/index.js +3 -0
  26. package/src/transpiler/parser.js +14 -0
  27. package/src/transpiler/process.js +172 -0
  28. package/src/transpiler/transpile.js +22 -0
  29. package/src/utils/component-type.js +5 -0
  30. package/src/utils/hyperscript.js +4 -0
  31. package/src/utils/index.js +4 -0
  32. package/src/utils/parse-yml.js +19 -0
  33. package/src/utils/process-attributes.js +13 -0
  34. package/v2/pre-parse/clean-md.js +0 -93
  35. /package/{src → __src__}/converter/index.js +0 -0
  36. /package/{src → __src__}/parser/get-component-type.js +0 -0
  37. /package/{src → __src__}/parser/index.js +0 -0
  38. /package/{src → __src__}/parser/jsx2js.js +0 -0
  39. /package/{src → __src__}/parser/parser-markdown.js +0 -0
  40. /package/{src → __src__}/parser/smart-join.js +0 -0
  41. /package/{src → __src__}/vite/index.js +0 -0
  42. /package/{v2 → __v2__}/index.js +0 -0
  43. /package/{v2 → __v2__}/readme.md +0 -0
  44. /package/{v2 → __v2__}/transformers/vite/index.js +0 -0
  45. /package/{v2 → __v2__}/transpiler/get-component-type.js +0 -0
  46. /package/{v2 → __v2__}/transpiler/import-plugin.js +0 -0
  47. /package/{v2 → __v2__}/transpiler/jsx2js.js +0 -0
  48. /package/{v2 → __v2__}/transpiler/process-text.js +0 -0
  49. /package/preview/{Hi.js → Components/Hi.js} +0 -0
  50. /package/preview/{InteractiveBlock.js → Components/InteractiveBlock.js} +0 -0
  51. /package/preview/{Scene.js → Components/Scene.js} +0 -0
  52. /package/preview/{__main2.js → __main2.js.txt} +0 -0
@@ -0,0 +1,6 @@
1
+ export const Dom=({text, color})=>{
2
+ const element = document.createElement("p")
3
+ element.innerText = text;
4
+ element.style.color = color;
5
+ return element;
6
+ }
@@ -10,7 +10,16 @@
10
10
  rel="stylesheet"
11
11
  />
12
12
  <link href="https://fonts.cdnfonts.com/css/cheeronsta" rel="stylesheet">
13
-
13
+ <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css"> -->
14
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/monokai.css">
15
+
16
+ <style>
17
+ pre{
18
+ background : #282b2e;
19
+ padding : 10px;
20
+ color : white
21
+ }
22
+ </style>
14
23
  <!-- <style>
15
24
  body{
16
25
  font-family: "Gloria Hallelujah", cursive;
package/preview/main.js CHANGED
@@ -1,18 +1,9 @@
1
- // import { useTitle } from "ziko"
2
- // import UI,{attributes} from "./test.mdz"
3
- // const {title, background} = attributes
4
- // title && useTitle(title)
5
- // UI().style({
6
- // border : "2px darkblue solid",
7
- // width : "70%",
8
- // margin : "auto",
9
- // padding : "10px",
10
- // fontFamily : "Cheeronsta",
11
- // background : background ?? "orange"
12
- // }).vertical(-1, "space-around")
13
- // console.log(1)
1
+ import { useTitle } from "ziko"
14
2
  import UI,{title} from "./test.mdz"
15
- globalThis.app =UI().vertical(-1, 0).style({border :"1px darkblue solid"}).style({
16
- padding : "15px"
17
- })
18
- console.log(app)
3
+ title && useTitle(title)
4
+ UI({name : "from MDZjs"})
5
+ .vertical(-1, 0)
6
+ .style({
7
+ border :"1px darkblue solid",
8
+ padding : "15px",
9
+ })