Skip to content

Releases: Destrokhen-main/Orve-npm

v0.26.4

23 Jun 17:22
9efab9d

Choose a tag to compare

v0.26.4 (#71)

* RefA Fragment (#65)

* init

* added type

* init

* fix

* remove comment

* fix removeNode

* fix bugs

* 0.26.0

* edit readmee

* 0.26.1

* fix watch

* 0.26.2

* fix oif context

* 0.26.3

* refA - watch --fix

* 0.26.4

v0.26.0

15 Jun 20:27
a6d3093

Choose a tag to compare

Now you can use "fragment" in "forList"

v0.25.0

12 Jun 19:39
1d432d6

Choose a tag to compare

EN:

forList no longer has a generic render, but can be used in different places. (But just how children)

RU:

forList теперь не имеет общий рендер, а может использоваться в различных местах. (Но только как children)

Example / Пример:

function Component() {
  const array = ref([1,2,3]);

  return (
    <div>
      <div>Block - 1</div>
      {
        array.forList((e) => {
          return <div>{ e + 2 }</div> // <div>3</div><div>4</div><div>5</div>
        })
      }

      <div>Block - 2</div>
      {
        array.forList((e) => {
          return <div>{ e * 2 }</div> // <div>2</div><div>4</div><div>6</div>
        })
      }
    </div>
  )
}

RU:
У вас есть возможность зарегистрировать глобальный компонент.

EN:
You have the option to register a global bean.

Пример / Example :

import { globalComponent } from "orve"

true (created) | false = globalComponent(name: string, function: () => OrveNode)

EN:
Register components before "createApp" is called

After you can use the component in the application

RU:
Регистрируйте компоненты до того как будет вызван "createApp"

После вы сможете использовать компонент в приложение


RU:

Добавляет возможность отслеживать типы Props.

[name props]: {
  type: Тип props (Object, String, Number, Function, Boolean, Array). Если необходимо несколько [Object, String, Number]
  required: true | false. default - false
  default: Если указали false в required, обязательно нужно заполнить это поле. Если там true, то можно заполнять, а можно пропустить. Для типов Object и Array необходимо вернуть функцию () => {} в остальном можно указывать данные без функций.
 }

EN:

Adds the ability to keep track of Props types.

[name props]: {
   type: props type (Object, String, Number, Function, Boolean, Array). If multiple [Object, String, Number] are needed
   required: true | false. default - false
   default: If false is specified in required, this field must be filled in. If there is true, then you can fill in, or you can skip. For Object and Array types, you must return the function () => {} otherwise, you can specify data without functions.
  }

Example / Пример:

const Component = ({...}) => {
  return (
    <div>...</div>
  )
}

const DefinedComp = defineProps(Component, {
  r: {
    type: [Object, String, Number],
    required: true,
    default: () => ""
  },
  call: {
    type: Function,
    required: false,
    default: () => { console.log("test") }
  },
  t: {
    type: Array,
    required: false,
    default: () => []
  },
  m: {
    type: Object,
    required: false,
    default: () => ({})
  }
})

function App() {
  return (
    <DefinedComp  />
  )
}

v0.24.0

08 Jun 16:40

Choose a tag to compare

EN

  • User can get context from orve directly
  • Rewritten types
  • Strict mode enabled (but there is a lot of any type in the code)
  • Started work with the refO function.
  • The refA function now supports pop shift unshift splice, the ability to reassign a new array
  • [BETA] Added new function createAppRoot. It will allow you not to write in each component import orve from "orve"

RU

  • Пользователь может получить контекст из orve напрямую
  • Переписаны типы
  • Включен строгий режим (но в коде много типа any)
  • Начата работа с функцией refO.
  • Функция refA теперь поддерживает pop shift unshift splice, возможность переназначить новый массив
  • [BETA] Добавлена новая функция createAppRoot. Она позволит вам не писать в каждом компоненте import orve from "orve"

createAppRoot

// index.js

import orve from "orve"; 
import App from "./App";

orve.createAppRoot(<App />).mount("#app");

then you can write component without import orve from "orve"

ref().formate

RU
Добавлена возможность у ref вызывать formate. Данная функция, вернёт объект форматирования.
Пример:

function Component() {
  const react = ref(1);

  return <div id={react.formate((e) => e + 3)} >{r.formate((e) => e + 1)}</div>
}

Результат

<div id="4" >2</div>

formate может работать с событиями по типу, onclick и всеми ивентами, которые принимают в себя функцию.

function Component() {
  const react = ref(1);

  return (
    <div onClick={r.formate((e) => {
      if (e === 1) return () => { console.log("One")}
      return () => { console.log("Two") }
    })}>text</div>
  )
}

EN
Added the ability for ref to call format. This function will return a formatting object.
Example:

function Component() {
  const react = ref(1);

  return <div id={react.formate((e) => e + 3)} >{r.formate((e) => e + 1)}</div>
}

Result

<div id="4" >2</div>

format can work with events by type, onclick and all events that accept a function.

function Component() {
  const react = ref(1);

  return (
    <div onClick={r.formate((e) => {
      if (e === 1) return () => { console.log("One")}
      return () => { console.log("Two") }
    })}>text</div>
  )
}

v0.23.0

07 Apr 19:15
f1cf88d

Choose a tag to compare

fixed vite support. Minor bugs fixed

v0.22.6

06 Mar 10:30

Choose a tag to compare

Correct mistakes

if it adds refO to the array, then now there will be no error

v0.22.5

04 Mar 13:39
ae29a6a

Choose a tag to compare

  • o-html
  • first version hooks unmounted

v0.22.3

24 Jan 06:21

Choose a tag to compare

Full Changelog: v0.22.2...v0.22.3

v0.22.2

24 Jan 06:03

Choose a tag to compare

fix some bugs

What's Changed

Full Changelog: v0.22.1...v0.22.2

v0.22.1

23 Jan 21:47

Choose a tag to compare

added oif