godown 1.0.40 → 1.0.44

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 (77) hide show
  1. package/conf.ts +35 -0
  2. package/out/conf.d.ts +18 -0
  3. package/out/conf.d.ts.map +1 -0
  4. package/out/conf.js +21 -0
  5. package/out/index.d.ts +1 -1
  6. package/out/index.d.ts.map +1 -1
  7. package/out/index.js +1 -1
  8. package/out/react/items.d.ts +1 -0
  9. package/out/react/items.d.ts.map +1 -1
  10. package/out/react/items.js +5 -0
  11. package/out/react/view.d.ts +1 -0
  12. package/out/react/view.d.ts.map +1 -1
  13. package/out/react/view.js +5 -0
  14. package/out/src/deps.d.ts +3 -3
  15. package/out/src/deps.d.ts.map +1 -1
  16. package/out/src/deps.js +3 -3
  17. package/out/src/effect/std.d.ts +2 -2
  18. package/out/src/effect/std.d.ts.map +1 -1
  19. package/out/src/effect/std.js +2 -2
  20. package/out/src/glob.d.ts +1 -1
  21. package/out/src/glob.d.ts.map +1 -1
  22. package/out/src/glob.js +3 -3
  23. package/out/src/group/std.d.ts +2 -2
  24. package/out/src/group/std.d.ts.map +1 -1
  25. package/out/src/group/std.js +2 -2
  26. package/out/src/input-form/base-input.d.ts +2 -2
  27. package/out/src/input-form/base-input.d.ts.map +1 -1
  28. package/out/src/input-form/base-input.js +16 -5
  29. package/out/src/input-form/exp-input.d.ts +1 -2
  30. package/out/src/input-form/exp-input.d.ts.map +1 -1
  31. package/out/src/input-form/exp-input.js +4 -3
  32. package/out/src/input-form/label-input.d.ts +1 -2
  33. package/out/src/input-form/label-input.d.ts.map +1 -1
  34. package/out/src/input-form/label-input.js +4 -3
  35. package/out/src/input-form/search-input.d.ts +1 -1
  36. package/out/src/input-form/search-input.d.ts.map +1 -1
  37. package/out/src/input-form/search-input.js +4 -3
  38. package/out/src/input-form/select-input.d.ts +6 -6
  39. package/out/src/input-form/select-input.d.ts.map +1 -1
  40. package/out/src/input-form/select-input.js +54 -45
  41. package/out/src/input-form/split-input.d.ts +3 -1
  42. package/out/src/input-form/split-input.d.ts.map +1 -1
  43. package/out/src/input-form/split-input.js +11 -3
  44. package/out/src/input-form/std.d.ts +7 -3
  45. package/out/src/input-form/std.d.ts.map +1 -1
  46. package/out/src/input-form/std.js +18 -5
  47. package/out/src/items/base-button.js +1 -1
  48. package/out/src/items/index.d.ts +1 -0
  49. package/out/src/items/index.d.ts.map +1 -1
  50. package/out/src/items/index.js +1 -0
  51. package/out/src/items/link-a.d.ts +19 -0
  52. package/out/src/items/link-a.d.ts.map +1 -0
  53. package/out/src/items/link-a.js +96 -0
  54. package/out/src/items/std.d.ts +2 -2
  55. package/out/src/items/std.d.ts.map +1 -1
  56. package/out/src/items/std.js +2 -2
  57. package/out/src/items/super-a.d.ts +0 -2
  58. package/out/src/items/super-a.d.ts.map +1 -1
  59. package/out/src/items/super-a.js +4 -14
  60. package/out/src/layout/div-line.js +1 -1
  61. package/out/src/layout/nav-layout.d.ts.map +1 -1
  62. package/out/src/layout/nav-layout.js +16 -2
  63. package/out/src/layout/std.d.ts +2 -2
  64. package/out/src/layout/std.d.ts.map +1 -1
  65. package/out/src/layout/std.js +2 -2
  66. package/out/src/view/index.d.ts +1 -0
  67. package/out/src/view/index.d.ts.map +1 -1
  68. package/out/src/view/index.js +1 -0
  69. package/out/src/view/route-view.d.ts +33 -0
  70. package/out/src/view/route-view.d.ts.map +1 -0
  71. package/out/src/view/route-view.js +239 -0
  72. package/out/src/view/std.d.ts +2 -2
  73. package/out/src/view/std.d.ts.map +1 -1
  74. package/out/src/view/std.js +2 -2
  75. package/out/src/with.d.ts.map +1 -1
  76. package/out/src/with.js +6 -5
  77. package/package.json +2 -1
@@ -18,7 +18,7 @@ let NavLayout = class NavLayout extends STD {
18
18
  return html `<nav>
19
19
  <h1>
20
20
  <slot name="host"></slot>
21
- <a href="/">${this.host}</a>${this.subhead && html `<span style="vertical-align: text-bottom"> | </span><span>${this.subhead}</span>`}
21
+ <a href="/">${this.host}</a>${this.subhead && html `<span></span><div>${this.subhead}</div>`}
22
22
  </h1>
23
23
  <div>
24
24
  ${this.opt()}
@@ -68,8 +68,17 @@ NavLayout.styles = [STD.styles, css `:host{
68
68
  font-weight: normal;
69
69
  font-size: 1rem;
70
70
  margin: 0;
71
+ display: flex;
72
+ align-items: center;
73
+ }
74
+ h1 span{
75
+ height: 1em;
76
+ width: .1em;
77
+ background: currentColor;
78
+ margin: .24em;
71
79
  }
72
- h1>a,h1>span{
80
+ h1>*{
81
+ white-space: nowrap;
73
82
  font-size: 145%;
74
83
  }
75
84
  main{
@@ -111,6 +120,11 @@ NavLayout.styles = [STD.styles, css `:host{
111
120
  color: var(${cssvar}--text-selection);
112
121
  background: var(${cssvar}--text-selection-background);
113
122
  }
123
+ @media screen and (max-width: 540px) {
124
+ h1 a~*{
125
+ display: none;
126
+ }
127
+ }
114
128
  `];
115
129
  __decorate([
116
130
  property()
@@ -1,5 +1,5 @@
1
- import { STD } from "../deps.js";
2
- export default class LayoutSTD extends STD {
1
+ import { GLOBSTD } from "../deps.js";
2
+ export default class LayoutSTD extends GLOBSTD {
3
3
  }
4
4
  export declare const navstyle: import("lit").CSSResult;
5
5
  //# sourceMappingURL=std.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"std.d.ts","sourceRoot":"","sources":["../../../src/layout/std.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAe,MAAM,YAAY,CAAC;AAC9C,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,GAAG;CAAI;AAC9C,eAAO,MAAM,QAAQ,yBAIpB,CAAC"}
1
+ {"version":3,"file":"std.d.ts","sourceRoot":"","sources":["../../../src/layout/std.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,YAAY,CAAC;AAClD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,OAAO;CAAI;AAClD,eAAO,MAAM,QAAQ,yBAIpB,CAAC"}
@@ -1,5 +1,5 @@
1
- import { STD, css, cssvar } from "../deps.js";
2
- export default class LayoutSTD extends STD {
1
+ import { GLOBSTD, css, cssvar } from "../deps.js";
2
+ export default class LayoutSTD extends GLOBSTD {
3
3
  }
4
4
  export const navstyle = css `
5
5
  ${cssvar}--nav-text: rgb(240 240 240);
@@ -1,5 +1,6 @@
1
1
  export * from "./details-expand.js";
2
2
  export * from "./down-drop.js";
3
3
  export * from "./menu-list.js";
4
+ export * from "./route-view.js";
4
5
  export * from "./scroll-x.js";
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/view/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/view/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from "./details-expand.js";
2
2
  export * from "./down-drop.js";
3
3
  export * from "./menu-list.js";
4
+ export * from "./route-view.js";
4
5
  export * from "./scroll-x.js";
@@ -0,0 +1,33 @@
1
+ import { LitElement } from "../deps.js";
2
+ export declare class RouteView extends LitElement {
3
+ _routesSort: any[];
4
+ params: Record<string, string>;
5
+ constructor();
6
+ static: boolean;
7
+ type: "united" | "child" | "field";
8
+ baseURL: string;
9
+ path: string;
10
+ override: boolean;
11
+ compoent: any;
12
+ set routes(v: any[]);
13
+ get routes(): any[];
14
+ static styles: import("lit").CSSResult;
15
+ render(): () => any;
16
+ connectedCallback(): void;
17
+ render_united(): any;
18
+ render_slotted(): import("lit-html").TemplateResult<1>;
19
+ render_field(): any;
20
+ useRouter(): {
21
+ path: string;
22
+ params: Record<string, string>;
23
+ };
24
+ getComponent(usedRouteTemplate: string): any;
25
+ childCompoent(): import("lit-html").TemplateResult<1>;
26
+ static sortRoutesPaths(ObjectArrayIncludePath: any[]): Array<{
27
+ path: string;
28
+ }>;
29
+ static useWhichRoute(ObjectArrayIncludePath: any[], path: string, baseURL?: string): string;
30
+ static parseRouterParams(routeTemplate: string, originpath: string): Record<string, string>;
31
+ static updateAll(): void;
32
+ }
33
+ //# sourceMappingURL=route-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-view.d.ts","sourceRoot":"","sources":["../../../src/view/route-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,UAAU,EAAY,MAAM,YAAY,CAAC;AAC3E,qBACa,SAAU,SAAQ,UAAU;IACvC,WAAW,EAAE,GAAG,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;;IAKF,MAAM,UAAS;IAChC,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAY;IAC9C,OAAO,SAAO;IACd,IAAI,SAA4B;IACf,QAAQ,UAAS;IAClB,QAAQ,MAAQ;IAC5C,IAAI,MAAM,CAAC,CAAC,OAAA,EAWX;IACD,IAAI,MAAM,UAET;IACD,MAAM,CAAC,MAAM,0BAAgC;IAC7C,MAAM;IASN,iBAAiB,IAAI,IAAI;IAkBzB,aAAa;IAMb,cAAc;IAId,YAAY;IAMZ,SAAS;;;;IAMT,YAAY,CAAC,iBAAiB,EAAE,MAAM;IAOtC,aAAa;IA6Bb,MAAM,CAAC,eAAe,CAAC,sBAAsB,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;KAAE,CAAC;IA+B/E,MAAM,CAAC,aAAa,CAAC,sBAAsB,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAY;IAqBvF,MAAM,CAAC,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAoB3F,MAAM,CAAC,SAAS;CAUjB"}
@@ -0,0 +1,239 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var RouteView_1;
8
+ import { conf, css, define, html, LitElement, property } from "../deps.js";
9
+ let RouteView = RouteView_1 = class RouteView extends LitElement {
10
+ constructor() {
11
+ super();
12
+ this.static = false;
13
+ this.type = "united";
14
+ this.baseURL = "/";
15
+ this.path = window.location.pathname;
16
+ this.override = false;
17
+ this.compoent = null;
18
+ this._routesSort = [];
19
+ }
20
+ set routes(v) {
21
+ if (Object.prototype.toString.call(v) !== "[object Array]") {
22
+ this._routesSort = [];
23
+ return;
24
+ }
25
+ if (this.static) {
26
+ this._routesSort = v;
27
+ }
28
+ else {
29
+ this._routesSort = RouteView_1.sortRoutesPaths(v);
30
+ }
31
+ this.requestUpdate();
32
+ }
33
+ get routes() {
34
+ return this._routesSort;
35
+ }
36
+ render() {
37
+ if (this.type === "child") {
38
+ return () => { var _a; return (_a = this.render_slotted()) !== null && _a !== void 0 ? _a : html `<slot></slot>`; };
39
+ }
40
+ if (this.type === "field") {
41
+ return () => { var _a; return (_a = this.render_field()) !== null && _a !== void 0 ? _a : html `<slot></slot>`; };
42
+ }
43
+ return () => { var _a; return (_a = this.render_united()) !== null && _a !== void 0 ? _a : html `<slot></slot>`; };
44
+ }
45
+ connectedCallback() {
46
+ super.connectedCallback();
47
+ window.addEventListener("popstate", (e) => {
48
+ this.path = window.location.pathname;
49
+ });
50
+ if (!this.override)
51
+ return;
52
+ const self = this;
53
+ const pushHistory = history.pushState;
54
+ history.pushState = function () {
55
+ pushHistory.apply(this, arguments);
56
+ self.path = window.location.pathname;
57
+ };
58
+ const replaceHistory = history.replaceState;
59
+ history.replaceState = function () {
60
+ replaceHistory.apply(this, arguments);
61
+ self.path = window.location.pathname;
62
+ };
63
+ }
64
+ render_united() {
65
+ const slottedCompoent = this.render_slotted();
66
+ if (slottedCompoent)
67
+ return slottedCompoent;
68
+ const fieldCompoent = this.render_field();
69
+ return fieldCompoent;
70
+ }
71
+ render_slotted() {
72
+ const childCompoent = this.childCompoent();
73
+ return childCompoent;
74
+ }
75
+ render_field() {
76
+ const usedRouteTemplate = RouteView_1.useWhichRoute(this.routes, this.path);
77
+ const RouterParmasObject = RouteView_1.parseRouterParams(usedRouteTemplate, this.path);
78
+ this.params = RouterParmasObject;
79
+ return this.getComponent(usedRouteTemplate);
80
+ }
81
+ useRouter() {
82
+ return {
83
+ path: this.path,
84
+ params: this.params,
85
+ };
86
+ }
87
+ getComponent(usedRouteTemplate) {
88
+ if (!usedRouteTemplate)
89
+ return;
90
+ const route = this.routes.find((r) => r.path === usedRouteTemplate);
91
+ if (!route)
92
+ return null;
93
+ const { component } = route;
94
+ return component;
95
+ }
96
+ childCompoent() {
97
+ const childNodes = this.querySelectorAll(":scope > *[slot]");
98
+ const slots = Array.from(childNodes).map((node) => {
99
+ const slotname = node.getAttribute("slot");
100
+ if (slotname.startsWith("/")) {
101
+ return {
102
+ path: slotname,
103
+ slotname
104
+ };
105
+ }
106
+ else {
107
+ return {
108
+ path: this.baseURL + "/" + slotname,
109
+ slotname
110
+ };
111
+ }
112
+ });
113
+ let slotsSort;
114
+ if (this.static) {
115
+ slotsSort = slots;
116
+ }
117
+ else {
118
+ slotsSort = RouteView_1.sortRoutesPaths(slots);
119
+ }
120
+ const usedSlot = RouteView_1.useWhichRoute(slotsSort, this.path);
121
+ const slotElement = slots.find((s) => s.path === usedSlot);
122
+ const RouterParmasObject = RouteView_1.parseRouterParams(usedSlot, this.path);
123
+ this.params = RouterParmasObject;
124
+ if (!slotElement)
125
+ return null;
126
+ return html `<slot name="${slotElement.slotname}"></slot>`;
127
+ }
128
+ static sortRoutesPaths(ObjectArrayIncludePath) {
129
+ const all = ObjectArrayIncludePath.map((route) => {
130
+ const path = route.path;
131
+ const pathArray = path.split("/");
132
+ const Single_dynamicRouteCount = pathArray.filter((p) => p.startsWith(":")).length;
133
+ return {
134
+ ...route,
135
+ path,
136
+ Single_dynamicRouteCount,
137
+ };
138
+ });
139
+ const allSort = all.sort((a, b) => a.Single_dynamicRouteCount - b.Single_dynamicRouteCount);
140
+ const multi = allSort.filter((route) => {
141
+ const path = route.path;
142
+ const pathArray = path.split("/");
143
+ const double_dynamicRouteCount = pathArray.filter((p) => p.startsWith("...") || p.startsWith("*")).length;
144
+ return double_dynamicRouteCount > 0;
145
+ });
146
+ multi.sort((a, b) => {
147
+ const aIndex = a.path.split("/").findIndex((template) => template.startsWith("...") || template.startsWith("*"));
148
+ const bIndex = b.path.split("/").findIndex((template) => template.startsWith("...") || template.startsWith("*"));
149
+ return aIndex !== -1 && bIndex !== -1 ? bIndex - aIndex : 0;
150
+ });
151
+ const sigle = allSort.filter((route) => {
152
+ const path = route.path;
153
+ const pathArray = path.split("/");
154
+ const double_dynamicRouteCount = pathArray.filter((p) => p.startsWith("...") || p.startsWith("*")).length;
155
+ return double_dynamicRouteCount === 0;
156
+ });
157
+ return [...sigle, ...multi];
158
+ }
159
+ static useWhichRoute(ObjectArrayIncludePath, path, baseURL = "/") {
160
+ const originpath = path.startsWith("/") ? path : baseURL + path;
161
+ const routes = ObjectArrayIncludePath;
162
+ const pathTemplateArray = routes.map((r) => r.path);
163
+ for (const pathTemplate of pathTemplateArray) {
164
+ const pathsplits = pathTemplate.split("/").slice(1);
165
+ const reg = new RegExp(pathsplits.map((s) => {
166
+ if (s.startsWith(":")) {
167
+ return "[^/]+";
168
+ }
169
+ else if (s.startsWith("...") || s.startsWith("*")) {
170
+ return ".*";
171
+ }
172
+ else {
173
+ return s;
174
+ }
175
+ }).join("/") + "$");
176
+ if (reg.test(originpath)) {
177
+ return pathTemplate;
178
+ }
179
+ }
180
+ return null;
181
+ }
182
+ static parseRouterParams(routeTemplate, originpath) {
183
+ if (!routeTemplate || !originpath)
184
+ return;
185
+ const params = {};
186
+ const originpathArray = originpath.split("/").splice(1);
187
+ const routeTemplateSplit = routeTemplate.split("/").splice(1);
188
+ for (const [index, path] of routeTemplateSplit.entries()) {
189
+ if (path.startsWith(":")) {
190
+ params[path.slice(1)] = originpathArray[index];
191
+ }
192
+ else if (path.startsWith("*")) {
193
+ params[path.slice(1)] = originpathArray.slice(index).join("/");
194
+ }
195
+ else if (path.startsWith("...")) {
196
+ params[path.slice(1)] = originpathArray.slice(index).join("/");
197
+ }
198
+ else {
199
+ if (path !== originpathArray[index]) {
200
+ return;
201
+ }
202
+ }
203
+ }
204
+ return params;
205
+ }
206
+ static updateAll() {
207
+ const routeViewTagName = conf.namemap.get("route-view");
208
+ const routeViewArray = document.querySelectorAll(routeViewTagName);
209
+ const ArrayLength = routeViewArray.length;
210
+ if (ArrayLength > 0) {
211
+ for (let index = 0, ArrayItem; ArrayItem = routeViewArray[index]; index++) {
212
+ ArrayItem.path = window.location.pathname;
213
+ }
214
+ }
215
+ }
216
+ };
217
+ RouteView.styles = css `:host{display:contents}`;
218
+ __decorate([
219
+ property({ type: Boolean })
220
+ ], RouteView.prototype, "static", void 0);
221
+ __decorate([
222
+ property()
223
+ ], RouteView.prototype, "type", void 0);
224
+ __decorate([
225
+ property()
226
+ ], RouteView.prototype, "baseURL", void 0);
227
+ __decorate([
228
+ property()
229
+ ], RouteView.prototype, "path", void 0);
230
+ __decorate([
231
+ property({ type: Boolean })
232
+ ], RouteView.prototype, "override", void 0);
233
+ __decorate([
234
+ property({ type: Object })
235
+ ], RouteView.prototype, "compoent", void 0);
236
+ RouteView = RouteView_1 = __decorate([
237
+ define("route-view")
238
+ ], RouteView);
239
+ export { RouteView };
@@ -1,5 +1,5 @@
1
- import { STD } from "../deps.js";
2
- export default class ViewSTD extends STD {
1
+ import { GLOBSTD } from "../deps.js";
2
+ export default class ViewSTD extends GLOBSTD {
3
3
  }
4
4
  export declare const DLsharecss: import("lit").CSSResult;
5
5
  //# sourceMappingURL=std.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"std.d.ts","sourceRoot":"","sources":["../../../src/view/std.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAO,MAAM,YAAY,CAAC;AACtC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,GAAG;CAAI;AAC5C,eAAO,MAAM,UAAU,yBAiCtB,CAAC"}
1
+ {"version":3,"file":"std.d.ts","sourceRoot":"","sources":["../../../src/view/std.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,YAAY,CAAC;AAC1C,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,OAAO;CAAI;AAChD,eAAO,MAAM,UAAU,yBAiCtB,CAAC"}
@@ -1,5 +1,5 @@
1
- import { STD, css } from "../deps.js";
2
- export default class ViewSTD extends STD {
1
+ import { GLOBSTD, css } from "../deps.js";
2
+ export default class ViewSTD extends GLOBSTD {
3
3
  }
4
4
  export const DLsharecss = css `
5
5
  :host{
@@ -1 +1 @@
1
- {"version":3,"file":"with.d.ts","sourceRoot":"","sources":["../../src/with.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM,SAAU,MAAM,YAAY,wBAAwB,mBAAmB,wBAAwB,SAMjH,CAAC;AACF;;;;EAIE;AACF,eAAO,MAAM,MAAM,WAAY,MAAM,GAAG,MAAM,QAAQ;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,EAAE,GAAG,CAAC;IAAC,IAAI,CAAC,EAAE,GAAG,CAAC;CAAE,SAK3G,CAAC;AACF;;;EAGE;AACF,eAAO,MAAM,MAAM,oBAqBlB,CAAC;AACF;;;EAGE;AACF,eAAO,MAAM,KAAK,oBAuBjB,CAAC"}
1
+ {"version":3,"file":"with.d.ts","sourceRoot":"","sources":["../../src/with.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM,SAAU,MAAM,YAAY,wBAAwB,mBAAmB,wBAAwB,SAOjH,CAAC;AACF;;;;EAIE;AACF,eAAO,MAAM,MAAM,WAAY,MAAM,GAAG,MAAM,QAAQ;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,EAAE,GAAG,CAAC;IAAC,IAAI,CAAC,EAAE,GAAG,CAAC;CAAE,SAK3G,CAAC;AACF;;;EAGE;AACF,eAAO,MAAM,MAAM,oBAqBlB,CAAC;AACF;;;EAGE;AACF,eAAO,MAAM,KAAK,oBAuBjB,CAAC"}
package/out/src/with.js CHANGED
@@ -1,10 +1,11 @@
1
- import { conf } from "./conf.js";
1
+ import { conf } from "../conf.js";
2
2
  export const define = (name, options) => (constructor) => {
3
- var _a;
4
- name = conf === null || conf === void 0 ? void 0 : conf.tag(name);
5
- if (customElements.get(name) === undefined) {
6
- customElements.define(name, constructor, options);
3
+ var _a, _b;
4
+ const tagname = conf === null || conf === void 0 ? void 0 : conf.tag(name);
5
+ if (customElements.get(tagname) === undefined) {
6
+ customElements.define(tagname, constructor, options);
7
7
  (_a = conf === null || conf === void 0 ? void 0 : conf.enabled) === null || _a === void 0 ? void 0 : _a.push(name);
8
+ (_b = conf === null || conf === void 0 ? void 0 : conf.namemap) === null || _b === void 0 ? void 0 : _b.set(name, tagname);
8
9
  }
9
10
  };
10
11
  /**
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "godown",
3
- "version": "1.0.40",
3
+ "version": "1.0.44",
4
4
  "main": "./out/index.js",
5
5
  "exports": {
6
6
  ".": "./out/index.js",
7
7
  "./out": "./out/index.js",
8
+ "./out/conf": "./out/conf.js",
8
9
  "./out/react": "./out/react/index.js"
9
10
  },
10
11
  "type": "module",