@ui0/core 0.0.0-stage → 0.1.1

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/dist/app.module.css +1 -0
  2. package/dist/components/app/app.keys.d.ts +4 -0
  3. package/dist/components/app/app.keys.d.ts.map +1 -0
  4. package/dist/components/app/app.spec.d.ts +2 -0
  5. package/dist/components/app/app.spec.d.ts.map +1 -0
  6. package/dist/components/app/app.types.d.ts +13 -0
  7. package/dist/components/app/app.types.d.ts.map +1 -0
  8. package/dist/components/app/app.vue.d.ts +29 -0
  9. package/dist/components/app/app.vue.d.ts.map +1 -0
  10. package/dist/components/slot/index.d.ts +2 -0
  11. package/dist/components/slot/index.d.ts.map +1 -0
  12. package/dist/components/slot/slot.d.ts +8 -0
  13. package/dist/components/slot/slot.d.ts.map +1 -0
  14. package/dist/components.d.ts +16 -0
  15. package/dist/components.d.ts.map +1 -0
  16. package/dist/config.d.ts +18 -0
  17. package/dist/config.d.ts.map +1 -0
  18. package/dist/defaults.d.ts +35 -0
  19. package/dist/defaults.d.ts.map +1 -0
  20. package/dist/defaults.spec.d.ts +10 -0
  21. package/dist/defaults.spec.d.ts.map +1 -0
  22. package/dist/index.d.ts +9 -0
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +112 -0
  25. package/dist/instance.d.ts +10 -0
  26. package/dist/instance.d.ts.map +1 -0
  27. package/dist/keys.d.ts +4 -0
  28. package/dist/keys.d.ts.map +1 -0
  29. package/dist/plugin.d.ts +12 -0
  30. package/dist/plugin.d.ts.map +1 -0
  31. package/dist/style-text.js +2 -0
  32. package/dist/style.css +2 -0
  33. package/dist/style.d.ts +22 -0
  34. package/dist/style.d.ts.map +1 -0
  35. package/dist/style.spec.d.ts +2 -0
  36. package/dist/style.spec.d.ts.map +1 -0
  37. package/dist/ui0.config.d.ts +3 -0
  38. package/dist/ui0.config.d.ts.map +1 -0
  39. package/package.json +33 -4
  40. package/README.md +0 -3
@@ -0,0 +1 @@
1
+ @value app: ap_a172;
@@ -0,0 +1,4 @@
1
+ import { InjectionKey } from 'vue';
2
+ import { AppData } from './app.types';
3
+ export declare const AppKey: InjectionKey<AppData>;
4
+ //# sourceMappingURL=app.keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.keys.d.ts","sourceRoot":"","sources":["../../../src/components/app/app.keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAA;AAEvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,eAAO,MAAM,MAAM,EAA4B,YAAY,CAAC,OAAO,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=app.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.spec.d.ts","sourceRoot":"","sources":["../../../src/components/app/app.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ export interface AppProps {
2
+ /** Optional heading rendered above the default slot. */
3
+ title?: string;
4
+ name: string;
5
+ }
6
+ export interface AppData {
7
+ name: string;
8
+ id?: number;
9
+ }
10
+ export interface AppActions {
11
+ restart: () => void;
12
+ }
13
+ //# sourceMappingURL=app.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.types.d.ts","sourceRoot":"","sources":["../../../src/components/app/app.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IAEZ,EAAE,CAAC,EAAE,MAAM,CAAA;CAEZ;AACD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB"}
@@ -0,0 +1,29 @@
1
+ import { AppActions, AppProps } from './app.types';
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ };
6
+ __VLS_StyleModules: {
7
+ $style: Record<string, string> & __VLS_PrettifyGlobal<{} & {
8
+ "module": string;
9
+ } & {
10
+ "app": string;
11
+ } & {
12
+ "app": string;
13
+ }>;
14
+ };
15
+ };
16
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
17
+ declare const __VLS_base: import('vue').DefineComponent<AppProps, AppActions, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AppProps> & Readonly<{}>, {
18
+ title: string;
19
+ name: string;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_WithSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
29
+ //# sourceMappingURL=app.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.vue.d.ts","sourceRoot":"","sources":["../../../src/components/app/app.vue"],"names":[],"mappings":"AAQA;AA4DE,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AA4CzD,QAAA,MAAM,cAAc;;kBAeN,CAAC,KAAK,IAAgB,KAAK,GAAG;;;gBAbpC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,oBAAoB,CAAC,EAAE,GACrD;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,GACpB;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,GACjB;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;;CAiBpB,CAAC;AACF,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,aAAa,CAAC,CAAC;AAGpE,QAAA,MAAM,UAAU;;;6EAId,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './slot';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/slot/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { VNode } from 'vue';
2
+ declare const _default: import('vue').DefineComponent<{}, () => VNode<import('vue').RendererNode, import('vue').RendererElement, {
3
+ [key: string]: any;
4
+ }> | VNode<import('vue').RendererNode, import('vue').RendererElement, {
5
+ [key: string]: any;
6
+ }>[], {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
7
+ export default _default;
8
+ //# sourceMappingURL=slot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../../src/components/slot/slot.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,KAAK,EACX,MAAM,KAAK,CAAA;;;;;;AAkBZ,wBAuBE"}
@@ -0,0 +1,16 @@
1
+ import { AppProps } from './components/app/app.types';
2
+ export interface Ui0ComponentsProps {
3
+ app: AppProps;
4
+ }
5
+ export interface Ui0ComponentsDefaults {
6
+ }
7
+ export interface Ui0ComponentsOptions {
8
+ }
9
+ export interface Ui0ComponentsTokens {
10
+ }
11
+ export interface Ui0Components {
12
+ app: {
13
+ props: AppProps;
14
+ };
15
+ }
16
+ //# sourceMappingURL=components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAE1D,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,QAAQ,CAAA;CACd;AACD,MAAM,WAAW,qBAAqB;CAAG;AACzC,MAAM,WAAW,oBAAoB;CAAG;AACxC,MAAM,WAAW,mBAAmB;CAAG;AACvC,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE;QACH,KAAK,EAAE,QAAQ,CAAA;KAChB,CAAA;CACF"}
@@ -0,0 +1,18 @@
1
+ /** A component's static config body: Partial<Defaults> plus options. */
2
+ export type ComponentConfig<N extends keyof Ui0ComponentsDefaults = keyof Ui0ComponentsDefaults> = Partial<Ui0ComponentsDefaults[N]> & {
3
+ /** Component options; free-form until the component declares its options
4
+ * interface in the Ui0ComponentOptions registry. */
5
+ options?: N extends keyof Ui0ComponentOptions ? Ui0ComponentOptions[N] : Record<string, unknown>;
6
+ };
7
+ /**
8
+ * Declares the component's static config and freezes it (the config is
9
+ * static by contract). The name pins the config to a registered component -
10
+ * an unknown name or a key outside the component's Defaults contract fails
11
+ * at compile time.
12
+ *
13
+ * @param name - the component's kebab-case registry name
14
+ * @param config - local default values plus component options
15
+ * @returns the frozen config, ready for useComponentDefaults()
16
+ */
17
+ export declare function defineComponentConfig<N extends keyof Ui0ComponentsDefaults>(name: N, config: ComponentConfig<N>): Readonly<ComponentConfig<N>>;
18
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAQA,wEAAwE;AACxE,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,qBAAqB,GAAG,MAAM,qBAAqB,IAAI,OAAO,CACxG,qBAAqB,CAAC,CAAC,CAAC,CACzB,GAAG;IACF;wDACoD;IACpD,OAAO,CAAC,EAAE,CAAC,SAAS,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjG,CAAA;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACzE,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,GACzB,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAG9B"}
@@ -0,0 +1,35 @@
1
+ import { Ui0CoreInstance } from '@ui0/types';
2
+ /**
3
+ * The `config.components[name]` slice of a core instance (undefined when the
4
+ * app runs without a core/config or the component has no configured defaults).
5
+ *
6
+ * @param name - the component's kebab-case registry name
7
+ * @param core - the current core instance (or undefined outside a host)
8
+ * @returns the configured defaults record for the component, if any
9
+ */
10
+ export declare function getComponentDefaults<N extends keyof Ui0ComponentsDefaults>(name: N, core: Ui0CoreInstance | undefined): Ui0ComponentsDefaults[N] | undefined;
11
+ /**
12
+ * The read-through cascade: every access to a key answers
13
+ * `props[key] ?? config[key] ?? local[key]`. Implemented as a proxy so Vue's
14
+ * prop reactivity is tracked on each read inside an effect, and so newly
15
+ * added keys never need a re-merge.
16
+ *
17
+ * @param props - the component's resolved props
18
+ * @param config - the configured defaults slice (may be undefined)
19
+ * @param local - the component's own fallback values
20
+ * @returns a Defaults-shaped view over the cascade
21
+ */
22
+ export declare function createDefaultsProxy<N extends keyof Ui0ComponentsDefaults>(props: object, config: Partial<Ui0ComponentsDefaults[N]> | undefined, local: Partial<Ui0ComponentsDefaults[N]>): NonNullable<Ui0ComponentsDefaults[N]>;
23
+ /**
24
+ * Setup-time helper: injects the core instance, reads the component's
25
+ * configured defaults and returns the cascading defaults view. Replaces
26
+ * `withDefaults()` for keys the config is allowed to override - keep purely
27
+ * local fallbacks (and props the config must not touch) in `withDefaults()`.
28
+ *
29
+ * @param name - the component's kebab-case registry name
30
+ * @param props - the component's resolved props
31
+ * @param local - the component's own fallback values (the former withDefaults)
32
+ * @returns the Defaults-shaped cascade view
33
+ */
34
+ export declare function useComponentDefaults<N extends keyof Ui0ComponentsDefaults>(name: N, props: object, local?: Partial<Ui0ComponentsDefaults[N]>): NonNullable<Ui0ComponentsDefaults[N]>;
35
+ //# sourceMappingURL=defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAMjD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACxE,IAAI,EAAE,CAAC,EACP,IAAI,EAAE,eAAe,GAAG,SAAS,GAChC,qBAAqB,CAAC,CAAC,CAAC,GAAG,SAAS,CAEtC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACvE,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,EACrD,KAAK,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,GACvC,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAUvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACxE,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAM,GAC5C,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAMvC"}
@@ -0,0 +1,10 @@
1
+ declare global {
2
+ interface Ui0ComponentsDefaults {
3
+ 'test-cmp'?: {
4
+ title: string;
5
+ layout?: string;
6
+ };
7
+ }
8
+ }
9
+ export {};
10
+ //# sourceMappingURL=defaults.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.spec.d.ts","sourceRoot":"","sources":["../src/defaults.spec.ts"],"names":[],"mappings":"AAaA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAChD;CACF"}
@@ -0,0 +1,9 @@
1
+ export { default as App } from './components/app/app.vue';
2
+ export { default as Slot } from './components/slot/slot';
3
+ export type { AppProps } from './components/app/app.types';
4
+ export { createUi0 } from './plugin';
5
+ export { defineComponentConfig } from './config';
6
+ export type { ComponentConfig } from './config';
7
+ export { createDefaultsProxy, getComponentDefaults, useComponentDefaults } from './defaults';
8
+ export type * from './components';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,wBAAwB,CAAA;AACxD,YAAY,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAChD,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAE5F,mBAAmB,cAAc,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,112 @@
1
+ import { Comment as e, Fragment as t, cloneVNode as n, createElementBlock as r, defineComponent as i, mergeProps as a, normalizeClass as o, openBlock as s, renderSlot as c } from "vue";
2
+ import { injectHost as l, provideHost as u } from "@ui0/composable";
3
+ // src/instance.ts
4
+ var d = class {
5
+ plugins;
6
+ config;
7
+ vue;
8
+ constructor(e) {
9
+ this.plugins = {}, e && (this.config = e);
10
+ }
11
+ setVue(e) {
12
+ this.vue = e;
13
+ }
14
+ }, f = Symbol("ui0-core"), p = {}, m = Symbol("ui0-app-key"), h = /*#__PURE__*/ ((e, t) => {
15
+ let n = e.__vccOpts || e;
16
+ for (let [e, r] of t) n[e] = r;
17
+ return n;
18
+ })(/* @__PURE__ */ i({
19
+ __name: "app",
20
+ props: {
21
+ title: { default: "" },
22
+ name: { default: "" }
23
+ },
24
+ setup(e, { expose: t }) {
25
+ let n = e;
26
+ if (!l(f)) {
27
+ let e = new d(p);
28
+ u(f, e);
29
+ }
30
+ return u(m, { name: n.name ?? "" }), t({ restart() {
31
+ return console.log("restart");
32
+ } }), (e, t) => (s(), r("div", {
33
+ class: o(e.$style.app),
34
+ "data-0": "app"
35
+ }, [c(e.$slots, "default")], 2));
36
+ }
37
+ }), [["__cssModules", { $style: { app: "ap_a172" } }]]);
38
+ // src/components/slot/slot.ts
39
+ function g(t) {
40
+ return t.type === e;
41
+ }
42
+ var _ = i({
43
+ name: "ui0-slot",
44
+ inheritAttrs: !1,
45
+ props: {},
46
+ setup(e, { slots: r, attrs: i }) {
47
+ return console.log(e, i), () => {
48
+ let o = r.default?.() ?? [], s = (o.length === 1 && o[0].type === t ? o[0].children ?? [] : o).filter((e) => !g(e));
49
+ return s.length === 1 ? n(s[0], a(e, i), !0) : o;
50
+ };
51
+ }
52
+ }), v = "data-ui0-core";
53
+ function y(e, t = document) {
54
+ if (typeof document > "u" || !e.trim()) return null;
55
+ let n = `style[${v}]`, r = t.head.querySelector(n);
56
+ if (r) return r;
57
+ let i = t.createElement("style");
58
+ return i.setAttribute(v, ""), i.textContent = e, t.head.appendChild(i), i;
59
+ }
60
+ async function b(e = document) {
61
+ let t;
62
+ try {
63
+ let e = await import(
64
+ /* @vite-ignore */
65
+ "./style-text.js"
66
+ );
67
+ t = String(e.default ?? "");
68
+ } catch {
69
+ return;
70
+ }
71
+ y(t, e);
72
+ }
73
+ // src/plugin.ts
74
+ function x(e) {
75
+ let t = new d(e), n = [];
76
+ function r(e, n) {
77
+ t && "install" in e && e.install(t, n);
78
+ }
79
+ function i(e) {
80
+ for (b(), e.provide(f, t), t.setVue(e), e.config.globalProperties.$ui0 = t; n.length;) {
81
+ let [e, t] = n.shift() || [];
82
+ e && r(e, t);
83
+ }
84
+ }
85
+ function a(e, i) {
86
+ t && t.vue ? r(e) : n.push([e, i]);
87
+ }
88
+ return {
89
+ use: a,
90
+ install: i
91
+ };
92
+ }
93
+ // src/config.ts
94
+ function S(e, t) {
95
+ return Object.freeze(t);
96
+ }
97
+ // src/defaults.ts
98
+ function C(e, t) {
99
+ return t?.config?.components?.[e];
100
+ }
101
+ function w(e, t, n) {
102
+ return new Proxy({}, { get(r, i) {
103
+ let a = e[i];
104
+ if (a !== void 0) return a;
105
+ let o = t?.[i];
106
+ return o === void 0 ? n[i] : o;
107
+ } });
108
+ }
109
+ function T(e, t, n = {}) {
110
+ return w(t, C(e, l(f)), n);
111
+ }
112
+ export { h as App, _ as Slot, w as createDefaultsProxy, x as createUi0, S as defineComponentConfig, C as getComponentDefaults, T as useComponentDefaults };
@@ -0,0 +1,10 @@
1
+ import { Ui0CoreConfig, Ui0CoreInstance } from '@ui0/types';
2
+ import { App } from 'vue';
3
+ export declare class CoreInstance implements Ui0CoreInstance {
4
+ plugins: {};
5
+ config: Ui0CoreConfig | undefined;
6
+ vue: App | undefined;
7
+ constructor(config?: Ui0CoreConfig);
8
+ setVue(app: App): void;
9
+ }
10
+ //# sourceMappingURL=instance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../src/instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,qBAAa,YAAa,YAAW,eAAe;IAC3C,OAAO,KAAA;IACP,MAAM,4BAAA;IACN,GAAG,EAAE,GAAG,GAAG,SAAS,CAAA;gBACf,MAAM,CAAC,EAAE,aAAa;IAI3B,MAAM,CAAC,GAAG,EAAE,GAAG;CAGvB"}
package/dist/keys.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { Ui0CoreInstance } from '@ui0/types';
2
+ import { InjectionKey } from 'vue';
3
+ export declare const Ui0CoreKey: InjectionKey<Ui0CoreInstance>;
4
+ //# sourceMappingURL=keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAA;AAEvC,eAAO,MAAM,UAAU,EAAyB,YAAY,CAAC,eAAe,CAAC,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { Ui0CoreConfig, Ui0CoreInstallablePlugin, Ui0CorePublicInstance } from '@ui0/types';
2
+ import { App } from 'vue';
3
+ export declare function createUi0(config: Ui0CoreConfig): {
4
+ use: (plugin: Ui0CoreInstallablePlugin, options?: any) => void;
5
+ install: (app: App) => void;
6
+ };
7
+ declare module 'vue' {
8
+ interface ComponentCustomProperties {
9
+ $ui0: Ui0CorePublicInstance;
10
+ }
11
+ }
12
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAM9B,wBAAgB,SAAS,CAAC,MAAM,EAAE,aAAa;kBA2BxB,wBAAwB,YAAY,GAAG;mBAdtC,GAAG;EAsB1B;AAED,OAAO,QAAQ,KAAK,CAAC;IACnB,UAAU,yBAAyB;QACjC,IAAI,EAAE,qBAAqB,CAAA;KAC5B;CACF"}
@@ -0,0 +1,2 @@
1
+ // generated by @ui0/core from dist/style.css - do not edit
2
+ export default "@layer theme,ui0;@layer ui0.ap_a172{.ap_a172{flex-direction:column;min-height:100dvh;display:flex}}\n/*$vite$:1*/"
package/dist/style.css ADDED
@@ -0,0 +1,2 @@
1
+ @layer theme,ui0;@layer ui0.ap_a172{.ap_a172{flex-direction:column;min-height:100dvh;display:flex}}
2
+ /*$vite$:1*/
@@ -0,0 +1,22 @@
1
+ /** marker attribute of the injected core <style> element */
2
+ export declare const CORE_STYLE_ATTR = "data-ui0-core";
3
+ /**
4
+ * Inject css into a document head as the core style element, idempotently -
5
+ * a second call finds the previously created `<style>` and returns it.
6
+ *
7
+ * @param css - the stylesheet text
8
+ * @param doc - the document to inject into (defaults to the global one)
9
+ * @returns the style element, or `null` without a DOM / empty css
10
+ */
11
+ export declare function injectCoreStyle(css: string, doc?: Document): HTMLStyleElement | null;
12
+ /**
13
+ * Load the built stylesheet (dist/style-text.js, emitted next to the bundle
14
+ * by the coreStyleAsset build plugin) and inject it. Fails silently when the
15
+ * asset is missing (un-built package / live-source mode) or there is no DOM -
16
+ * in both cases the styles arrive through another path (a manual
17
+ * '@ui0/core/style.css' import, or the consumer's own SFC pipeline).
18
+ *
19
+ * @param doc - the document to inject into (defaults to the global one)
20
+ */
21
+ export declare function ensureCoreStyle(doc?: Document): Promise<void>;
22
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAUA,4DAA4D;AAC5D,eAAO,MAAM,eAAe,kBAAkB,CAAA;AAE9C;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,GAAG,GAAE,QAAmB,GACvB,gBAAgB,GAAG,IAAI,CAWzB;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,GAAG,GAAE,QAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB7E"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=style.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.spec.d.ts","sourceRoot":"","sources":["../src/style.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { Ui0CoreConfig } from '@ui0/types';
2
+ export declare const config: Ui0CoreConfig;
3
+ //# sourceMappingURL=ui0.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui0.config.d.ts","sourceRoot":"","sources":["../src/ui0.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,eAAO,MAAM,MAAM,EAAE,aAAkB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,35 @@
1
1
  {
2
2
  "name": "@ui0/core",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "files": [
5
+ "dist"
6
+ ],
7
+ "type": "module",
8
+ "sideEffects": [
9
+ "**/*.css"
10
+ ],
11
+ "main": "./dist/index.js",
12
+ "module": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js"
18
+ },
19
+ "./style.css": "./dist/style.css",
20
+ "./app": "./dist/app.module.css",
21
+ "./app.module.css": "./dist/app.module.css"
22
+ },
23
+ "scripts": {
24
+ "core:build": "vite build",
25
+ "core:dev": "vite build --watch",
26
+ "core:typecheck": "vue-tsc --noEmit"
27
+ },
28
+ "dependencies": {
29
+ "@ui0/composable": "0.1.1",
30
+ "@ui0/types": "0.1.1"
31
+ },
32
+ "peerDependencies": {
33
+ "vue": "^3.5.45"
34
+ }
35
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.