alytus-ff 0.1.2 → 0.1.3

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.
@@ -0,0 +1,4 @@
1
+
2
+ import PageTitle from '../src/components/Page/PageTitle.vue'
3
+
4
+ export { PageTitle }
@@ -0,0 +1,32 @@
1
+ import { defineComponent as a, openBlock as c, createElementBlock as p, createElementVNode as s, toDisplayString as i, renderSlot as l } from "vue";
2
+ const u = a({
3
+ name: "PageTitle",
4
+ props: {
5
+ title: {
6
+ type: String,
7
+ required: !0
8
+ }
9
+ }
10
+ }), d = (t, e) => {
11
+ const n = t.__vccOpts || t;
12
+ for (const [o, r] of e)
13
+ n[o] = r;
14
+ return n;
15
+ }, f = { class: "mt-6 mb-3 ec-page-title" }, _ = { class: "text-h5 font-weight-bold" };
16
+ function m(t, e, n, o, r, g) {
17
+ return c(), p("div", f, [
18
+ s("span", _, i(t.title), 1),
19
+ s("div", null, [
20
+ l(t.$slots, "buttons")
21
+ ])
22
+ ]);
23
+ }
24
+ const b = /* @__PURE__ */ d(u, [["render", m]]), y = (t) => {
25
+ if (typeof t == "object") return t;
26
+ const e = t.substr(0, 10).split("-");
27
+ return new Date(parseInt(e[0], 10), parseInt(e[1], 10) - 1, e.length <= 2 ? 1 : parseInt(e[2], 10));
28
+ };
29
+ export {
30
+ b as PageTitle,
31
+ y as parseSysDate
32
+ };
@@ -0,0 +1 @@
1
+ (function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n["Alytus-FF"]={},n.Vue))})(this,function(n,e){"use strict";const c=e.defineComponent({name:"PageTitle",props:{title:{type:String,required:!0}}}),a=(t,o)=>{const s=t.__vccOpts||t;for(const[r,i]of o)s[r]=i;return s},p={class:"mt-6 mb-3 ec-page-title"},l={class:"text-h5 font-weight-bold"};function d(t,o,s,r,i,m){return e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("span",l,e.toDisplayString(t.title),1),e.createElementVNode("div",null,[e.renderSlot(t.$slots,"buttons")])])}const f=a(c,[["render",d]]),u=t=>{if(typeof t=="object")return t;const o=t.substr(0,10).split("-");return new Date(parseInt(o[0],10),parseInt(o[1],10)-1,o.length<=2?1:parseInt(o[2],10))};n.PageTitle=f,n.parseSysDate=u,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- h1[data-v-69b3121f]{color:#42b9ff}
1
+ .ec-page-title,.ec-page-subtitle{display:flex;justify-content:space-between;align-items:center}.ec-page-title .v-btn,.ec-page-subtitle .v-btn{text-transform:unset;letter-spacing:.045em}
package/index.ts CHANGED
@@ -1,10 +1,3 @@
1
- // index.js
2
-
3
- // Import the Vue component
4
- import MyComponent from './src/components/Page/MyComponent.vue';
5
-
6
- // Export it as the default export (optional)
7
- // export default MyComponent;
8
-
9
- // Alternatively, you can use named exports
10
- export { MyComponent };
1
+ import './src/styles/main.scss'
2
+ export * from './components';
3
+ export * from './utils';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "alytus-ff",
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "description": "Frontend framework",
6
6
  "main": "index.ts",
7
7
  "types": "index.d.ts",
@@ -19,6 +19,8 @@
19
19
  "@types/node": "^22.5.0",
20
20
  "@vitejs/plugin-vue": "^5.1.2",
21
21
  "@vue/compiler-sfc": "^3.4.38",
22
+ "sass": "^1.77.8",
23
+ "sass-loader": "^16.0.1",
22
24
  "typescript": "^5.5.4",
23
25
  "vite": "^5.4.2"
24
26
  }
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <div class="mt-6 mb-3 ec-page-title">
3
+ <span class="text-h5 font-weight-bold">{{ title }}</span>
4
+ <div><slot name="buttons"></slot></div>
5
+ </div>
6
+ </template>
7
+
8
+ <script lang="ts">
9
+ import {defineComponent} from "vue";
10
+
11
+ export default defineComponent({
12
+ name: "PageTitle",
13
+ props: {
14
+ title: {
15
+ type: String,
16
+ required: true
17
+ }
18
+ }
19
+ })
20
+ </script>
@@ -0,0 +1,12 @@
1
+
2
+ .ec-page-title, .ec-page-subtitle {
3
+ display: flex;
4
+ justify-content: space-between;
5
+ align-items: center;
6
+
7
+ .v-btn {
8
+ text-transform: unset;
9
+ letter-spacing: 0.045em;
10
+ }
11
+ }
12
+
@@ -0,0 +1 @@
1
+ @import "Page";
@@ -0,0 +1,6 @@
1
+
2
+ export const parseSysDate = (d_str: string) => {
3
+ if (typeof(d_str) === "object") return d_str;
4
+ const arr = d_str.substr(0, 10).split("-");
5
+ return new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, arr.length <= 2 ? 1 : parseInt(arr[2], 10));
6
+ }
package/utils/index.ts ADDED
@@ -0,0 +1,4 @@
1
+
2
+ import {parseSysDate} from "../src/utils/date"
3
+
4
+ export { parseSysDate }
package/vite.config.ts CHANGED
@@ -5,9 +5,9 @@ export default defineConfig({
5
5
  plugins: [vue()],
6
6
  build: {
7
7
  lib: {
8
- entry: './index.ts', // Make sure this points to your TypeScript entry point
9
- name: 'MyComponent',
10
- fileName: (format) => `my-component.${format}.js`
8
+ entry: './index.ts',
9
+ name: 'Alytus-FF',
10
+ fileName: (format) => `alytus-ff.${format}.js`,
11
11
  },
12
12
  rollupOptions: {
13
13
  external: ['vue'],
@@ -1,29 +0,0 @@
1
- import { defineComponent as l, openBlock as i, createElementBlock as s, createElementVNode as p, toDisplayString as c } from "vue";
2
- const a = l({
3
- name: "MyComponent",
4
- props: {
5
- title: {
6
- type: String,
7
- default: "Hello World"
8
- },
9
- description: {
10
- type: String,
11
- default: "This is a Vue component."
12
- }
13
- }
14
- }), d = (e, n) => {
15
- const t = e.__vccOpts || e;
16
- for (const [o, r] of n)
17
- t[o] = r;
18
- return t;
19
- };
20
- function f(e, n, t, o, r, m) {
21
- return i(), s("div", null, [
22
- p("h1", null, c(e.title), 1),
23
- p("p", null, c(e.description), 1)
24
- ]);
25
- }
26
- const _ = /* @__PURE__ */ d(a, [["render", f], ["__scopeId", "data-v-69b3121f"]]);
27
- export {
28
- _ as MyComponent
29
- };
@@ -1 +0,0 @@
1
- (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.MyComponent={},t.Vue))})(this,function(t,e){"use strict";const s=e.defineComponent({name:"MyComponent",props:{title:{type:String,default:"Hello World"},description:{type:String,default:"This is a Vue component."}}}),d=(n,i)=>{const o=n.__vccOpts||n;for(const[p,r]of i)o[p]=r;return o};function c(n,i,o,p,r,f){return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("h1",null,e.toDisplayString(n.title),1),e.createElementVNode("p",null,e.toDisplayString(n.description),1)])}const l=d(s,[["render",c],["__scopeId","data-v-69b3121f"]]);t.MyComponent=l,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
@@ -1,31 +0,0 @@
1
- <!-- MyComponent.vue -->
2
- <template>
3
- <div>
4
- <h1>{{ title }}</h1>
5
- <p>{{ description }}</p>
6
- </div>
7
- </template>
8
-
9
- <script lang="ts">
10
- import {defineComponent} from "vue";
11
-
12
- export default defineComponent({
13
- name: "MyComponent",
14
- props: {
15
- title: {
16
- type: String,
17
- default: 'Hello World'
18
- },
19
- description: {
20
- type: String,
21
- default: 'This is a Vue component.'
22
- }
23
- }
24
- })
25
- </script>
26
-
27
- <style scoped>
28
- h1 {
29
- color: #42b9ff;
30
- }
31
- </style>