ziko 0.0.7 → 0.0.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ziko",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "a versatile JavaScript library offering a rich set of UI components, advanced mathematical utilities,Reactivity,animations,client side routing and graphics capabilities",
5
5
  "keywords": [
6
6
  "Zikojs",
@@ -1,26 +0,0 @@
1
- # Overview
2
- react-ziko is a tool designed for rendering [ziko](https://github.com/zakarialaoui10/ziko.js) elements within a React application.
3
-
4
- # Install
5
- ```bash
6
- npm i react-ziko
7
- ```
8
- # Usage
9
- ```jsx
10
- import ZikoUI from "react-ziko";
11
- import { text } from "ziko";
12
- const ui = text("Hello World").style({
13
- color:"darkblue"
14
- });
15
- export default function App() {
16
- return (
17
- <main>
18
- <ZikoUI ui={ui.render(false)} />
19
- </main>
20
- );
21
- }
22
-
23
- ```
24
- # Dependencies
25
- - [React](https://react.dev/) :
26
- - [Zikojs](https://github.com/zakarialaoui10/ziko.js) :
@@ -1,22 +0,0 @@
1
- import React, { useRef, useEffect } from "react";
2
- import {ZikoUIElement} from "ziko";
3
- /**
4
- * A React component for rendering ZikoUIElement.
5
- * @param {Object} props - Component props.
6
- * @param {ZikoUIElement} props.ui - The ZikoUIElement to render.
7
- * @returns {JSX.Element} JSX representation of the ZikoUI component.
8
- */
9
- function ZikoUI({ ui }) {
10
- const containerRef = useRef(null);
11
- useEffect(() => {
12
- globalThis.__Ziko__.__Config__.setDefault({render:false})
13
- if (containerRef.current && ui && ui instanceof ZikoUIElement) {
14
- containerRef.current.innerHTML = "";
15
- containerRef.current.appendChild(ui.element);
16
- }
17
- }, [ui]);
18
- return (
19
- <ziko-ui ref={containerRef} data-engine="ziko"></ziko-ui>
20
- );
21
- }
22
- export default ZikoUI;
@@ -1,15 +0,0 @@
1
- <ziko-ui bind:this={containerRef} data-engine="ziko"></ziko-ui>
2
-
3
- <script>
4
- import { onMount } from 'svelte';
5
- import {ZikoUIElement} from "ziko";
6
- let containerRef;
7
-
8
- onMount(() => {
9
- if (containerRef && ui instanceof ZikoUIElement) {
10
- containerRef.innerHTML = "";
11
- containerRef.appendChild(ui.element);
12
- }
13
- });
14
- export let ui;
15
- </script>
@@ -1,23 +0,0 @@
1
- <template>
2
- <ziko-ui ref="containerRef" data-engine="ziko"></ziko-ui>
3
- </template>
4
- <script>
5
- import {ZikoUIElement} from "ziko"
6
- export default {
7
- props: {
8
- ui: Object
9
- },
10
- mounted() {
11
- //globalThis.__Ziko__.__Config__.setDefault({render:false})
12
- if (this.$refs.containerRef && this.ui instanceof ZikoUIElement) {
13
- this.$refs.containerRef.innerHTML = "";
14
- this.$refs.containerRef.appendChild(this.ui.render(false).element);
15
- }
16
- }
17
- };
18
- </script>
19
- <style scoped>
20
- ziko-ui{
21
- display:block;
22
- }
23
- </style>