@quenty/iris 1.1.0 → 1.2.0

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/CHANGELOG.md CHANGED
@@ -3,12 +3,32 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # 1.1.0 (2026-08-16)
6
+ # [1.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/iris@1.1.0...@quenty/iris@1.2.0) (2026-08-28)
7
7
 
8
8
  **Note:** Version bump only for package @quenty/iris
9
9
 
10
- # 1.0.0 (2026-08-14)
10
+ # 1.1.0 (2026-08-24)
11
11
 
12
- ### Features
12
+ **Note:** Version bump only for package @quenty/iris
13
+
14
+ # v1.1.0 (Mon Aug 24 2026)
15
+
16
+ #### 🐛 Bug Fix
17
+
18
+ - fix: jecs and iris nevermore-style integration, replace with separate forks [#805](https://github.com/Quenty/NevermoreEngine/pull/805) ([@euvinkeel](https://github.com/euvinkeel))
19
+ - Merge branch 'main' into users/euvinkeel/implot ([@euvinkeel](https://github.com/euvinkeel))
20
+ - hooks installation seem okay to use for now ([@euvinkeel](https://github.com/euvinkeel))
21
+ - update deps ([@euvinkeel](https://github.com/euvinkeel))
22
+ - separation iteration ([@euvinkeel](https://github.com/euvinkeel))
23
+ - separation ([@euvinkeel](https://github.com/euvinkeel))
24
+ - separate out iris and jecs from immediateutils ([@euvinkeel](https://github.com/euvinkeel))
25
+ - fgdh ([@euvinkeel](https://github.com/euvinkeel))
26
+ - packagify jecs and iris and remote immediateutils files ([@euvinkeel](https://github.com/euvinkeel))
27
+ - remove jecs and iris only? ([@euvinkeel](https://github.com/euvinkeel))
28
+ - Merge remote-tracking branch 'origin/main' into users/euvinkeel/implot ([@euvinkeel](https://github.com/euvinkeel))
29
+ - remove iris and jecs from nevermore, replaced with forked repo ([@euvinkeel](https://github.com/euvinkeel))
30
+ - add implot ([@euvinkeel](https://github.com/euvinkeel))
31
+
32
+ #### Authors: 1
13
33
 
14
- - **iris:** vendor Iris v2.5.1 as a Nevermore package
34
+ - euvinkeel ([@euvinkeel](https://github.com/euvinkeel))
package/LICENSE.md CHANGED
@@ -1,7 +1,6 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
- Copyright (c) 2024 Michael_48
4
- Copyright (c) 2026 Quenty
3
+ Copyright (c) 2014-2026 James Onnen (Quenty)
5
4
 
6
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -12,22 +12,12 @@
12
12
  </a>
13
13
  </div>
14
14
 
15
- Immediate-mode GUI vendored from [SirMallard/Iris](https://github.com/SirMallard/Iris) (v2.5.1)
15
+ Nevermore-integrated Iris
16
16
 
17
- <div align="center"><a href="https://quenty.github.io/NevermoreEngine/api/Iris">View docs →</a></div>
17
+ <div align="center"><a href="https://quenty.github.io/NevermoreEngine/api/IrisUtils">View docs →</a></div>
18
18
 
19
19
  ## Installation
20
20
 
21
21
  ```
22
22
  npm install @quenty/iris --save
23
23
  ```
24
-
25
- ```lua
26
- local Iris = require("Iris")
27
- ```
28
-
29
- ## Source
30
-
31
- Vendored from [SirMallard/Iris](https://github.com/SirMallard/Iris) v2.5.1. MIT, copyright 2024 Michael_48.
32
-
33
- Files are prefixed `iris_` so they do not collide in Nevermore's global module registry. Relative requires are unchanged. Re-vendor from a tagged release next time and record the SHA here.
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@quenty/iris",
3
- "version": "1.1.0",
4
- "description": "Immediate-mode GUI vendored from SirMallard/Iris",
3
+ "version": "1.2.0",
4
+ "description": "Nevermore-integrated Iris",
5
5
  "keywords": [
6
6
  "Roblox",
7
7
  "Nevermore",
8
8
  "Lua",
9
- "iris",
10
- "imgui"
9
+ "iris"
11
10
  ],
12
11
  "bugs": {
13
12
  "url": "https://github.com/Quenty/NevermoreEngine/issues"
@@ -26,17 +25,17 @@
26
25
  "preinstall": "npx only-allow pnpm"
27
26
  },
28
27
  "contributors": [
29
- "Michael_48",
30
- "SirMallard",
31
28
  "Quenty"
32
29
  ],
33
30
  "dependencies": {
31
+ "@quenty/immediateutils": "1.3.0",
34
32
  "@quenty/loader": "10.11.1",
35
- "@quenty/nevermore-test-runner": "1.5.1",
33
+ "@quenty/nevermore-test-runner": "1.6.0",
34
+ "@quentystudios/iris": "github:QuentyStudios/Iris",
36
35
  "@quentystudios/jest-lua": "3.10.0-quenty.2"
37
36
  },
38
37
  "publishConfig": {
39
38
  "access": "public"
40
39
  },
41
- "gitHead": "bb227ab222e1887b1d5f65333ef06e2bedba31c1"
40
+ "gitHead": "f75f93d5b2ac51cf7da3b7599788dcce31fd8a29"
42
41
  }
@@ -0,0 +1,194 @@
1
+ --!nonstrict
2
+ --[=[
3
+ @class ImmediateIrisInstall
4
+
5
+ Runtime decorator: adds `rt.iris`, and optionally registers scheduler
6
+ middleware so Iris shares the immediate tick.
7
+
8
+ preTick lazily calls `Iris.Init(parent, false)` so Iris does not hook
9
+ Heartbeat. Gameplay systems declare widgets. postTick calls
10
+ `Iris.Internal._cycle()`.
11
+
12
+ If `rt.irisParent` is nil, Iris lives in a dedicated ScreenGui
13
+ (`ImmediateIrisHost`) under PlayerGui: `ResetOnSpawn = false` so it
14
+ survives death, and a high DisplayOrder so it draws over other UI.
15
+ Windows are Frames in that host (`UseScreenGUIs = false`); Iris's own
16
+ ScreenGuis would ignore the host and reset on spawn.
17
+
18
+ Set `rt.irisParent` to parent under a custom Gui instead. Read every
19
+ preTick: if it changes, is destroyed, or goes nil, the Iris root is
20
+ reparented (nil snaps back to the host). Iris has no public setter;
21
+ this writes Internal.parentInstance and `_rootInstance.Parent`.
22
+
23
+ `rt.iris` is nil until Init has produced a parented root, and is
24
+ cleared if Iris is Disabled, shut down, or the root is destroyed.
25
+ Consumer systems should treat a non-nil `rt.iris` as drawable.
26
+
27
+ Client-only. Stacking this on a server scheduler is a no-op for Init/cycle.
28
+ ]=]
29
+ local Players = game:GetService("Players")
30
+ local RunService = game:GetService("RunService")
31
+
32
+ local require = require(script.Parent.loader).load(script)
33
+
34
+ local ImmediateScheduler = require("ImmediateScheduler")
35
+ local ImmediateCoreUtils = require("ImmediateCoreUtils")
36
+ local Iris = require("Iris")
37
+
38
+ local BEGIN_PRIORITY = 0
39
+ local END_PRIORITY = 100
40
+ local HOST_NAME = "ImmediateIrisHost"
41
+ -- Headroom so other overlays (and Iris popup +1024 if UseScreenGUIs is
42
+ -- turned back on) can still sit above without overflowing int32.
43
+ local HOST_DISPLAY_ORDER = 2147483647 - 4096
44
+
45
+ export type IrisAddon = {
46
+ -- The Iris module, only while it is safe to declare widgets this tick.
47
+ iris: typeof(Iris)?,
48
+ -- Always the Iris module once required; not for widget drawing.
49
+ _raw_iris: typeof(Iris),
50
+ irisParent: (BasePlayerGui | GuiBase2d)?,
51
+ }
52
+
53
+ export type ImmediateRuntime_Iris<Rt={}> = Rt & ImmediateCoreUtils.ImmediateRuntime & IrisAddon
54
+
55
+ local function getPlayerGui(): PlayerGui?
56
+ local player = Players.LocalPlayer
57
+ if player == nil then
58
+ return nil
59
+ end
60
+ return player:FindFirstChildOfClass("PlayerGui")
61
+ end
62
+
63
+ local function ensureDefaultHost(): ScreenGui?
64
+ local playerGui = getPlayerGui()
65
+ if playerGui == nil then
66
+ return nil
67
+ end
68
+
69
+ local existing = playerGui:FindFirstChild(HOST_NAME)
70
+ if existing and existing:IsA("ScreenGui") then
71
+ return existing
72
+ end
73
+
74
+ local host = Instance.new("ScreenGui")
75
+ host.Name = HOST_NAME
76
+ host.ResetOnSpawn = false
77
+ host.IgnoreGuiInset = true
78
+ host.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
79
+ host.DisplayOrder = HOST_DISPLAY_ORDER
80
+ host.Parent = playerGui
81
+ return host
82
+ end
83
+
84
+ local function resolveIrisParent(r: ImmediateRuntime_Iris): (BasePlayerGui | GuiBase2d)?
85
+ local parent = r.irisParent
86
+ if parent ~= nil and parent.Parent ~= nil then
87
+ return parent
88
+ end
89
+ return ensureDefaultHost()
90
+ end
91
+
92
+ local function applyIrisParent(iris: any, parent: BasePlayerGui | GuiBase2d)
93
+ local internal = iris.Internal
94
+ if internal.parentInstance ~= parent then
95
+ internal.parentInstance = parent
96
+ end
97
+ local root = internal._rootInstance
98
+ -- Parent nil is unparented or destroyed; setting Parent on a destroyed
99
+ -- instance errors. `_cycle` ForceRefresh rebuilds the root.
100
+ if root and root.Parent ~= nil and root.Parent ~= parent then
101
+ root.Parent = parent
102
+ end
103
+ end
104
+
105
+ -- `_started` and `Disabled` are necessary but not enough: Shutdown leaves
106
+ -- `_started` false (covered), but a destroyed root still reports started.
107
+ -- Drawing while Disabled desyncs VDOM because `_cycle` returns before swap.
108
+ local function isIrisDrawable(iris: any): boolean
109
+ if iris == nil then
110
+ return false
111
+ end
112
+ local internal = iris.Internal
113
+ if not internal._started or internal._shutdown or iris.Disabled then
114
+ return false
115
+ end
116
+ local root = internal._rootInstance
117
+ return root ~= nil and root.Parent ~= nil
118
+ end
119
+
120
+ local function destroyDefaultHost()
121
+ local playerGui = getPlayerGui()
122
+ if playerGui == nil then
123
+ return
124
+ end
125
+ local host = playerGui:FindFirstChild(HOST_NAME)
126
+ if host then
127
+ host:Destroy()
128
+ end
129
+ end
130
+
131
+ return function<Rt>(rt: Rt & ImmediateCoreUtils.ImmediateRuntime, scheduler: ImmediateScheduler.ImmediateScheduler): ImmediateRuntime_Iris<Rt>
132
+ local runtime = rt :: ImmediateRuntime_Iris<Rt>
133
+ if runtime._raw_iris == nil then
134
+ runtime._raw_iris = Iris
135
+ end
136
+
137
+ if scheduler and RunService:IsClient() then
138
+ scheduler:RegisterSystem({
139
+ name = "mw_immediate_iris_begin",
140
+ preTick = true,
141
+ priority = BEGIN_PRIORITY,
142
+ notProtected = false,
143
+ system = function()
144
+ local iris = runtime._raw_iris
145
+ local customParent = runtime.irisParent
146
+ local usingDefaultHost = customParent == nil or customParent.Parent == nil
147
+ local parent = resolveIrisParent(runtime)
148
+ if parent == nil then
149
+ runtime.iris = nil
150
+ return
151
+ end
152
+
153
+ if not iris.Internal._started then
154
+ if usingDefaultHost then
155
+ -- Frames under the host ScreenGui, not nested ScreenGuis
156
+ -- that would ignore DisplayOrder / ResetOnSpawn.
157
+ iris.UpdateGlobalConfig({
158
+ UseScreenGUIs = false,
159
+ })
160
+ end
161
+ -- false = no Heartbeat; this scheduler is the cycle.
162
+ iris.Init(parent, false, true)
163
+ else
164
+ applyIrisParent(iris, parent)
165
+ end
166
+
167
+ runtime.iris = if isIrisDrawable(iris) then iris else nil
168
+ end,
169
+ Destroy = function() end,
170
+ })
171
+ scheduler:RegisterSystem({
172
+ name = "mw_immediate_iris_end",
173
+ postTick = true,
174
+ priority = END_PRIORITY,
175
+ notProtected = false,
176
+ system = function()
177
+ local _raw_iris = runtime._raw_iris
178
+ if _raw_iris.Internal._started then
179
+ _raw_iris.Internal._cycle()
180
+ end
181
+ end,
182
+ Destroy = function() end,
183
+ })
184
+
185
+ runtime.maid:GiveTask(function()
186
+ if runtime._raw_iris.Internal._started then
187
+ runtime._raw_iris.Disabled = true
188
+ end
189
+ destroyDefaultHost()
190
+ end)
191
+ end
192
+
193
+ return runtime
194
+ end
@@ -0,0 +1,11 @@
1
+ --[=[
2
+ @class IrisUtils
3
+ ]=]
4
+ -- local require = require(script.Parent.loader).load(script)
5
+
6
+ local IrisUtils = {}
7
+
8
+ local iris = assert(script.Parent.Parent:FindFirstChild("Iris", true), "Iris not found")
9
+ IrisUtils.Iris = iris
10
+
11
+ return IrisUtils
@@ -4,4 +4,4 @@
4
4
  "tree": {
5
5
  "$path": { "optional": "../node_modules" }
6
6
  }
7
- }
7
+ }
@@ -22,4 +22,4 @@
22
22
  }
23
23
  }
24
24
  }
25
- }
25
+ }