@kedataindo/docflow-element 0.0.2 → 0.0.4

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/LICENSE ADDED
@@ -0,0 +1,44 @@
1
+ DocFlow — Proprietary EULA Reference
2
+
3
+ Copyright © 2026 PT Kedata Indonesia (the "Licensor"). All rights reserved.
4
+
5
+ ────────────────────────────────────────────────────────────────────────
6
+ THIS IS A TEMPLATE / SCAFFOLD FILE.
7
+ ────────────────────────────────────────────────────────────────────────
8
+ This document is a placeholder summarising the licensing model. The
9
+ binding text is the **DocFlow End-User License Agreement (EULA)** to
10
+ be supplied separately to each customer, paired with a signed Order
11
+ Form (per-deal price + tier + connection cap + server-instance cap).
12
+ Until the EULA is reviewed by counsel and published, you may treat
13
+ this file as the canonical statement that:
14
+
15
+ 1. The DocFlow software is proprietary and NOT open-source.
16
+ 2. No rights are granted by viewing the source code unless the
17
+ customer has accepted the EULA in writing.
18
+ 3. The bundled third-party components listed in `NOTICE` keep
19
+ their original open-source licenses (mostly MIT).
20
+
21
+ The "MIT" placeholder in `README.md` (carried over from before the
22
+ proprietary decision) is **incorrect** and is updated by PR #90
23
+ (replace "MIT" → "Proprietary — see LICENSE + NOTICE").
24
+ ────────────────────────────────────────────────────────────────────────
25
+
26
+ Licensing model (per PRD §5 — proprietary EULA + separate MSA):
27
+
28
+ • DocFlow EULA (End-User License Agreement) — perpetual,
29
+ non-exclusive, non-transferable, metered per simultaneous
30
+ connection per server instance. Standard tiers: Community (free,
31
+ no warranty), Professional, Enterprise, Government. Hosting
32
+ DocFlow as a third-party SaaS is **prohibited** without a
33
+ separate OEM/SaaS agreement.
34
+ • Maintenance & Support Agreement (MSA) — annual, separate from
35
+ the EULA. Required for Professional / Enterprise / Government
36
+ for SLA-backed support; optional for Community.
37
+ • Source-code escrow (Government tier) — source code is deposited
38
+ with an escrow agent; released to the licensee if the Licensor
39
+ ceases to operate or fails the maintenance SLA.
40
+
41
+ Governing law: Republic of Indonesia (UU Hak Cipta No. 28/2014).
42
+ Dispute venue: District Court of Central Jakarta.
43
+
44
+ For licensing questions: legal@kedata.co
@@ -1,11 +1,18 @@
1
- import type { DocsEditorPlugin } from '@kedataindo/docflow-core';
1
+ import type { DocsEditorPlugin, ImageUploadHandler } from '@kedataindo/docflow-core';
2
2
  export declare class DocsEditorElement extends HTMLElement {
3
3
  static observedAttributes: string[];
4
4
  private _vueElement?;
5
5
  private _shadowRoot?;
6
6
  private _plugins;
7
+ private _onImageUpload?;
7
8
  get plugins(): DocsEditorPlugin[];
8
9
  set plugins(value: DocsEditorPlugin[]);
10
+ /**
11
+ * Host-injected image upload port. Functions can't be HTML attributes, so
12
+ * consumers set it as a JS property: `el.onImageUpload = async (file) => ({ src })`.
13
+ */
14
+ get onImageUpload(): ImageUploadHandler | undefined;
15
+ set onImageUpload(value: ImageUploadHandler | undefined);
9
16
  connectedCallback(): void;
10
17
  disconnectedCallback(): void;
11
18
  attributeChangedCallback(_name: string, oldValue: string | null, newValue: string | null): void;
@@ -1 +1 @@
1
- {"version":3,"file":"DocsEditorElement.d.ts","sourceRoot":"","sources":["../src/DocsEditorElement.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAQtE,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,MAAM,CAAC,kBAAkB,WAA4D;IAErF,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,OAAO,CAAC,WAAW,CAAC,CAAY;IAChC,OAAO,CAAC,QAAQ,CAAyB;IAEzC,IAAI,OAAO,IAAI,gBAAgB,EAAE,CAEhC;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAKpC;IAED,iBAAiB;IAgBjB,oBAAoB;IAMpB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKxF,OAAO,CAAC,WAAW;CAmCpB"}
1
+ {"version":3,"file":"DocsEditorElement.d.ts","sourceRoot":"","sources":["../src/DocsEditorElement.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAQ1F,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,MAAM,CAAC,kBAAkB,WAA4D;IAErF,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,OAAO,CAAC,WAAW,CAAC,CAAY;IAChC,OAAO,CAAC,QAAQ,CAAyB;IACzC,OAAO,CAAC,cAAc,CAAC,CAAoB;IAE3C,IAAI,OAAO,IAAI,gBAAgB,EAAE,CAEhC;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAKpC;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,kBAAkB,GAAG,SAAS,CAElD;IAED,IAAI,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,EAKtD;IAED,iBAAiB;IAgBjB,oBAAoB;IAMpB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKxF,OAAO,CAAC,WAAW;CAoCpB"}
package/dist/index.cjs CHANGED
@@ -39,6 +39,7 @@ var DocsEditorElement = class extends HTMLElement {
39
39
  _vueElement;
40
40
  _shadowRoot;
41
41
  _plugins = [];
42
+ _onImageUpload;
42
43
  get plugins() {
43
44
  return this._plugins;
44
45
  }
@@ -48,6 +49,19 @@ var DocsEditorElement = class extends HTMLElement {
48
49
  Object.assign(this._vueElement, this._buildProps());
49
50
  }
50
51
  }
52
+ /**
53
+ * Host-injected image upload port. Functions can't be HTML attributes, so
54
+ * consumers set it as a JS property: `el.onImageUpload = async (file) => ({ src })`.
55
+ */
56
+ get onImageUpload() {
57
+ return this._onImageUpload;
58
+ }
59
+ set onImageUpload(value) {
60
+ this._onImageUpload = value;
61
+ if (this._vueElement) {
62
+ Object.assign(this._vueElement, this._buildProps());
63
+ }
64
+ }
51
65
  connectedCallback() {
52
66
  if (typeof window === "undefined" || typeof document === "undefined") return;
53
67
  this._shadowRoot = this.attachShadow({ mode: "open" });
@@ -96,7 +110,8 @@ var DocsEditorElement = class extends HTMLElement {
96
110
  modelValue,
97
111
  editable,
98
112
  collaboration,
99
- plugins: this._plugins
113
+ plugins: this._plugins,
114
+ onImageUpload: this._onImageUpload
100
115
  };
101
116
  }
102
117
  };